b687dd9018670941ce30f8a4582d6597c5a974d8 lrnassar Tue Sep 1 14:57:43 2026 -0700 lrSv1kLin: fix 2bp insertion span, drop dead numConsolidated field, refresh lrSvAll merge. refs #38099 The Lin 1218 VCFs set INFO/END = POS+1 on insertions, and the converter took chromEnd from END, so every insertion was drawn 2bp wide with svLen 2 instead of the 1bp anchor base. That contradicted the track's own description page and the coordinate convention in the makeDoc, and it kept 107,980 Lin insertions from merging in lrSvAll. Insertions now clamp chromEnd to the anchor; deletions are unchanged and still verify span == |SVLEN| against the source VCFs. Dropped numConsolidated from the converter and the .as: the NumConsolidated INFO key is declared in the VCF header but never appears on a data line, so the column was 0 on all 1.2M rows and added a meaningless line to every detail page. Rebuilt lin1218 on hg38 and hs1 (item counts and variant names unchanged) and re-ran the merge: lrSvAll 2,963,093 -> 2,855,267 rows as the duplicate insertion rows collapse. Bumped seven filter.svLen/insLen maxima in lrSv.ra that were short of the data after the August deletion narrowing, three of them only visible on hs1. lrSvAll.html said the 1000 Genomes linear set was not in the merge, which is no longer true, and gave no warning that sourceCount double-counts because Lin1218 already absorbs HPRC, HGSVC3 and both 1KG ONT callsets. Corrected the merge key description and refreshed ten stale cells in the lrSv.html summary table. diff --git src/hg/makeDb/trackDb/human/lrSvAll.html src/hg/makeDb/trackDb/human/lrSvAll.html index b12c1a8b655..ff0f6dcdc78 100644 --- src/hg/makeDb/trackDb/human/lrSvAll.html +++ src/hg/makeDb/trackDb/human/lrSvAll.html @@ -1,60 +1,74 @@ <h2>Description</h2> <p> This track combines the structural-variant (SV) callsets from the individual -subtracks of the <a href="hgTrackUi?g=longReadVariants">Long-read SVs</a> supertrack into a +subtracks of the <a href="hgTrackUi?g=longReadVariants">Long-read SVs</a> container into a single, position-merged overview. Each item is an SV locus seen in one or more of the contributing long-read databases. For every merged locus the track records which databases report it, the summed allele count across those databases, and the range of allele frequencies observed, making it useful for quickly seeing how widely an SV has been reported across cohorts. </p> <p> This is a summary view. For cohort-specific genotypes, per-population allele frequencies, and dataset-specific annotations, use the individual subtracks of -the supertrack. The merge includes the released long-read callsets only; -preliminary or unpublished subtracks (e.g. the Kim PD brain, 1000 Genomes -linear, and HPRC Jasmine sets) are <b>not</b> part of this merged track. +the container. The merge includes the released long-read callsets only; +preliminary or unpublished subtracks (e.g. the Kim PD brain and HPRC Jasmine +sets) are <b>not</b> part of this merged track. </p> <h2>Display Conventions and Configuration</h2> <p> Items are colored by SV type, matching the individual subtracks: <ul> <li><span style="color: rgb(200,0,0);">Deletions (DEL)</span> - red</li> <li><span style="color: rgb(0,0,200);">Insertions (INS)</span> - blue</li> <li><span style="color: rgb(0,160,0);">Duplications (DUP)</span> - green</li> <li><span style="color: rgb(230,140,0);">Inversions (INV)</span> - orange</li> <li><span style="color: rgb(140,0,200);">Complex and other multi-allele events</span> - purple</li> </ul> </p> <p> The mouseover shows the variant name, SV type, reference and insertion lengths, the list of contributing source databases, the allele-frequency range across those databases, and the total allele count. Filters are available for the <b>source database</b>, <b>SV type</b>, <b>SV length</b>, <b>insertion length</b>, <b>total allele count</b>, <b>minimum and maximum allele frequency</b>, and the <b>number of source databases</b> reporting each locus. The detail page lists the per-database allele counts. </p> +<p> +One caution when reading the <b>number of source databases</b>: some of the +contributing callsets are not independent of each other. The 1KG Lin 1218 +dataset is itself a merge of several other datasets shown here, including HPRC +v2.1, HGSVC3, 1KG Vienna ONT and 1KG UW ONT, so a variant found in one of those +studies is often reported by 1KG Lin 1218 as well. Two source databases for such +a variant can therefore mean two reports of the same samples rather than two +independent observations. The overlap in sample composition between the other +callsets is smaller but not zero, since 1000 Genomes samples also appear in HPRC +and CoLoRSdb. +</p> <h2>Methods</h2> <p> The merged track is built by the <tt>lrSvMergeAll.py</tt> script, which reads the bigBed of each contributing subtrack (configured in <tt>databases.tsv</tt>) and groups records that share an identical -<tt>(chromosome, start, end)</tt> position and SV type. For each merged locus +<tt>(chromosome, start, end)</tt> position, SV type and SV length. For +insertions the length of inserted sequence must match as well, so two +insertions of different lengths at the same point stay separate. +For each merged locus the script records the set of contributing databases (<tt>sources</tt>), the number of those databases (<tt>sourceCount</tt>), the sum of their allele counts (<tt>AC</tt>), and the minimum and maximum allele frequency across databases that report one (<tt>minAF</tt>, <tt>maxAF</tt>). The per-database allele counts are carried as additional columns. </p> <p> The step-by-step build commands are recorded in the UCSC makeDoc for this track collection: <a href="https://github.com/ucscGenomeBrowser/kent/blob/master/src/hg/makeDb/doc/hg38/lrSv.txt" target="_blank"> doc/hg38/lrSv.txt</a>. The merge script and autoSql schema live in <a href="https://github.com/ucscGenomeBrowser/kent/tree/master/src/hg/makeDb/scripts/lrSv" target="_blank"> makeDb/scripts/lrSv</a>, and the track configuration is in <a href="https://github.com/ucscGenomeBrowser/kent/blob/master/src/hg/makeDb/trackDb/human/lrSvAll.ra" target="_blank">trackDb/human/lrSvAll.ra</a>. </p>