f2e67daf98177a40eea3e1d52364b52c4abf4728 braney Fri Sep 4 13:08:29 2026 -0700 hgTracks: draw quickLifted bigMaf and wigMaf tracks quickLiftLoadMafs is reached from both places a maf track loads its blocks. It reads them over the ranges in the other assembly through the existing readers and maps them onto the reference. A lifted maf cannot use its summary. The summary names a table or a file in the assembly the track came from, so it cannot be queried with reference coordinates, and for a hub track the setting comes back rewritten as a path under the hub besides, which is how it was failing: a range query against ../trash/quickLift/NNN/multiz100waySummary. inSummaryMode now says no for a lifted track and the real blocks are read instead. That costs time at a wide window, since reading the summary is exactly the work a maf track avoids that way. Measured on multiz100way, hg19 lifted onto hg38: at 900 kb, where both read real blocks, native is 1.52s and lifted is 1.09s, so nothing about the lift is slow. At 2.5 Mb, where native reads the summary, native is 1.05s and lifted is 7.0s. Lifting the summary is the fix and wants its own pass: a summary row is a coordinate range and a score, so mapping one is liftOverRemapRange, but it is read in the drawing functions rather than in a loader. refs #38249 diff --git src/hg/hgTracks/mafTrack.h src/hg/hgTracks/mafTrack.h index 599453babae..a2f8d2685c8 100644 --- src/hg/hgTracks/mafTrack.h +++ src/hg/hgTracks/mafTrack.h @@ -1,47 +1,54 @@ /* mafTrack.h - MAF track display */ /* Copyright (C) 2009 The Regents of the University of California * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */ #ifndef MAFTRACK_H #define MAFTRACK_H #ifndef MAF_H #include "maf.h" #endif struct mafPriv { void *list; struct customTrack *ct; }; struct mafPriv *getMafPriv(struct track *track); /* zoom level where summary file is used */ static inline boolean inSummaryMode(struct cart *cart, struct trackDb *tdb, int winSize) { +// A quickLifted maf track has no summary to read. The summary names a table or file +// belonging to the assembly the track came from, so it cannot be queried with reference +// coordinates, and for a hub track the setting comes back rewritten as a path under the +// hub besides. Read the real blocks and lift them instead. +if (trackDbSetting(tdb, "quickLiftDb") != NULL) + return FALSE; + char *snpTable = trackDbSetting(tdb, "snpTable"); unsigned summaryWindowSize = cartOrTdbInt(cart, tdb, "summaryWindowSize", 1000000); boolean windowBigEnough = (winSize > summaryWindowSize); boolean doSnpMode = (snpTable != NULL) && cartOrTdbBoolean(cart, tdb, MAF_SHOW_SNP,FALSE); return windowBigEnough && !doSnpMode; } /* zoom level that displays synteny breaks and nesting brackets */ #define MAF_DETAIL_VIEW 30000 void drawMafRegionDetails(struct mafAli *mafList, int height, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, Color altColor, enum trackVisibility vis, boolean isAxt, boolean chainBreaks, boolean doSnpMode); /* Draw wiggle/density plot based on scoring things on the fly. */ void drawMafChain(struct hvGfx *hvg, int xOff, int yOff, int width, int height, boolean isDouble); /* draw single or double chain line between alignments in MAF display */ #endif