67ee4b34f8d2fe743e9a610158830ed1523716fe
max
  Thu Dec 2 00:52:01 2021 -0800
more docs and color support for uniprot tracks, refs #28560

diff --git src/hg/makeDb/trackDb/uniprotAlpha.html src/hg/makeDb/trackDb/uniprotAlpha.html
index 6b77f0c..200a898 100644
--- src/hg/makeDb/trackDb/uniprotAlpha.html
+++ src/hg/makeDb/trackDb/uniprotAlpha.html
@@ -1,264 +1,263 @@
 <h2>Description</h2>
 
 <p>
 This track shows protein sequences and annotations on them from the <a
 href="https://www.uniprot.org/" target="_blank">UniProt/SwissProt</A> database,
 mapped to genomic coordinates. 
 </p>
 <p>
 UniProt/SwissProt data has been curated from scientific publications by the UniProt staff,
 UniProt/TrEMBL data has been predicted by various computational algorithms.
 The annotations are divided into multiple subtracks, based on their &quot;feature type&quot; in UniProt.
 The first two subtracks below - one for SwissProt, one for TrEMBL - show the
 alignments of protein sequences to the genome, all other tracks below are the protein annotations
 mapped through these alignments to the genome.
 </p> 
 
 <table class="stdTbl">
   <tr>
     <th>Track Name</th>
     <th>Description</th>
   </tr>
   <tr>
     <td>UCSC Alignment, SwissProt = curated protein sequences</td>
     <td>Protein sequences from SwissProt mapped onto the genome. All other
         tracks are (start,end) SwissProt annotations on these sequences mapped
         using this track. Protein sequences without a single curated 
     annotation were not added to this track.</td> </tr>
 <tr>
     <td>UCSC Alignment, TrEMBL = predicted protein sequences</td>
     <td>Protein sequences from TrEMBL mapped onto the genome. All other tracks
         below are (start,end) TrEMBL annotations mapped to the genome using
         this track. This track is hidden by default. To show it, click its
         checkbox on the track configuration page. Protein sequences without a single 
         predicted annotation on them were not added to this track.</td></tr>
   <tr>
     <td>UniProt Signal Peptides</td>
     <td>Regions found in proteins destined to be secreted, generally cleaved from mature protein.</td>
   </tr>
   <tr>
     <td>UniProt Extracellular Domains</td>
     <td>Protein domains with the comment &quot;Extracellular&quot;.</td>
   </tr>
   <tr>
     <td>UniProt Transmembrane Domains</td>
     <td>Protein domains of the type &quot;Transmembrane&quot;.</td>
   </tr>
   <tr>
     <td>UniProt Cytoplasmic Domains</td>
     <td>Protein domains with the comment &quot;Cytoplasmic&quot;.</td>
   </tr>
   <tr>
     <td>UniProt Polypeptide Chains</td>
     <td>Polypeptide chain in mature protein after post-processing.</td>
   </tr>
   <tr>
     <td>UniProt Regions of Interest</td>
     <td>Regions that have been experimentally defined, such as the role of a region in mediating protein-protein interactions or some other biological process.</td>
   </tr>
   <tr>
     <td>UniProt Domains</td>
     <td>Protein domains, zinc finger regions and topological domains.</td>
   </tr>
   <tr>
     <td>UniProt Disulfide Bonds</td>
     <td>Disulfide bonds.</td>
   </tr>
   <tr>
     <td>UniProt Amino Acid Modifications</td>
     <td>Glycosylation sites, modified residues and lipid moiety-binding regions.</td>
   </tr>
   <tr>
     <td>UniProt Amino Acid Mutations</td>
     <td>Mutagenesis sites and sequence variants.</td>
   </tr>
   <tr>
     <td>UniProt Protein Primary/Secondary Structure Annotations</td>
     <td>Beta strands, helices, coiled-coil regions and turns.</td>
   </tr>
   <tr>
     <td>UniProt Sequence Conflicts</td>
     <td>Differences between Genbank sequences and the UniProt sequence.</td>
   </tr>
   <tr>
     <td>UniProt Repeats</td>
     <td>Regions of repeated sequence motifs or repeated domains.</td>
   </tr>
   <tr>
     <td>UniProt Other Annotations</td>
     <td>All other annotations, e.g. compositional bias</td>
   </tr>
 </table>
 <p>
 For consistency, the subtrack &quot;UniProt/SwissProt Variants&quot; is a copy of the track
 &quot;UniProt Variants&quot; in the track group &quot;Phenotype and Literature&quot;, or 
 &quot;Variation and Repeats&quot;, depending on the assembly.
 </p>
 
 <h2>Display Conventions and Configuration</h2>
 
 <p>
 Genomic locations of UniProt/SwissProt annotations are labeled with a short name for
 the type of annotation (e.g. &quot;glyco&quot;, &quot;disulf bond&quot;, &quot;Signal peptide&quot;
 etc.). A click on them shows the full annotation and provides a link to the UniProt/SwissProt
 record for more details. TrEMBL annotations are always shown in 
 <span style="color: rgb(0,150,250)"><b>light blue</b></span>, except in the Signal Peptides,
 Extracellular Domains, Transmembrane Domains, and Cytoplamsic domains subtracks.</p>
 
 <p>
 Mouse over a feature to see the full UniProt annotation comment. For variants, the mouse over will
 show the full name of the UniProt disease acronym.
 </p>
 
 <p>
 The subtracks for domains related to subcellular location are sorted from outside to inside of 
 the cell: <span style="color: rgb(255,0,150)"><b>Signal peptide</b></span>, 
 <span style="color: rgb(0,150,255)"><b>extracellular</b></span>, <span style="color: rgb(0,150,0)">
 <b>transmembrane</b></span>, and <span style="color: rgb(255,150,0)"><b>cytoplasmic</b></span>.
 </p>
 
 <p>
 In the &quot;UniProt Modifications&quot; track, lipoification sites are highlighted in 
 <span style="color: rgb(12,12,120)"><b>dark blue</b></span>, glycosylation sites in 
 <span style="color: rgb(0,100,100)"><b>dark green</b></span>, and phosphorylation in 
 <span style="color: rgb(200,200,0)"><b>light green</b></span>.</p>
 
 <p>
 Duplicate annotations are removed as far as possible: if a TrEMBL annotation
 has the same genome position and same feature type, comment, disease and
 mutated amino acids as a SwissProt annotation, it is not shown again. Two
 annotations mapped through different transcripts but with the same genome
 coordinates are only shown once.  </p>
 
 <p>Note that only for the human hg38 assembly and SwissProt annotations, there
 also is a <a
 href="hgTracks?db=hg38&hubUrl=ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/genome_annotation_tracks/UP000005640_9606_hub/hub.txt" target=_blank>public
 track hub</a> prepared by UniProt itself, with 
 genome annotations maintained by UniProt using their own mapping
 method based on those Gencode/Ensembl gene models that are annotated in UniProt
 for a given protein.</p>
 
 <h2>Methods</h2>
 
 <p>
 Briefly, UniProt protein sequences were aligned to the transcripts associated
 with the protein, the top-scoring alignments were retained, and the result was
 projected to the genome through a transcript-to-genome alignment.
 Depending on the genome, the transcript-genome alignments was either
 provided by the source database (NBCI RefSeq), created at UCSC (UCSC RefSeq) or
 derived from the transcripts (Ensembl/Augustus).  The transcript set is NCBI
 RefSeq for hg38, UCSC RefSeq for hg19 (due to alt/fix haplotype misplacements 
 in the NCBI RefSeq set on hg19). For other genomes, RefSeq, Ensembl and Augustus 
 are tried, in this order. The resulting protein-genome alignments of this process 
 are available in the file formats for liftOver or pslMap from our data archive
 (see "Data Access" section below).
 </p>
 
 <p>An important step of the mapping process is filtering the alignment from
 protein to transcript. Due to differences between the UniProt proteins and the
 transcripts and the genome, the best matching transcript is not always the
 correct transcript.  Therefore, at least when the transcript model is RefSeq,
 proteins are only aligned to the RefSeq transcripts that are annotated by
 UniProt for this protein (RefSeq version suffixes are skipped). If no
 transcripts are annotated on the protein, or the annotated ones are not current
 anymore, but a NCBI Gene ID is annotated, all RefSeq transcripts annotated to
 this NCBI Gene ID are used.  If no NCBI Gene ID is annotated, then the best
 matching alignment is used. On hg38, only a handful of edge cases (pseudogenes,
 very recently added proteins) remain where the best matches have to be used.
 The details page of the protein alignments shows which transcript were used
 for the mapping and how these transcripts were found. There can be multiple
 transcripts for one protein, as their coding sequences can be identical.
 </p>
 
 <p>
 Proteins were aligned to transcripts with TBLASTN, converted to PSL, filtered
