e6d1189bea4cc541396f842b65a3392c33c8e734
max
  Wed Sep 2 02:55:03 2026 -0700
hprc2annot: put the collection in git and fix the QA findings

The HPRC Release 2 GenArk contributed track collection (7 tracks x 462
assemblies) had only its one-line betaGenArk.txt enable checked in. Add the
makeDoc, the build scripts, the seven track description pages and the trackDb
stanzas, and fix the problems QA found.

Data fixes, both rebuilt across all 462 assemblies:

- liftoff: gff3ToGenePred was naming each genePred after the gene, so every
transcript of a gene shared one name, the RefSeq accession was lost and the
transcript_biotype lookup never matched (type empty on 99.8% of rows). Pass
-rnaNameAttr=ID. Duplicate (chrom,start,end,name) tuples go from 24,969 to 0
and type is now empty on 2,132 of 82,973,730 rows. The same flag is a no-op
on the CAT GFF3 (byte-identical output), so both gene tracks now share one
code path and CAT needs no rebuild.

- segdups: the build read SEDEF column 6, strand1, which is "+" by construction
on every row, so every inverted duplication rendered forward. Use column 14,
strand2, the orientation of the paralogous copy: 13.8M + and 13.8M - across
the collection. Also translate the paralog partner out of PanSN through the
GenArk chromAlias, since the browser does not translate a plain text field,
and store identity as a percentage so the mouseover can read it.

hprc2annotFixBed.sh is not idempotent for pclai: a second run re-parses an
already-parsed name and blanks the values. It now refuses to touch a converted
file. GCA_041900255.1 was damaged that way and is rebuilt from source.

Provenance, all from the QA report:

- stats.tsv is appended to rather than truncated on every run, and each run
regenerates log/summary.tsv, a per-track roll-up over the collection.
- dataVersion on all seven tracks.
- Rows are now dropped for exactly two reasons and both are counted: past the
end of the sequence, or a sequence name absent from the assembly, which also
warns with example names. Only GCA_018472765.3 trips the second, the known
upstream contig-version mismatch. genePredToBigGenePred failure is checked
and an empty conversion result is a failure, not a valid empty bigBed.

Description pages: fix a raw UTF-8 character, rewrite the segdups and pclai
display conventions which still described the data before the name field was
blanked, add a color legend checked against the data, add the pcLAI preprint
(from the Crossref record, since it has no PMID), and correct the stated reason
liftoff drops transcripts.

Display: title case on the short labels, "Active centromeres" shortened to fit
the 17-character limit, pcLAI to pack since it has no readable dense state,
liftoff and segdups to dense, and a filter on the segdups original flag.

refs #35415

diff --git src/hg/makeDb/trackDb/contrib/hprc2annot/hprc2annot.trackDb.txt src/hg/makeDb/trackDb/contrib/hprc2annot/hprc2annot.trackDb.txt
new file mode 100644
index 00000000000..bc4b75dd394
--- /dev/null
+++ src/hg/makeDb/trackDb/contrib/hprc2annot/hprc2annot.trackDb.txt
@@ -0,0 +1,112 @@
+# trackDb stanzas for the hprc2annot GenArk contributed track collection.
+# HPRC Release 2 annotations on the ~462 HPRC assembly hubs, refs #35415.
+#
+# hprc2annotMakeTrackDb.py reads this file, keeps only the stanzas whose
+# bigDataUrl file is present in a given assembly's hub directory, and writes
+# the per-assembly trackDb.txt. Stanzas are separated by blank lines; comment
+# lines are ignored. Paths here are relative to the assembly's hub directory;
+# genark addContrib rewrites them to contrib/hprc2annot/... when it wires the
+# collection into each assembly's hub.txt.
+#
+# dataVersion values come from the HPRC index CSV file names (see the makeDoc,
+# src/hg/makeDb/doc/contrib/hprc2annot.txt); update them when HPRC reissues a
+# track.
+
+track hprcCatGenes
+shortLabel CAT Genes
+longLabel CAT (Comparative Annotation Toolkit) gene annotations
+type bigGenePred
+bigDataUrl catGenes.bb
+group genes
+priority 10
+visibility pack
+labelFields name,name2
+defaultLabelFields name2
+searchIndex name,name2
+baseColorDefault genomicCodons
+dataVersion HPRC Release 2, CAT genes v1.3
+html ../docs/catGenes
+
+track hprcLiftoffGenes
+shortLabel Liftoff Genes
+longLabel Liftoff RefSeq gene annotations
+type bigGenePred
+bigDataUrl liftoffGenes.bb
+group genes
+priority 11
+visibility dense
+labelFields name,name2
+defaultLabelFields name2
+searchIndex name,name2
+baseColorDefault genomicCodons
+dataVersion HPRC Release 2, Liftoff genes v1.0
+html ../docs/liftoffGenes
+
+track hprcCensat
+shortLabel cenSat
+longLabel Centromere satellite annotation (cenSat)
+type bigBed 9 +
+bigDataUrl censat.bb
+group varRep
+priority 20
+visibility pack
+itemRgb on
+searchIndex name
+dataVersion HPRC Release 2, cenSat v1.0
+html ../docs/censat
+
+track hprcActiveCentromeres
+shortLabel Active Centromere
+longLabel Active centromere regions
+type bigBed 3
+bigDataUrl censatCentromeres.bb
+group map
+priority 21
+visibility dense
+color 220,20,60
+dataVersion HPRC Release 2, cenSat centromeres v1.0
+html ../docs/censatCentromeres
+
+track hprcSegdups
+shortLabel Seg Dups
+longLabel Segmental duplications (SEDEF)
+type bigBed 9 +
+bigDataUrl segdups.bb
+group varRep
+priority 22
+visibility dense
+itemRgb on
+filterValues.original True,False
+filterType.original multipleListOr
+filterLabel.original SEDEF original call
+mouseOver Duplicate of ${partner}<br>Identity: ${pctMatch}%<br>Aligned length: ${alnLen} bp<br>Satellite bases: ${satBases}
+dataVersion HPRC Release 2, SEDEF segdups v1.1
+html ../docs/segdups
+
+track hprcPclai
+shortLabel pcLAI Ancestry
+longLabel Pangenome local ancestry inference (pcLAI)
+type bigBed 9 +
+bigDataUrl pclai.bb
+group compGeno
+priority 30
+visibility pack
+itemRgb on
+mouseOver Window ${window}<br>PCA coordinates (PC1,PC2): ${pca}<br>Segment PCA: ${pcaSegment}<br>Confidence: ${score}
+dataVersion HPRC Release 2, pcLAI v1.1
+html ../docs/pclai
+
+track hprcMethylation
+shortLabel Methylation
+longLabel ONT 5mC CpG methylation
+type bigWig 0 100
+bigDataUrl methylation.bw
+group regulation
+priority 40
+visibility full
+autoScale off
+viewLimits 0:100
+maxHeightPixels 100:40:8
+color 0,0,200
+dataVersion HPRC Release 2, ONT methylation v1.0
+html ../docs/methylation