bc21bd3d27fe3d29971231955b3fc544fa1c3d1e
angie
  Wed Oct 16 11:51:39 2013 -0700
Two new tracks for Locus Reference Genomic (LRG) (#11863) with customhandlers: LRG Regions and LRG Transcripts.
LRGs are frozen reference sequences for a particular gene plus some
upstream and downstream sequence.  They are intended to provide a
stable coordinate system for gene annotations that won't change
with every new genome assembly, but can be mapped to each genome
assembly.  Since there is a lot of metadata associated with each
region, I made LRG Regions a bigBed 12 + with fields describing
mismatches and indels, so that PSL can be derived from the bigBed
and the original LRG sequence can be reconstructed using genome
assembly sequence and the mismatch/indel info.  hgTracks shows
differences and LRG insertions into the reference assembly using
the cds.c baseColor code.  (LRG deletions from the reference appear
as gaps, which we get for free with bed12 info).
For LRG Transcripts, I found the genePred codon-coloring code
inadequate for showing an insertion into hg19 (or even mismatches),
so instead of genePred I ended up using PSL + sequence, more like
the mRNA track representation and display.

diff --git src/hg/hgc/hgc.h src/hg/hgc/hgc.h
index 36a4cb7..cfc6608 100644
--- src/hg/hgc/hgc.h
+++ src/hg/hgc/hgc.h
@@ -133,30 +133,33 @@
 
 void genericHeader(struct trackDb *tdb, char *item);
 /* Put up generic track info. */
 
 void genericBedClick(struct sqlConnection *conn, struct trackDb *tdb,
 		     char *item, int start, int bedSize);
 /* Handle click in generic BED track. */
 
 void printPosOnChrom(char *chrom, int start, int end, char *strand,
 		     boolean featDna, char *item);
 /* Print position lines referenced to chromosome. Strand argument may be NULL */
 
 void printTrackHtml(struct trackDb *tdb);
 /* If there's some html associated with track print it out. */
 
+char *replaceInUrl(struct trackDb *tdb, char *url, char *idInUrl, boolean encode);
+/* replace $$ in url with idInUrl. Supports many other wildchards */
+
 void abbr(char *s, char *fluff);
 /* Cut out fluff from s. */
 
 void printTableHeaderName(char *name, char *clickName, char *url);
 /* creates a table to display a name vertically,
  * basically creates a column of letters */
 
 void printBacStsXRef(char *clone);
 /* Print out associated STS XRef information for BAC clone on BAC ends */
 /* tracks details pages. */
 
 /* ----Routines in other modules in the same directory---- */
 void genericWiggleClick(struct sqlConnection *conn, struct trackDb *tdb,
 	char *item, int start);
 /* Display details for WIGGLE tracks. */
@@ -429,23 +432,32 @@
 void doPgSnp(struct trackDb *tdb, char *itemName, struct customTrack *ct);
 /* print detail page for personal genome track (pgSnp) */
 
 void doGvf(struct trackDb *tdb, char *item);
 /* Show details for variants represented as GVF, stored in a bed8Attrs table */
 
 void doGeneReviews(struct trackDb *tdb, char *itemName);
 /* generate the detail page for geneReviews */
 
 void prGeneReviews(struct sqlConnection *conn, char *itemName);
 /* print GeneReviews associated to this item */
 
 void prGRShortRefGene(char *itemName);
 /* print GeneReviews short label associated to this refGene item */
 
+void doLrg(struct trackDb *tdb, char *item);
+/* Locus Reference Genomic (LRG) info. */
+
+void doLrgTranscriptPsl(struct trackDb *tdb, char *item);
+/* Locus Reference Genomic (LRG) transcript mapping and sequences. */
+
+void htcLrgCdna(char *item);
+/* Serve up LRG transcript cdna seq */
+
 int extraFieldsPrint(struct trackDb *tdb,struct sqlResult *sr,char **fields,int fieldCount);
 // Any extra bed or bigBed fields (defined in as and occurring after N in bed N + types.
 // sr may be null for bigBeds.
 // Returns number of extra fields actually printed.
 
 #define NUCCORE_SEARCH "http://www.ncbi.nlm.nih.gov/sites/entrez?db=nuccore&cmd=search&term="
 
 #endif