scripts/release/genome_browser_hub_generator.py
def generate_hub_txt_file(release_version, dest_dir):
    """
    Generates the hub.txt file for the new Rfam release

    release_version: The Rfam release version
    dest_dir:

    return: void
    """

    # convert to string and chop off the decimals
    rel_version_int = str(release_version).partition(".")[0]
    fp_out = open(os.path.join(dest_dir, "hub.txt"), 'w')
    fp_out.write("hub rfam%s\n" % rel_version_int)
    fp_out.write("shortLabel rfam%s_ncRNA\n" % rel_version_int)
    fp_out.write("longLabel Rfam %s non-coding RNA annotation\n" % release_version)
    fp_out.write("genomesFile genomes.txt\n")
    fp_out.write("email %s\n" % rc.RFAM_EMAIL)
    fp_out.write("descriptionUrl " + rc.BROWSER_HUB_DESC_URL % str(release_version) + '\n')
    fp_out.write("hub_description.html\n")
    fp_out.close()

    Generates the hub.txt file for the new Rfam release

    release_version: The Rfam release version
    dest_dir:

    return: void
    
Generates the hub.txt file for the new Rfam release
release_version: The Rfam release version
dest_dir.

void
Generates the hub . txt file for the new Rfam release release_version : The Rfam release version dest_dir . void
def generate_hub_txt_file(release_version, dest_dir):
    rel_version_int = str(release_version).partition(".")[0]
    fp_out = open(os.path.join(dest_dir, "hub.txt"), 'w')
    fp_out.write("hub rfam%s\n" % rel_version_int)
    fp_out.write("shortLabel rfam%s_ncRNA\n" % rel_version_int)
    fp_out.write("longLabel Rfam %s non-coding RNA annotation\n" % release_version)
    fp_out.write("genomesFile genomes.txt\n")
    fp_out.write("email %s\n" % rc.RFAM_EMAIL)
    fp_out.write("descriptionUrl " + rc.BROWSER_HUB_DESC_URL % str(release_version) + '\n')
    fp_out.write("hub_description.html\n")
    fp_out.close()
def generate_hub_txt_file ( release_version , dest_dir ) : rel_version_int = str ( release_version ) . partition ( "." ) [ 0 ] fp_out = open ( os . path . join ( dest_dir , "hub.txt" ) , 'w' ) fp_out . write ( "hub rfam%s\n" % rel_version_int ) fp_out . write ( "shortLabel rfam%s_ncRNA\n" % rel_version_int ) fp_out . write ( "longLabel Rfam %s non-coding RNA annotation\n" % release_version ) fp_out . write ( "genomesFile genomes.txt\n" ) fp_out . write ( "email %s\n" % rc . RFAM_EMAIL ) fp_out . write ( "descriptionUrl " + rc . BROWSER_HUB_DESC_URL % str ( release_version ) + '\n' ) fp_out . write ( "hub_description.html\n" ) fp_out . close ( )
Generates the hub.txt file for the new Rfam release
release_version: The Rfam release version
dest_dir:
Generates the hub . txt file for the new Rfam release release_version : The Rfam release version dest_dir :
"""
    Generates the hub.txt file for the new Rfam release

    release_version: The Rfam release version
    dest_dir:

    return: void
    """ # convert to string and chop off the decimals
release_version
dest_dir