7e87cadb469b4e0eb4fb7f973154357cfe7fc345
lrnassar
  Mon Sep 21 15:56:18 2026 -0700
QA fixes for the mei (Mobile Insertions) track collection. refs #37524

Fix two data bugs found during QA and rebuild the affected bigBeds.
meiEul1dbToBed.py looked up samples and individuals by name, but euL1db
joins on 1-based row numbers, so neither join ever matched and the
individual count, tissues, clinical conditions and populations were empty
on all 8,991 insertions while the contributing-samples table printed row
numbers. Both loaders now key on the row number, the table prints the
sample name, and the adjacent population filter is case-insensitive so it
actually drops "unknown". meiHgsvc3CsvToBed.py took alt[1:] on every
record, which dropped the first base of the element on the 96 GRCh38 and
111 T2T-CHM13 records where PALMER2 is the only caller and ALT carries no
anchor base; it now prefers INFO SEQ, which always matches SVLEN.

Correct seven statements on the description pages against their sources:
the HGSVC3 single-caller split was attributed to PALMER rather than
L1ME-AID, its orthogonal concordance was 90.8% rather than 92.5%, euL1db
was credited with aligning the L1HS consensus when the paper says it was
processed from our RepeatMasker track, DeepMEI's network was described as
a classifier rather than a genotyper and given the wrong training set,
euL1db listed two detection methods absent from the data, and HMEID
contradicted itself on the MELT ASSESS cutoff.

Also: the SweGen bigDataUrl now points at _swegen.bb so the restricted
callset is kept off the download server; the container page no longer
claims the whole collection is long-read, lists the two euL1db subtracks,
scopes its display conventions to the subtracks they describe, and cites
all six papers; dead and wrong track links are repointed and pinned to a
db; $db replaces hardcoded hg38 in paths on pages that serve three
assemblies; the euL1db labels no longer carry hg38 counts and a lift note
that made no sense on hg19; all six subtracks gain a dataVersion; the
euL1db filter ranges match the data; and five autoSql field descriptions
match what the files contain.

Document the gbdb symlinks and the QA changes in doc/hg38/mei.txt, correct
the HMEID bedToBigBed type there, and add an hg19.txt pointer since hg19
carries the two euL1db subtracks.

diff --git src/hg/makeDb/trackDb/human/mei.ra src/hg/makeDb/trackDb/human/mei.ra
index bfe5d2431c3..1bdaecd748c 100644
--- src/hg/makeDb/trackDb/human/mei.ra
+++ src/hg/makeDb/trackDb/human/mei.ra
@@ -1,27 +1,28 @@
 track mei
 superTrack on
 shortLabel Mobile Insertions
-longLabel Mobile Element Insertions (Polymorphic)
+longLabel Mobile element insertions (polymorphic)
 group varRep
 visibility hide
 
     track meiHgsvc3
     parent mei
     bigDataUrl /gbdb/$D/mei/hgsvc3.bb
     shortLabel HGSVC3 65 MEIs
-    longLabel Mobile Element Insertions in 65 HGSVC3 Long-Read Assembled Samples
+    longLabel Mobile element insertions in 65 HGSVC3 long-read assembled samples
+    dataVersion HGSVC3 Mobile Elements release 1.0, 2024-12-11
     type bigBed 9 +
     itemRgb on
     visibility pack
     mouseOver <b>${teClass}</b> insertion (${svLen} bp)<br>Carriers: ${carrierCount}/${sampleCount} samples<br>Allele frequency: ${altAlleleFreq}<br>Callers: ${callerCount}/2 (PALMER ${palmer}, L1ME-AID ${l1meAid})
     filterValues.teClass Alu,L1,SVA,HERVK,snRNA
     filterType.teClass multipleListOr
     filterLabel.teClass Mobile Element Class
     filter.svLen 0:9478
     filterByRange.svLen on
     filterLabel.svLen Insertion Length (bp)
     filter.altAlleleFreq 0:1
     filterByRange.altAlleleFreq on
     filterLimits.altAlleleFreq 0:1
     filterLabel.altAlleleFreq Allele Frequency
     filter.carrierCount 0:65
