7f65d3da8f2138d847f15a8398f8dcee1a079027 braney Fri Aug 7 12:07:59 2026 -0700 quickLift: clip an oversized item to the chains we loaded instead of dropping it, refs #38042 quickLift loads chains for the window plus padding, capped at 1 Mb. An item that reaches further than that has ends where no chain reaches, remapRangeList can place neither of them, and the whole item is dropped even though the part on screen maps fine. ClinVar copy number variants run to 159 Mb, so 44 of the 46 in one window disappeared. Pull the ends in to what the chains cover before mapping. The browser never draws the ends of an item that spans the window, so their exact position does not matter, and the existing spanned-item merge still reports it. A clipped end is snapped to a base inside an aligned block, since remapRangeList will only place a coordinate that lands on real alignment. The clip is in the quickLift code, not the shared liftOver remap path. Only hgTracks asks for it, so the details page keeps the item's true extent. Gated by quickLiftClipToChains, on by default. diff --git src/hg/inc/quickLift.h src/hg/inc/quickLift.h index b3317db9347..334e5d38032 100644 --- src/hg/inc/quickLift.h +++ src/hg/inc/quickLift.h @@ -37,30 +37,35 @@ extern char *quickTypeStrings[]; typedef struct slList *(*ItemLoader2)(char **row, int numFields); /* Load a bed file from an SQL query result. */ struct bigBedInterval *quickLiftGetIntervals(char *instaPortFile, struct bbiFile *bbi, char *chrom, int start, int end, struct hash **pChainHash); /* Return intervals from "other" species that will map to the current window. * These intervals are NOT YET MAPPED to the current assembly. */ struct bed *quickLiftIntervalsToBed(struct bbiFile *bbi, struct hash *chainHash, struct bigBedInterval *bb); /* Using chains stored in chainHash, port a bigBedInterval from another assembly to a bed * on the reference. */ +struct bed *quickLiftIntervalsToBedClip(struct bbiFile *bbi, struct hash *chainHash, struct bigBedInterval *bb); +/* Like quickLiftIntervalsToBed, but an item too big for the chains we loaded is pulled in + * to what they cover rather than dropped. Callers that need the item's true extent (the + * details page) should use quickLiftIntervalsToBed instead. */ + struct slList *quickLiftSql(struct sqlConnection *conn, char *quickLiftFile, char *table, char *chromName, int winStart, int winEnd, char *query, char *extraWhere, ItemLoader2 loader, int numFields, struct hash *chainHash); /* Load a list of items (usually beds) from another database in a region that corresponds to chromName:winStart-winEnd in the reference database. * Fill a hash with the chains that were used to map the desired range. These chains will be used to map the query side items back to the reference. */ struct genePred *quickLiftGenePreds(struct sqlConnection *conn, char *quickLiftFile, char *table, char *chromName, int winStart, int winEnd, char *extraWhere, struct hash *chainHash); /* Like quickLiftSql, but load genePreds through a genePredReader so the actual set of * (extended) genePred columns in the table is honored rather than assuming 15 columns. * Fill a hash with the chains that were used to map the desired range. */ unsigned quickLiftGetChainId(struct cart *, char *fromDb, char *toDb); /* Return the id from the quickLiftChain table for given assemblies. */ char *quickLiftGetChainPath(struct cart *, char *fromDb, char *toDb); /* Return the path from the quickLiftChain table for given assemblies. */