scripts/support/rfamseq2genseq.py
def convert_rfamseq_to_genseq(rfamseq_file, dest_dir=None):
    """
    Converts an rfamseq file to genseq to map genome (upid) and sequence
    accessions

    :param rfamseq_file: A genome specific rfamseq file in the form of
    upid.rfamseq, as generated from rfamseq table

    returns: void
    """

    # store output in input file directory
    if dest_dir is None:
        dest_dir = os.path.split(rfamseq_file)[0]

    # get the input filename to keep track of the upids
    filename = os.path.basename(rfamseq_file).partition('.')[0]
    genseq_file = open(os.path.join(dest_dir, filename+'.genseq'), 'w')

    rfamseq_fp = open(rfamseq_file, 'r')

    for line in rfamseq_fp:
        line = line.strip().split('\t')
        genseq_file.write(filename + '\t' + line[0] + '\n')

    genseq_file.close()
    rfamseq_fp.close()

    Converts an rfamseq file to genseq to map genome (upid) and sequence
    accessions

    :param rfamseq_file: A genome specific rfamseq file in the form of
    upid.rfamseq, as generated from rfamseq table

    returns: void
    
Converts an rfamseq file to genseq to map genome (upid) and sequence
accessions
Converts an rfamseq file to genseq to map genome ( upid ) and sequence accessions
def convert_rfamseq_to_genseq(rfamseq_file, dest_dir=None):
    if dest_dir is None:
        dest_dir = os.path.split(rfamseq_file)[0]
    filename = os.path.basename(rfamseq_file).partition('.')[0]
    genseq_file = open(os.path.join(dest_dir, filename+'.genseq'), 'w')
    rfamseq_fp = open(rfamseq_file, 'r')
    for line in rfamseq_fp:
        line = line.strip().split('\t')
        genseq_file.write(filename + '\t' + line[0] + '\n')
    genseq_file.close()
    rfamseq_fp.close()
def convert_rfamseq_to_genseq ( rfamseq_file , dest_dir = None ) : if dest_dir is None : dest_dir = os . path . split ( rfamseq_file ) [ 0 ] filename = os . path . basename ( rfamseq_file ) . partition ( '.' ) [ 0 ] genseq_file = open ( os . path . join ( dest_dir , filename + '.genseq' ) , 'w' ) rfamseq_fp = open ( rfamseq_file , 'r' ) for line in rfamseq_fp : line = line . strip ( ) . split ( '\t' ) genseq_file . write ( filename + '\t' + line [ 0 ] + '\n' ) genseq_file . close ( ) rfamseq_fp . close ( )
Converts an rfamseq file to genseq to map genome (upid) and sequence
accessions
Converts an rfamseq file to genseq to map genome ( upid ) and sequence accessions
"""
    Converts an rfamseq file to genseq to map genome (upid) and sequence
    accessions

    :param rfamseq_file: A genome specific rfamseq file in the form of
    upid.rfamseq, as generated from rfamseq table

    returns: void
    """ # store output in input file directory # get the input filename to keep track of the upids
rfamseq_file
A genome specific rfamseq file in the form of
upid.rfamseq, as generated from rfamseq table

void
A genome specific rfamseq file in the form of upid . rfamseq as generated from rfamseq table void
dest_dir