@@ -37,128 +38,133 @@
     filterType.palmer multipleListOr
     filterLabel.palmer PALMER Validated
     filterValues.refTrf True,False
     filterType.refTrf multipleListOr
     filterLabel.refTrf In Tandem Repeat
     filter.refSegDup 0:1
     filterByRange.refSegDup on
     filterLimits.refSegDup 0:1
     filterLabel.refSegDup Segmental Duplication Overlap
     skipEmptyFields on
 
     track meiDeepmei1kg
     parent mei
     bigDataUrl /gbdb/$D/mei/deepmei1kg.bb
     shortLabel DeepMEI 1000G MEIs
-    longLabel Mobile Element Insertions in 3,202 1000 Genomes Samples (DeepMEI)
+    longLabel Mobile element insertions in 3,202 1000 Genomes samples (DeepMEI)
+    dataVersion DeepMEI 1000 Genomes high-confidence callset, 2022-11-21
     type bigBed 9 +
     itemRgb on
     visibility pack
     mouseOver <b>${teClass}</b> insertion<br>Carriers: ${carrierCount}/${sampleCount} samples<br>Allele frequency: ${altAlleleFreq}
     filterValues.teClass Alu,L1,SVA
     filterType.teClass multipleListOr
     filterLabel.teClass Mobile Element Class
     filter.altAlleleFreq 0:1
     filterByRange.altAlleleFreq on
     filterLimits.altAlleleFreq 0:1
     filterLabel.altAlleleFreq Allele Frequency
     filter.carrierCount 0:3202
     filterByRange.carrierCount on
     filterLabel.carrierCount Carrier Sample Count
 
     track meiHmeid
     parent mei
     bigDataUrl /gbdb/$D/mei/hmeid.bb
     shortLabel HMEID 5675 MEIs
-    longLabel Mobile Element Insertions in 5,675 NyuWa + 1000 Genomes Samples (HMEID v1.1)
+    longLabel Mobile element insertions in 5,675 NyuWa + 1000 Genomes samples (HMEID v1.1)
+    dataVersion HMEID v1.1
     type bigBed 9 +
     itemRgb on
     visibility pack
     mouseOver <b>${teClass}</b> insertion (${svLen} bp)<br>Carrier haplotypes: ${altAlleleCount}/${alleleNumber}<br>Allele frequency: ${altAlleleFreq}<br>NyuWa AF: ${nyuwaAF}, 1KGP AF: ${kgpAF}<br>MELT ASSESS: ${assess}/5
     filterValues.teClass Alu,L1,SVA,HERVK
     filterType.teClass multipleListOr
     filterLabel.teClass Mobile Element Class
     filter.svLen -1:8757
     filterByRange.svLen on
     filterLabel.svLen Insertion Length (bp, -1 if unknown)
     filter.altAlleleFreq 0:1
     filterByRange.altAlleleFreq on
     filterLimits.altAlleleFreq 0:1
     filterLabel.altAlleleFreq Allele Frequency (all)
     filter.nyuwaAF 0:1
     filterByRange.nyuwaAF on
     filterLimits.nyuwaAF 0:1
     filterLabel.nyuwaAF NyuWa Allele Frequency
     filter.kgpAF 0:1
     filterByRange.kgpAF on
     filterLimits.kgpAF 0:1
     filterLabel.kgpAF 1KGP Allele Frequency
     filterValues.assess 3,4,5
     filterType.assess multipleListOr
     filterLabel.assess MELT ASSESS Score
 
     track meiEul1db
     parent mei
     bigDataUrl /gbdb/$D/mei/eul1db.bb
     shortLabel euL1db Insertions
