scripts/support/merge_all_tbl_files.py
def merge_project_files(project_dir, upid_list, file_type):
    """
    The purpose of this function is to merge genome files (rfamseq, genseq, tblout)
    to release ready files for the database import

    project_dir: The path to the project directory. Project directory should be
    in the same structure as the one generated by genome_download pipeline
    upid_list: A list of upids to include in the merge
    file_type: The type of the files to merge (rfamseq, genseq, tblout)

    return:
    """

    fp = open(upid_list, 'r')

    upids = [x.strip() for x in fp]

    fp.close()

    for upid in upids:
        subdir_loc = os.path.join(project_dir, upid[-3:])
        updir = os.path.join(subdir_loc, upid)

        source_dir = ''
        if file_type.lower() == "tblout" or file_type.lower() == "tbl":
            source_dir = os.path.join(updir, "search_output")
        elif file_type.lower() == "fasta" or file_type.lower() == "fa":
            source_dir = os.path.join(updir, "sequence_chunks")

        merge_genome_files(source_dir, file_type, updir, filename=upid)

    The purpose of this function is to merge genome files (rfamseq, genseq, tblout)
    to release ready files for the database import

    project_dir: The path to the project directory. Project directory should be
    in the same structure as the one generated by genome_download pipeline
    upid_list: A list of upids to include in the merge
    file_type: The type of the files to merge (rfamseq, genseq, tblout)

    return:
    
The purpose of this function is to merge genome files (rfamseq, genseq, tblout)
to release ready files for the database import

The path to the project directory. Project directory should be
in the same structure as the one generated by genome_download pipeline
upid_list: A list of upids to include in the merge
file_type: The type of the files to merge (rfamseq, genseq, tblout)


The purpose of this function is to merge genome files ( rfamseq genseq tblout ) to release ready files for the database import The path to the project directory . Project directory should be in the same structure as the one generated by genome_download pipeline upid_list : A list of upids to include in the merge file_type : The type of the files to merge ( rfamseq genseq tblout )
def merge_project_files(project_dir, upid_list, file_type):
    fp = open(upid_list, 'r')
    upids = [x.strip() for x in fp]
    fp.close()
    for upid in upids:
        subdir_loc = os.path.join(project_dir, upid[-3:])
        updir = os.path.join(subdir_loc, upid)
        source_dir = ''
        if file_type.lower() == "tblout" or file_type.lower() == "tbl":
            source_dir = os.path.join(updir, "search_output")
        elif file_type.lower() == "fasta" or file_type.lower() == "fa":
            source_dir = os.path.join(updir, "sequence_chunks")
        merge_genome_files(source_dir, file_type, updir, filename=upid)
def merge_project_files ( project_dir , upid_list , file_type ) : fp = open ( upid_list , 'r' ) upids = [ x . strip ( ) for x in fp ] fp . close ( ) for upid in upids : subdir_loc = os . path . join ( project_dir , upid [ - 3 : ] ) updir = os . path . join ( subdir_loc , upid ) source_dir = '' if file_type . lower ( ) == "tblout" or file_type . lower ( ) == "tbl" : source_dir = os . path . join ( updir , "search_output" ) elif file_type . lower ( ) == "fasta" or file_type . lower ( ) == "fa" : source_dir = os . path . join ( updir , "sequence_chunks" ) merge_genome_files ( source_dir , file_type , updir , filename = upid )
The purpose of this function is to merge genome files (rfamseq, genseq, tblout)
to release ready files for the database import
The purpose of this function is to merge genome files ( rfamseq genseq tblout ) to release ready files for the database import
"""
    The purpose of this function is to merge genome files (rfamseq, genseq, tblout)
    to release ready files for the database import

    project_dir: The path to the project directory. Project directory should be
    in the same structure as the one generated by genome_download pipeline
    upid_list: A list of upids to include in the merge
    file_type: The type of the files to merge (rfamseq, genseq, tblout)

    return:
    """
project_dir
upid_list
file_type