f29b65452a1cca8a5bc62f007100b313e589d036
braney
Sun Sep 6 15:11:36 2026 -0700
quickLift: lift a bigNet track, refs #20824
A net is not an ordinary track to lift. It is an alignment of two assemblies,
so only its target side moves to the new reference; the query side names a third
assembly and is carried across untouched. And the browser draws a net by
recursion, so what really has to survive the lift is the tree: a row's level only
means anything relative to the row above it.
chainNetLoadRangeQuickLift() maps each row's target range with
quickLiftIntervalsToBedClip, which is the same code every other quickLift track
uses, so a net row lands where a bed of the same span would. The surviving rows
then go to the same helpToNet() the unlifted path uses, so there is one tree
builder and not two. The row collection either path does is now cnlHelperNew and
cnlHelperAddBigNet.
validateOneTdb lets bigNet into a quickLift hub. Its chain track is not offered,
so a lifted net's details page has no chain to follow and says so rather than
looking for a track this assembly does not have. bigNetLoadOne lifts the same
way for that page, unclipped, so it reports the item's whole extent.
bigNetFromInterval passes -1 as the cached chromId. bbiCachedChromLookup leaves
the buffer alone when the id matches the one before it, so a cache that outlives
the buffer hands back stale bytes.
Measured against the standalone liftOver tool, on hg19 chr22's mouse net lifted
to hg38: 36 of 36 source rows in the sampled window land on the same coordinates,
counting the one liftOver will not take whole, whose two ends it does place
exactly where the browser puts them. Against hg38's own mouse net, computed
independently, 1.02% of the drawn pixels differ.
diff --git src/hg/hgc/hgc.h src/hg/hgc/hgc.h
index 09e11dd6b76..251fde51f21 100644
--- src/hg/hgc/hgc.h
+++ src/hg/hgc/hgc.h
@@ -1,635 +1,632 @@
/* hgc - Human Genome Click processor - gets called when user clicks
* on something in human tracks display. This file contains stuff
* shared with other modules in hgc, but not in other programs. */
/* Copyright (C) 2014 The Regents of the University of California
* See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
#ifndef HGC_H
#define HGC_H
#ifndef CART_H
#include "cart.h"
#endif
#ifndef TRACKDB_H
#include "trackDb.h"
#endif
#ifndef BED_H
#include "bed.h"
#endif
#ifndef HDB_H
#include "hdb.h"
#endif
#ifndef HPRINT_H
#include "hPrint.h"
#endif
#ifndef CUSTOMTRACK_H
#include "customTrack.h"
#endif
#ifndef WIKITRACK_H
#include "wikiTrack.h"
#endif
#ifndef VARIOME_H
#include "variome.h"
#endif
#ifndef BEDDETAIL_H
#include "bedDetail.h"
#endif
#include "hgdpGeo.h"
#include "dnaMotif.h"
#include "togaClick.h"
#include "featureBits.h"
#include "snp125.h"
extern struct cart *cart; /* User's settings. */
extern char *seqName; /* Name of sequence we're working on. */
extern int winStart, winEnd; /* Bounds of sequence. */
extern char *database; /* Name of mySQL database. */
extern char *organism; /* Colloquial name of organism. */
extern char *genome; /* common name, e.g. Mouse, Human */
extern char *scientificName; /* Scientific name of organism. */
extern struct hash *trackHash; /* A hash of all tracks - trackDb valued */
// A helper struct for allowing variable sized user defined tables. Each table
// is encoded in one field of the bigBed with '|' as column separators and ';' as
// field separators.
struct embeddedTbl
{
struct embeddedTbl *next; // the next custom table
char *field; // field name from bigBed, used as title when title is NULL
char *title; // title of the table from trackDb, may be NULL
char *encodedTbl; // contents of field in bigBed
};
void hgcStart(char *title);
/* Print out header of web page with title. Set
* error handler to normal html error handler. */
char *hgcPath();
/* Return path of this CGI script. */
char *hgcPathAndSettings();
/* Return path with this CGI script and session state variable. */
void hgcAnchorSomewhere(char *group, char *item, char *other, char *chrom);
/* Generate an anchor that calls click processing program with item
* and other parameters. */
void hgcAnchorWindow(char *group, char *item, int thisWinStart,
int thisWinEnd, char *other, char *chrom);
/* Generate an anchor that calls click processing program with item
* and other parameters, INCLUDING the ability to specify left and
* right window positions different from the current window*/
void hgcAnchor(char *group, char *item, char *other);
/* Generate an anchor that calls click processing program with item
* and other parameters. */
struct trackDb *tdbForTableArg();
/* get trackDb for track passed in table arg */
-struct trackDb *getTdbForTrackName(char *trackName);
-/* Given a track name (which may have ct_ or hub_ prepended), return its tdb. */
-
void writeFramesetType();
/* Write document type that shows a frame set, rather than regular HTML. */
void htmlFramesetStart(char *title);
/* Write DOCTYPE HTML and HEAD sections for framesets. */
void alnModernStart(char *classicTitle);
/* Begin an alignment page: modern single-page chrome when the modernAlignPage hg.conf flag is set
* (showSomeAlignment then renders the modern body), else the classic