4aa77873cb618e254b2f90d091d7bdef844947c2 max Wed Jul 8 04:28:42 2026 -0700 Let assembly hubs assign genetic codes per sequence for amino acid display Adds a "codonTable" genomes.txt setting, e.g. "codonTable default=1 NC_017929.1=13", so an assembly hub can pick the NCBI translation table used to show amino acids for each sequence. New hGeneticCodeForChrom(db, chrom) in hdb.c resolves the code (per-db cached), falling back to the previous behavior: chrM/chrMT use the vertebrate mitochondrial code, everything else the standard code. Wired into the two browser display paths, which both go through cds.c's baseColorLookupCodon: the base position track three-frame translation and codon-colored annotation tracks such as gene predictions (also PSL/BAM). Also used for the hgc SNP amino acid details, and genePredTranslate gains a db parameter (genePredToProt gains an optional -db flag) so command-line translation can honor the same setting. Documented in assemblyHubHelp.html. refs #16550 diff --git src/hg/htdocs/goldenPath/help/assemblyHubHelp.html src/hg/htdocs/goldenPath/help/assemblyHubHelp.html index ed4a8992044..39f1d17cb4c 100755 --- src/hg/htdocs/goldenPath/help/assemblyHubHelp.html +++ src/hg/htdocs/goldenPath/help/assemblyHubHelp.html @@ -153,30 +153,32 @@
  • description is displayed on the Gateway page and title pages for this assembly. It also appears in the assembly pull-down menu.
  • twoBitPath points to the .2bit sequence file for the assembly. This file is typically generated from FASTA files using the faToTwoBit kent program. The path can also point to a URL.
  • organism is displayed alongside the description on title pages. It also appears in the assembly pull-down menu.
  • defaultPos defines the initial view in the Genome Browser, usually highlighting a popular gene or region of interest.
  • orderKey controls the ordering of assemblies in the pull-down menu.
  • htmlPath points to the HTML file with assembly information. The HTML file is displayed on the Gateway page.
  • transBlat, blat, and isPcr configure different gfServer instances for amino acid searches, BLAT alignments, and PCR. More here.
  • +
  • codonTable assigns genetic codes (translation tables) to sequences for + amino acid display. More here.
  • Note: it is strongly recommended that each genome stanza includes defaultPos, scientificName, organism, description, so that the hub loads with meaningful defaults and can be more easily searched from the Gateway page.

    2bit File

    The .2bit file is constructed from the FASTA sequence for the assembly using the faToTwoBit kent program (available from the downloads page).

    Example:

     faToTwoBit ricCom1.fa ricCom1.2bit
     
    @@ -304,30 +306,66 @@ genome GCF_000001405.39 taxId 9606 groups groups.txt description human twoBitPath GCF_000001405.39.2bit twoBitBptUrl GCF_000001405.39.2bit.bpt chromSizes GCF_000001405.39.chrom.sizes.txt chromAlias GCF_000001405.39.chromAlias.txt chromAuthority ucsc organism human defaultPos chr1:82985474-82995474 scientificName Homo sapiens htmlPath html/GCF_000001405.39_GRCh38.p13.description.html + +

    Genetic Codes (codon translation tables)

    +

    By default the Genome Browser translates codons to amino acids with the standard genetic code, +except for sequences named chrM or chrMT, which use the vertebrate +mitochondrial code. An assembly hub can assign a different +NCBI genetic +code to individual sequences with the codonTable setting in the genome stanza:

    +
    codonTable default=1 NC_017929.1=13
    +

    The value is a space-separated list of sequenceName=id pairs, where id +is an NCBI translation table number (for example 1 for the standard code, 2 for vertebrate +mitochondrial, 13 for ascidian mitochondrial). The special name default sets the code +used for any sequence not listed. Sequences with no assignment keep the default behavior described +above. This affects amino acid display in the base position track's three-frame translation, in +codon-colored annotation tracks such as gene predictions, and on the details pages.

    +

    Note: sequenceName must be the sequence's own name as stored in the assembly's +.2bit file (the same name used in chrom.sizes), for example a RefSeq or GenBank +accession such as NC_017929.1. This is the internal name even when a +chromAlias and chromAuthority cause a different name (such as +chrM) to be displayed. Because the special chrM/chrMT +mitochondrial default only applies to sequences whose own name is literally chrM or +chrMT, an assembly whose mitochondrial sequence has an accession name needs an explicit +codonTable entry to translate it with a mitochondrial code.

    +

    Example genome stanza (translating the mitochondrial sequence with the ascidian mitochondrial +code, table 13):

    +
    +genome GCF_000224145.3
    +taxId 7719
    +groups groups.txt
    +description vase tunicate
    +twoBitPath GCF_000224145.3.2bit
    +codonTable default=1 NC_017929.1=13
    +organism KH Sep. 2013
    +defaultPos NC_020166.2:3347001-3357001
    +scientificName Ciona intestinalis
    +
    +

    groups.txt

    The groups.txt file defines the grouping of track controls under the Genome Browser graphic display.

    Example:

     name map
     label Mapping
     priority 2
     defaultIsClosed 0