697b862c4a5e14cc41f03dfa5757209898c3d5b8
max
  Wed May 21 07:14:40 2025 -0700
triangle decorators for the clinvar track, #35750

diff --git src/hg/makeDb/trackDb/human/clinvarAlpha.html src/hg/makeDb/trackDb/human/clinvarAlpha.html
new file mode 100644
index 00000000000..6789cd649a2
--- /dev/null
+++ src/hg/makeDb/trackDb/human/clinvarAlpha.html
@@ -0,0 +1,206 @@
+<h2>Description</h2>
+
+<div class="warn-note" style="border: 2px solid #9e5900; padding: 5px 20px; background-color: #ffe9cc;">
+<p><span style="font-weight: bold; color: #c70000;">NOTE:</span><br> 
+ClinVar is intended for use primarily by physicians and other
+professionals concerned with genetic disorders, by genetics researchers, and
+by advanced students in science and medicine. Research data is not easy to interpret, and not
+everything shown is necessarily useful. While the ClinVar
+database is open to all academic users, users seeking information about a
+personal medical or genetic condition are urged to consult with a qualified
+physician for diagnosis and for answers to personal questions.</p>
+</div>
+
+<p>
+These tracks show the genomic positions of variants in the
+<a href="https://www.ncbi.nlm.nih.gov/clinvar/" target="_blank">ClinVar database</a>. 
+ClinVar is a free, public archive of reports
+of the relationships among human variations and phenotypes, with supporting
+evidence. </p>
+
+<p>
+The <b>ClinVar SNVs track</b> displays substitutions and indels shorter than 50 bp and 
+the <b>ClinVar CNVs track</b> displays copy number variants (CNVs) equal or larger than 50 bp.
+</p>
+
+<p>
+The <b>ClinVar Interpretations track</b> displays the genomic positions of individual variant 
+submissions and interpretations of the clinical significance and their relationship to disease in 
+the ClinVar database.
+</p>
+ 
+<p>
+<b>Note on the start position of variants:</b> The data in the track are obtained directly from ClinVar's FTP site.
+We display the data obtained from ClinVar as-is to avoid discrepancies between UCSC and NCBI. 
+However, be aware that the ClinVar conventions are different from the VCF standard. 
+Variants may be right-aligned or may contain additional context, e.g. for
+inserts. The VCF position is also available in this track,
+as an additional field, at the end of the list of fields, when you click any variant.
+It can be extracted using our table browser, the API
+or the bigBedToBed tool (see the Data access section below). 
+And GnomAD has <a href="https://github.com/macarthur-lab/clinvar" target="_blank">a converter</a>.
+</p>
+
+<h2>Display Conventions and Configuration</h2>
+
+<p>
+Items can be filtered according to the size of the variant, variant type, clinical significance,
+allele origin, phenotype, and molecular consequence, using the track <b>Configure</b> options.
+Each subtrack has separate display controls, as described
+<a href="../../goldenPath/help/multiView.html">here</a>.
+</p>
+
+<p>
+Entries in the <b>ClinVar SNVs and ClinVar Interpretations tracks</b> are colored by <b>clinical 
+significance</b>:
+<ul>
+ <li><b><font color="d20000">red for pathogenic</font></b></li>
+ <li><b><font color="000088">dark blue for variant of uncertain significance</font></b></li>
+ <li><B><font color="#00d200">green for benign</font></b></li>
+ <li><B><font color="#888">dark grey for not provided</font></b></li>
+ <li><B><font color="#8979D4">light blue for conflicting</font></b></li>
+</ul>
+</p>
+
+<p>
+Entries in the <b>ClinVar CNVs track</b> are colored by <b>type of variant</b>, among others:
+<ul>
+ <li><b><font color="red">red for loss</font></b></li>
+ <li><b><font color="blue">blue for gain</font></b></li>
+ <li><b><font color="purple">purple for inversion</font></b></li>
+ <li><b><font color="orange">orange for insertion</font></b></li>
+</ul>
+A light-to-dark color gradient indicates the <b>clinical significance</b> of each variant, with the 
+lightest shade being benign, to the darkest shade being pathogenic. Detailed information on the 
+CNV color code is described 
+<a href="../../goldenPath/help/hgCnvColoring.html">here</a>. 
+</p>
+
+<p>In the ClinVar SNV track, protein-truncating mutations are shown with
+triangles, inspired by the Decipher transcript browser. The variants with the
+following molecular consequences are considered protein-truncating: nonsense,
+frameshift variant, splice acceptor variant, splice donor variant.  </p>
+
+<p>
+<b>Mouseover</b> on the genomic locations of ClinVar variants shows variant details, clinical 
+interpretation, and associated conditions. Further information on each variant is displayed on 
+the details page by a click onto any variant. ClinVar is an archive for assertions of clinical 
+significance made by the submitters. The level of review supporting the assertion of clinical 
+significance for the variation is reported as the 
+<a target="_blank" href="https://www.ncbi.nlm.nih.gov/clinvar/docs/review_status/">review status</a>. 
+<b>Stars</b> (0 to 4) provide a graphical representation of the aggregate review status. 
+</p>
+
+<p>
+The variants in the <b>ClinVar Interpretations track</b> are arrange from top to bottom by the variant 
+classification of each submission:
+<ul>
+ <li><b>P:</b> Pathogenic</li>
+ <li><b>LP:</b> Likely Pathogenic</li>
+ <li><b>VUS:</b> Variant of Unknown Significance</li>
+ <li><b>LB:</b> Likely Benign</li>
+ <li><b>B:</b> Benign</li>
+ <li><b>OTH:</b> Others</li>
+</ul>
+The size of the bead represents 
+the number of submissions at that genomic position. For better readability, the numbers
+are binned into three categories:
+<ul>
+ <li><b>Small-sized beads:</b> 1-2 submissions</li>
+ <li><b>Medium-sized beads:</b> 3-7 submissions</li>
+ <li><b>Large-sized beads:</b> 8 or more submissions</li>
+</ul>
+Hovering on the track items shows the genomic variations which start at that position 
+and the number of individual submissions with that classification. The details page lists all
+rated submissions from ClinVar, with specific details to the interpretation of the clinical or 
+functional significance of each variant in relation to a condition. Interpretation is at 
+variant-level, not at case (or patient-specific) level.
+</p>
+
+<p>
+More information about using and understanding the ClinVar data can be found 
+<a target="_blank" href="https://www.ncbi.nlm.nih.gov/clinvar/docs/faq/">here</a>.
+</p>
+
+<p>
+For the human genome version hg19: the hg19 genome released by UCSC in 2009 had a 
+mitochondrial genome "chrM" that was not the same as the one later used for most
+databases like ClinVar. As a result, we added the official mitochondrial genome
+in 2020 as "chrMT" and all mitochondrial annotations of ClinVar and most other
+databases are shown on the mitochondrial genome called "chrMT". For full description
+of the issue of the mitochondrial genome in hg19, please see the 
+<a target=_blank href="https://hgdownload.soe.ucsc.edu/goldenPath/hg19/bigZips/">hg19 README file</a> 
+on our download site. 
+</p>
+
+
+<h2>Data updates</h2>
+<p>ClinVar publishes a new release on the 
+<a target="_blank"
+href="https://www.ncbi.nlm.nih.gov/feed/rss.cgi?ChanKey=ClinVarNews">first Thursday every month</a>. 
+This track is then updated automatically at most six days 
+later. The exact date of our last update is shown on the track configuration page. 
+You can find the previous versions of the track organized by month on our
+downloads server in the 
+<a href="http://hgdownload.soe.ucsc.edu/goldenPath/archive/$db/clinvar/" target="_blank">archive</a>
+directory. To display one of these previous versions, paste the URL to one of
+the older files into the custom track text input field under "My Data &gt; Custom Tracks".</p>
+
+<H2>Data access</H2>
+<p>
+The raw data can be explored interactively with the <a href="../cgi-bin/hgTables">Table Browser</a>
+or the <a href="../cgi-bin/hgIntegrator">Data Integrator</a>. The data can be
+accessed from scripts through our <a href="https://api.genome.ucsc.edu">API</a>, the track names are
+"clinVarMain and "clinVarCnv".
+
+<p>
+For automated download and analysis, the genome annotation is stored in a bigBed file that
+can be downloaded from
+<a href="http://hgdownload.soe.ucsc.edu/gbdb/$db/bbi/clinvar" target="_blank">our download server</a>.
+The files for this track are called <tt>clinvarMain.bb</tt> and <tt>clinvarCnv.bb</tt>. Individual
+regions or the whole genome annotation can be obtained using 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, e.g. 
+<tt>bigBedToBed http://hgdownload.soe.ucsc.edu/gbdb/hg19/bbi/clinvar/clinvarMain.bb -chrom=chr21 -start=0 -end=100000000 stdout</tt>
+</p>
+
+<h2>Methods</h2>
+
+<p>
+ClinVar files were reformatted at UCSC to the <a href="../goldenPath/help/bigBed.html">bigBed</a> format.
+The data is updated every month, one week after the ClinVar release date.
+The program that performs the update is available on
+<a href="https://github.com/ucscGenomeBrowser/kent/blob/master/src/hg/utils/otto/clinvar/clinVarToBed"
+target="_blank">Github</a>.
+</p>
+
+<h2>Credits</h2>
+<p>
+Thanks to NCBI for making the ClinVar data available on their FTP site as a tab-separated file.
+If you email them (clinvar@ncbi.nlm.nih.gov), feel free to CC us, it is always good to learn more about ClinVar.
+</p>
+
+<h2>References</h2>
+<p>
+Landrum MJ, Lee JM, Benson M, Brown G, Chao C, Chitipiralla S, Gu B, Hart J, Hoffman D, Hoover J
+<em>et al</em>.
+<a href="https://academic.oup.com/nar/article/44/D1/D862/2502702/ClinVar-public-archive-of-interpretations-of" target="_blank">
+ClinVar: public archive of interpretations of clinically relevant variants</a>.
+<em>Nucleic Acids Res</em>. 2016 Jan 4;44(D1):D862-8.
+PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/26582918" target="_blank">26582918</a>; PMC: <a
+href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4702865/" target="_blank">PMC4702865</a>
+</p>
+
+<p>
+Azzariti DR, Riggs ER, Niehaus A, Rodriguez LL, Ramos EM, Kattman B, Landrum MJ, Martin CL, Rehm HL.
+<a href="https://www.ncbi.nlm.nih.gov/pubmed/29437798" target="_blank">
+Points to consider for sharing variant-level information from clinical genetic testing with
+ClinVar</a>.
+<em>Cold Spring Harb Mol Case Stud</em>. 2018 Feb;4(1).
+PMID: <a href="https://www.ncbi.nlm.nih.gov/pubmed/29437798" target="_blank">29437798</a>; PMC: <a
+href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5793773/" target="_blank">PMC5793773</a>
+</p>
+