-with pslReps (93% query coverage, within top 1% score), lifted to genome
-positions with pslMap and filtered again.  UniProt annotations were
+with pslReps (93% query coverage, keep alignments within top-1% score), lifted to genome
+positions with pslMap and filtered again with pslReps.  UniProt annotations were
 obtained from the UniProt XML file.  The UniProt annotations were then mapped to the
-genome through the alignment using the pslMap program.  This mapping approach
+genome through the alignment described above using the pslMap program.  This approach
 draws heavily on the <A HREF="https://modbase.compbio.ucsf.edu/LS-SNP/"
-TARGET="_BLANK">LS-SNP</A> pipeline by Mark Diekhans. For human and mouse, the
-alignments were filtered by retaining only proteins annotated with
-a given transcript in the Genome Browser table kgXref. Like all Genome Browser
-source code, the main script used to build this track can be found on 
-<a href="https://github.com/ucscGenomeBrowser/kent/tree/master/src/hg/utils/otto/uniprot/doUniprot">github</a>.
+TARGET="_BLANK">LS-SNP</A> pipeline by Mark Diekhans.
+Like all Genome Browser source code, the main script used to build this track
+can be found on <a
+href="https://github.com/ucscGenomeBrowser/kent/tree/master/src/hg/utils/otto/uniprot/doUniprot">Github</a>.
 </p>
 
 <h2>Automated data updates and release history</h2>
 <p>
