scripts/release/genome_browser_hub_generator.py
def generate_genome_text_file_from_dict(accession_dict, release_version, dest_dir):
    """
    Generates the genome.txt file for the genome_browser_hup given a list
    of assembly-scientific name mappings

    names_list: A tab delimited file containing mappings of the
    assembly name and the genome scientific name e.g hg38\thomo_sapiens
    version: The version of the release
    dest_dir: The destination directory where the genome.txt
    file will be generated

    return:
    """

    trackdb_url = "ftp://ftp.ebi.ac.uk/pub/databases/Rfam/%s/genome_browser_hub/%s/trackDb.txt"

    fp_out = open(os.path.join(dest_dir, "genomes.txt"), 'w')

    for genome in accession_dict.keys():
        fp_out.write("genome %s\n" % accession_dict[genome]["assembly_name"])
        fp_out.write("trackDb " + trackdb_url % (str(release_version),
                                             accession_dict[genome]["species_name"]) + "\n\n")

    fp_out.close()

    Generates the genome.txt file for the genome_browser_hup given a list
    of assembly-scientific name mappings

    names_list: A tab delimited file containing mappings of the
    assembly name and the genome scientific name e.g hg38\thomo_sapiens
    version: The version of the release
    dest_dir: The destination directory where the genome.txt
    file will be generated

    return:
    
Generates the genome.txt file for the genome_browser_hup given a list
of assembly-scientific name mappings

A tab delimited file containing mappings of the
assembly name and the genome scientific name e.g hg38\thomo_sapiens
version: The version of the release
dest_dir: The destination directory where the genome.txt
file will be generated


Generates the genome . txt file for the genome_browser_hup given a list of assembly - scientific name mappings A tab delimited file containing mappings of the assembly name and the genome scientific name e . g hg38 \ thomo_sapiens version : The version of the release dest_dir : The destination directory where the genome . txt file will be generated
def generate_genome_text_file_from_dict(accession_dict, release_version, dest_dir):
    trackdb_url = "ftp://ftp.ebi.ac.uk/pub/databases/Rfam/%s/genome_browser_hub/%s/trackDb.txt"
    fp_out = open(os.path.join(dest_dir, "genomes.txt"), 'w')
    for genome in accession_dict.keys():
        fp_out.write("genome %s\n" % accession_dict[genome]["assembly_name"])
        fp_out.write("trackDb " + trackdb_url % (str(release_version),
                                             accession_dict[genome]["species_name"]) + "\n\n")
    fp_out.close()
def generate_genome_text_file_from_dict ( accession_dict , release_version , dest_dir ) : trackdb_url = "ftp://ftp.ebi.ac.uk/pub/databases/Rfam/%s/genome_browser_hub/%s/trackDb.txt" fp_out = open ( os . path . join ( dest_dir , "genomes.txt" ) , 'w' ) for genome in accession_dict . keys ( ) : fp_out . write ( "genome %s\n" % accession_dict [ genome ] [ "assembly_name" ] ) fp_out . write ( "trackDb " + trackdb_url % ( str ( release_version ) , accession_dict [ genome ] [ "species_name" ] ) + "\n\n" ) fp_out . close ( )
Generates the genome.txt file for the genome_browser_hup given a list
of assembly-scientific name mappings
Generates the genome . txt file for the genome_browser_hup given a list of assembly - scientific name mappings
"""
    Generates the genome.txt file for the genome_browser_hup given a list
    of assembly-scientific name mappings

    names_list: A tab delimited file containing mappings of the
    assembly name and the genome scientific name e.g hg38\thomo_sapiens
    version: The version of the release
    dest_dir: The destination directory where the genome.txt
    file will be generated

    return:
    """
accession_dict
release_version
dest_dir