scripts/preprocessing/desc_generator.py
def extract_sequence_accessions_from_seed(seed_file):
    """
    Parses a seed MSA and extracts all sequence
    accessions in the form of a dictionary

    seed_file: An Rfam seed alignment

    return: A dictionary of seed accessions
    """

    accessions = {}
    fp = open(seed_file, 'r')

    for line in fp:
        line = line.strip()
        if len(line) > 1 and line[0] != '#' and line != '':
            line = line.split(' ')
            accession = line[0].partition('/')[0]
            if accession != '':
                accessions[accession] = ""

    fp.close()

    return accessions

    Parses a seed MSA and extracts all sequence
    accessions in the form of a dictionary

    seed_file: An Rfam seed alignment

    return: A dictionary of seed accessions
    
Parses a seed MSA and extracts all sequence
accessions in the form of a dictionary

An Rfam seed alignment

A dictionary of seed accessions
Parses a seed MSA and extracts all sequence accessions in the form of a dictionary An Rfam seed alignment A dictionary of seed accessions
def extract_sequence_accessions_from_seed(seed_file):
    accessions = {}
    fp = open(seed_file, 'r')
    for line in fp:
        line = line.strip()
        if len(line) > 1 and line[0] != '#' and line != '':
            line = line.split(' ')
            accession = line[0].partition('/')[0]
            if accession != '':
                accessions[accession] = ""
    fp.close()
    return accessions
def extract_sequence_accessions_from_seed ( seed_file ) : accessions = { } fp = open ( seed_file , 'r' ) for line in fp : line = line . strip ( ) if len ( line ) > 1 and line [ 0 ] != '#' and line != '' : line = line . split ( ' ' ) accession = line [ 0 ] . partition ( '/' ) [ 0 ] if accession != '' : accessions [ accession ] = "" fp . close ( ) return accessions
Parses a seed MSA and extracts all sequence
accessions in the form of a dictionary
Parses a seed MSA and extracts all sequence accessions in the form of a dictionary
"""
    Parses a seed MSA and extracts all sequence
    accessions in the form of a dictionary

    seed_file: An Rfam seed alignment

    return: A dictionary of seed accessions
    """
seed_file