6b0035d19769346baffe193ef9419c269d46f8d8 max Wed Sep 9 06:09:41 2026 -0700 hprc2annot: pcLAI column 10 is the ancestry centroid, not a segment coordinate Reading the pcLAI authors' own format description (github.com/AI-sandbox/hprc-pclai, README "Output format (BED)") while building the same annotation as a native hg38 track showed that column 10 of the source BED had been described wrongly here. It is not the PCA coordinate of a longer ancestry segment the window belongs to; the authors call it the centroid, the discretized pcLAI ancestry of the window written as the PCA centroid of its ancestry cluster. That is why it only ever takes four values -- four clusters, not four long shared segments. The old reading also implied a segmentation step the method does not have: pcLAI predicts one coordinate per window, and the blocks visible in the display are runs of windows with similar predictions. Field renamed pcaSegment -> centroid in pclai.as with the description corrected, and the mouseOver, the detailsScript exportFields and the description page follow. The README also settles that windows are a fixed 1000 SNPs rather than a fixed number of bases, and that thickStart is specified to equal chromStart, so the occasional thickStart == chromStart-1 the converter works around is a bug in their files rather than something we misread. A field name and its description live inside each bigBed, so editing pclai.as does nothing to a built collection. hprc2annotRewriteAs.sh re-emits a built bigBed with the current .as -- no re-download, no column change, item count checked across the round trip, and safe to re-run, unlike hprc2annotFixBed.sh. All 460 pclai.bb were rewritten with it. Worth knowing: those files had been built from an older pclai.as than the tree and nothing had noticed, so this is the tool to run after any .as description edit. genark: the "...Url" inside a detailsScript value must not be rebased the way bigDataUrl is. hgc resolves a relative detailsScript Url against the track's own bigDataUrl when it builds the details page, and bigDataUrl has already been rebased, so the prefix landed twice: the pcLAI scatterplot had been asking for contrib/hprc2annot/contrib/hprc2annot/pclaiRefPanel.json and quietly getting nothing on every GenArk hub. In this layout the panel file is symlinked beside the .bb, so relative-to-the-.bb is the bare file name; rebaseBeside() does that and is idempotent, so addContrib can be re-run. refs #35415 diff --git src/hg/makeDb/scripts/hprc2annot/pclai.as src/hg/makeDb/scripts/hprc2annot/pclai.as index 1488c5472cc..e0cef9af922 100644 --- src/hg/makeDb/scripts/hprc2annot/pclai.as +++ src/hg/makeDb/scripts/hprc2annot/pclai.as @@ -1,16 +1,16 @@ table pclai -"HPRC point-cloud local ancestry inference (pcLAI), assembly coordinates" +"HPRC point cloud local ancestry inference (pcLAI), assembly coordinates" ( string chrom; "Reference sequence chromosome or scaffold" uint chromStart; "Start position in chromosome" uint chromEnd; "End position in chromosome" string name; "Unused (values are shown on mouseover)" - uint score; "Confidence score (0-1000)" + uint score; "Confidence score (0-1000, higher is more confident)" char[1] strand; "+ or -" uint thickStart; "Start of thick drawing" uint thickEnd; "End of thick drawing" uint reserved; "Item color (R,G,B)" - string window; "Local ancestry window id" - string pca; "Window PCA|PCA-space coordinates (PC1,PC2) of this window" - string pcaSegment; "Segment PCA|PCA-space coordinates (PC1,PC2) of the containing ancestry segment" + string window; "Local ancestry window id (~1000 SNPs)" + string pca; "Window PCA|PCA-space coordinates (PC1,PC2) predicted for this window" + string centroid; "Ancestry centroid|Discretized pcLAI ancestry of this window, given as the (PC1,PC2) centroid of that ancestry cluster" )