8de67388be9a67cb94ba95615b7643b4ddc385da braney Thu Sep 24 17:48:19 2026 -0700 quickLift: give a lifted maf block the reference's own bases, refs #38249 Inside a chain block the two assemblies run in step but need not agree base for base, and the first row of a lifted block still carried the other assembly's letters. The details page showed hg19's base in the human row of a block lifted onto hg38. quickLiftMafs now reads the reference sequence once over the span of the lifted blocks and writes it into that row, leaving the gaps where they are. The lifted blocks are also sorted by position now. On a chain that turns the alignment over they came back last to first, and the details page listed them in that order. diff --git src/hg/inc/quickLift.h src/hg/inc/quickLift.h index 0396747597d..8ab6d0e4285 100644 --- src/hg/inc/quickLift.h +++ src/hg/inc/quickLift.h @@ -92,35 +92,36 @@ // read. Use this when the items cannot be had from a query quickLiftSql knows how to make. struct hash *quickLiftChainHash(char *quickLiftFile, char *chrom, int start, int end); // Load the quickLift chains covering chrom:start-end on the reference and return them in a // hash keyed on the other assembly's sequence names, which is the shape the lift functions // want. Use this when the items were fetched some other way, so quickLiftSql was not the // thing that collected the chains. struct psl *quickLiftPsl(struct hash *chainHash, struct hash **pMapPsls, struct psl *psl); // Map the target side of an alignment from the other assembly onto our current reference. // The query side (the mRNA, EST or protein the alignment is to) is left alone. Returns // NULL if the alignment doesn't map. pMapPsls points at a hash of mapping alignments the // caller keeps across a run of items; point it at a NULL hash to start. struct mafAli *quickLiftMafs(struct hash *chainHash, struct mafAli *mafList, - char *sourceDb, char *refSrc, int refSrcSize); + char *sourceDb, char *refDb, char *refChrom, char *refSrc, int refSrcSize); // Map MAF blocks from the other assembly onto our current reference. A block is cut at // every chain block boundary, since a MAF block has to be one contiguous run on its first // row and the lift does not keep the reference contiguous. refSrc is the name the browser -// expects on the reference row, ".", with no hub prefix. +// expects on the reference row, ".", with no hub prefix. The bases on that row +// are replaced with refDb's own sequence of refChrom. boolean quickLiftIsLifted(struct trackDb *tdb); // TRUE when this track's data comes from another assembly and there is enough to lift it. // Both halves have to be there: the chain file that does the lifting and the assembly the // data came from. A hub can set either one on its own, and half the pair is no use. boolean quickLiftIsOwnChainTrack(struct trackDb *tdb); // TRUE when this is the chain track quickLift builds to show the lift itself. That stanza // carries quickLiftUrl and quickLiftDb like any lifted track, but its data is already in // reference coordinates and must not be lifted a second time. struct chain *quickLiftChain(struct hash *chainHash, struct hash **pMapPsls, struct chain *chain); // Map a chain's target side from the other assembly onto our current reference. A chain is // an alignment between that assembly and some other species, so this composes the two and