scripts/support/rfamseq2genseq.py
def generate_genseq_files_from_project_directory(project_dir, upid_input):
    """
    Generates genseq files directly in the directory where a particular
    genome is located

    project_dir: The path to a project directory as generated by genome_downloader
    upid_file: A file listing all upids for which to generate the genseq files

    return: void
    """

    if os.path.isfile(upid_input):
        fp = open(upid_input, 'r')
        upids = [x.strip() for x in fp]
        fp.close()

        # loop over all upids and generate
        for upid in upids:
            suffix = upid[-3:]
            subdir = os.path.join(project_dir, suffix)
            updir = os.path.join(subdir, upid)
            uprfamseq = os.path.join(updir, upid+'.rfamseq')

            if os.path.exists(uprfamseq):
                # dest_dir set to None so that genseq file is created
                # in the same directory as rfamseq
                convert_rfamseq_to_genseq(uprfamseq, dest_dir=None)

    else:
        # get rfamseq file
        suffix = upid_input[-3:]
        subdir = os.path.join(project_dir, suffix)
        updir = os.path.join(subdir, upid_input)
        uprfamseq = os.path.join(updir, upid_input + '.rfamseq')

        convert_rfamseq_to_genseq(uprfamseq, dest_dir=None)

    Generates genseq files directly in the directory where a particular
    genome is located

    project_dir: The path to a project directory as generated by genome_downloader
    upid_file: A file listing all upids for which to generate the genseq files

    return: void
    
Generates genseq files directly in the directory where a particular
genome is located

The path to a project directory as generated by genome_downloader
upid_file: A file listing all upids for which to generate the genseq files

void
Generates genseq files directly in the directory where a particular genome is located The path to a project directory as generated by genome_downloader upid_file : A file listing all upids for which to generate the genseq files void
def generate_genseq_files_from_project_directory(project_dir, upid_input):
    if os.path.isfile(upid_input):
        fp = open(upid_input, 'r')
        upids = [x.strip() for x in fp]
        fp.close()
        for upid in upids:
            suffix = upid[-3:]
            subdir = os.path.join(project_dir, suffix)
            updir = os.path.join(subdir, upid)
            uprfamseq = os.path.join(updir, upid+'.rfamseq')
            if os.path.exists(uprfamseq):
                convert_rfamseq_to_genseq(uprfamseq, dest_dir=None)
    else:
        suffix = upid_input[-3:]
        subdir = os.path.join(project_dir, suffix)
        updir = os.path.join(subdir, upid_input)
        uprfamseq = os.path.join(updir, upid_input + '.rfamseq')
        convert_rfamseq_to_genseq(uprfamseq, dest_dir=None)
def generate_genseq_files_from_project_directory ( project_dir , upid_input ) : if os . path . isfile ( upid_input ) : fp = open ( upid_input , 'r' ) upids = [ x . strip ( ) for x in fp ] fp . close ( ) for upid in upids : suffix = upid [ - 3 : ] subdir = os . path . join ( project_dir , suffix ) updir = os . path . join ( subdir , upid ) uprfamseq = os . path . join ( updir , upid + '.rfamseq' ) if os . path . exists ( uprfamseq ) : convert_rfamseq_to_genseq ( uprfamseq , dest_dir = None ) else : suffix = upid_input [ - 3 : ] subdir = os . path . join ( project_dir , suffix ) updir = os . path . join ( subdir , upid_input ) uprfamseq = os . path . join ( updir , upid_input + '.rfamseq' ) convert_rfamseq_to_genseq ( uprfamseq , dest_dir = None )
Generates genseq files directly in the directory where a particular
genome is located
Generates genseq files directly in the directory where a particular genome is located
"""
    Generates genseq files directly in the directory where a particular
    genome is located

    project_dir: The path to a project directory as generated by genome_downloader
    upid_file: A file listing all upids for which to generate the genseq files

    return: void
    """ # loop over all upids and generate # dest_dir set to None so that genseq file is created # in the same directory as rfamseq # get rfamseq file
project_dir
upid_input