scripts/support/mirnas/find_family_overlaps.py
def extract_tax_ids_from_species_file(species_file):
    """
    Parses family's species file and extracts all distinct tax ids

    :param species_file: The path to a family's species file

    :return: A dictionary of
    """

    tax_ids = {}
    seen_ga = False

    fp = open(species_file, 'r')

    for line in fp:
        # if not a comment line
        if line[0] != '#' and not seen_ga:
            line = line.strip().split()

            if line[3] not in tax_ids:
                if line[5] != '-':
                    tax_ids[line[3]] = int(line[5])

        elif line.find("CURRENT GA THRESHOLD:") != -1:
            seen_ga = True

    fp.close()

    return tax_ids

    Parses family's species file and extracts all distinct tax ids

    :param species_file: The path to a family's species file

    :return: A dictionary of
    
Parses family's species file and extracts all distinct tax ids
Parses family ' s species file and extracts all distinct tax ids
def extract_tax_ids_from_species_file(species_file):
    tax_ids = {}
    seen_ga = False
    fp = open(species_file, 'r')
    for line in fp:
        if line[0] != '#' and not seen_ga:
            line = line.strip().split()
            if line[3] not in tax_ids:
                if line[5] != '-':
                    tax_ids[line[3]] = int(line[5])
        elif line.find("CURRENT GA THRESHOLD:") != -1:
            seen_ga = True
    fp.close()
    return tax_ids
def extract_tax_ids_from_species_file ( species_file ) : tax_ids = { } seen_ga = False fp = open ( species_file , 'r' ) for line in fp : if line [ 0 ] != '#' and not seen_ga : line = line . strip ( ) . split ( ) if line [ 3 ] not in tax_ids : if line [ 5 ] != '-' : tax_ids [ line [ 3 ] ] = int ( line [ 5 ] ) elif line . find ( "CURRENT GA THRESHOLD:" ) != - 1 : seen_ga = True fp . close ( ) return tax_ids
Parses family's species file and extracts all distinct tax ids
Parses family ' s species file and extracts all distinct tax ids
"""
    Parses family's species file and extracts all distinct tax ids

    :param species_file: The path to a family's species file

    :return: A dictionary of
    """ # if not a comment line
A dictionary of
A dictionary of
species_file
The path to a family's species file
The path to a family ' s species file