-This track is automatically updated on an ongoing basis, every 3-6 months.
+This track is automatically updated on an ongoing basis, every 1-2 months.
 The current version is always shown on the track details page, it includes the
 release of UniProt, the version of the transcript set and a unique MD5 that is
 based on the protein sequences, the transcript sequences, the mapping file
 between both and the transcript-genome alignment.
 </p>
 
 <p>
 Previous versions of this track are available for browsing in the form of the
 <a href="hgTracks?db=$db&hubUrl=https://hgdownload.soe.ucsc.edu/goldenPath/archive/$db/uniprot/hub.txt" target=_blank>
 UCSC UniProt Archive Track Hub</a>. The underlying data of all releases of this track (past
 and current) can be obtained from our
 <a href="https://hgdownload.soe.ucsc.edu/goldenPath/archive/$db/uniprot" target=_blank>Downloads Server, in the data archive directory</a>.
 The UniProt protein-to-genome alignment is also available from there, in file
 formats for our command line programs liftOver or pslMap, which can be used to
 map coordinates on protein sequences to genome coordinates. The filenames are
 unipToGenome.over.chain.gz and unipToGenomeLift.psl.gz.
 </p>
 
 <h2>Data Access</h2>
 
 <p>
 The raw data of the current track can be explored interactively with the
 <a href="../cgi-bin/hgTables">Table Browser</a>, or the
 <a href="../cgi-bin/hgIntegrator">Data Integrator</a>.
 For automated analysis, the genome annotation is stored in a bigBed file that 
 can be downloaded from the
 <a href="http://hgdownload.soe.ucsc.edu/gbdb/$db/uniprot/" target="_blank">download server</a>.
 The exact filenames can be found in the 
 <a href="https://github.com/ucscGenomeBrowser/kent/blob/master/src/hg/makeDb/trackDb/uniprot.ra">track configuration file</a>. 
 Annotations can be converted to ASCII text by our tool <tt>bigBedToBed</tt>
 which can be compiled from the source code or downloaded as a precompiled
 binary for your system. Instructions for downloading source code and binaries can be found
 <a href="http://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads">here</a>.
 The tool can also be used to obtain only features within a given range, for example:
 <br> 
 <tt>bigBedToBed http://hgdownload.soe.ucsc.edu/gbdb/$db/uniprot/unipStruct.bb -chrom=chr6 -start=0 -end=1000000 stdout</tt> 
 <br>
 Please refer to our
 <a href="https://groups.google.com/a/soe.ucsc.edu/forum/#!forum/genome">mailing list archives</a>
 for questions, or our
 <a href="../FAQ/FAQdownloads.html#download36">Data Access FAQ</a>
 for more information. 
 </p>
 
 <p>
 
 <h2>Credits</h2>
 
 <p>
 This track was created by Maximilian Haeussler at UCSC, with help from Chris
 Lee, Mark Diekhans and Brian Raney, feedback from the UniProt staff, Alejo
 Mujica, Regeneron Pharmaceuticals and Pia Riestra, GeneDx. Thanks to UniProt for making all data
 available for download.
 </p>
 
 <h2>References</h2>
 
 <p>
 UniProt Consortium.
 <a href="https://academic.oup.com/nar/article/40/D1/D71/2903687/Reorganizing-the-protein-space-at-
 the-Universal" target="_blank">
 Reorganizing the protein space at the Universal Protein Resource (UniProt)</a>.
 <em>Nucleic Acids Res</em>. 2012 Jan;40(Database issue):D71-5.
 PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/22102590" target="_blank">22102590</a>; PMC: <a
 href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3245120/" target="_blank">PMC3245120</a>
 </p>
 
 <p>
 Yip YL, Scheib H, Diemand AV, Gattiker A, Famiglietti LM, Gasteiger E, Bairoch A.
 <a href="https://onlinelibrary.wiley.com/doi/abs/10.1002/humu.20021" target="_blank">
 The Swiss-Prot variant page and the ModSNP database: a resource for sequence and structure
 information on human protein variants</a>.
 <em>Hum Mutat</em>. 2004 May;23(5):464-70.
 PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/15108278" target="_blank">15108278</a>
 </p>