-    longLabel euL1db: 8,988 curated L1-HS Insertion Polymorphisms (Mir 2015, lifted from hg19)
+    longLabel euL1db: curated L1-HS insertion polymorphisms (Mir 2015)
+    dataVersion euL1db v1.00, 2014-10-14
     type bigBed 9 +
     itemRgb on
     visibility pack
     mouseOver <b>${name}</b><br>Lineage: ${lineage}<br>Sub-group: ${subGroups}<br>Integrity: ${integrity}<br>Pseudo-AF: ${pseudoAlleleFreq}<br>SRIPs: ${sripCount} from ${sampleCount} samples in ${studyCount} studies<br>Gene: ${gene}
     filter.pseudoAlleleFreq 0:1
     filterByRange.pseudoAlleleFreq on
     filterLimits.pseudoAlleleFreq 0:1
     filterLabel.pseudoAlleleFreq Pseudo-allele frequency
-    filter.sripCount 0:1000
+    filter.sripCount 0:675
     filterByRange.sripCount on
     filterLabel.sripCount SRIP count (sample observations)
-    filter.studyCount 0:30
+    filter.studyCount 0:10
     filterByRange.studyCount on
     filterLabel.studyCount Study count
     filterValues.lineage germline,somatic,germline\,somatic,unknown
     filterType.lineage multipleListOr
     filterLabel.lineage Lineage
     filterValues.pcrValidated yes,no
     filterType.pcrValidated multipleListOr
     filterLabel.pcrValidated PCR validated
     filterValues.inReferenceL1HS yes,no
     filterType.inReferenceL1HS multipleListOr
     filterLabel.inReferenceL1HS In reference L1HS
     skipEmptyFields on
 
     track meiEul1dbRef
     parent mei
     bigDataUrl /gbdb/$D/mei/eul1dbRef.bb
     shortLabel euL1db Ref L1HS
-    longLabel euL1db: 1,540 L1-HS Copies Present in the Reference Genome (lifted from hg19)
+    longLabel euL1db: L1-HS copies present in the reference genome (Mir 2015)
+    dataVersion euL1db v1.00, 2014-10-14
     type bigBed 9 +
     itemRgb on
     visibility hide
     mouseOver <b>${subGroup}</b><br>Integrity: ${integrity}<br>L1HS consensus: ${refStart}-${refStop}<br>Length: ${elementLen} bp
     filterValues.subGroup L1HS-Ta,L1HS-PreTa,L1HS-undef
     filterType.subGroup multipleListOr
     filterLabel.subGroup L1HS sub-group
     filterValues.integrity full-length,5prime-truncated,3prime-truncated,internal_fragment
     filterType.integrity multipleListOr
     filterLabel.integrity Integrity
 
     track meiSwegen
     parent mei
-    bigDataUrl /gbdb/$D/mei/swegen.bb
+    bigDataUrl /gbdb/$D/mei/_swegen.bb
     shortLabel SweGen 1000 MEIs
-    longLabel Mobile Element Insertions in 1,000 SweGen Swedish Samples (MELT, lifted from GRCh37)
+    longLabel Mobile element insertions in 1,000 SweGen Swedish samples (MELT, lifted from GRCh37)
+    dataVersion SweGen MELT callset, 2018-03-14
     type bigBed 9 +
     itemRgb on
     visibility pack
     tableBrowser off
     mouseOver <b>${teClass}</b> insertion (${svLen} bp, ${meiSubfamily})<br>Allele count: ${altAlleleCount} of ~2000<br>Allele frequency: ${altAlleleFreq}<br>MELT ASSESS: ${assess}/5<br>FILTER: ${filterStatus}
     filterValues.teClass Alu,L1,SVA,HERVK
     filterType.teClass multipleListOr
     filterLabel.teClass Mobile Element Class
     filter.svLen -1:8757
     filterByRange.svLen on
     filterLabel.svLen Insertion Length (bp, -1 if unknown)
     filter.altAlleleFreq 0:1
     filterByRange.altAlleleFreq on
     filterLimits.altAlleleFreq 0:1
     filterLabel.altAlleleFreq Allele Frequency