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.c src/hg/hgc/hgc.c
index 3a8d37f..9204c60 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -1463,48 +1463,30 @@
char dbOnly[4096];
diff = comp2->start - (comp1->start + comp1->size);
safef(dbOnly, sizeof(dbOnly), "%s", comp1->src);
chopPrefix(dbOnly);
printf("%-20s %d\n",hOrganism(dbOnly), diff);
}
printf("
");
}
}
}
}
-struct hash* hashFromString(char* string)
-/* parse a whitespace-separated string with tuples in the format name=val or
- * name="val" to a hash name->val */
-{
-if (string==NULL)
- return NULL;
-
-struct slPair *keyVals = slPairListFromString(string, TRUE);
-if (keyVals==NULL)
- return NULL;
-
-struct hash *nameToVal = newHash(0);
-struct slPair *kv;
-for (kv = keyVals; kv != NULL; kv = kv->next)
- hashAdd(nameToVal, kv->name, kv->val);
-return nameToVal;
-}
-
void printIdOrLinks(struct asColumn *col, struct hash *fieldToUrl, struct trackDb *tdb, char *idList)
/* if trackDb does not contain a "urls" entry for current column name, just print idList as it is.
* Otherwise treat idList as a comma-sep list of IDs and print one row per id, with a link to url,
* ($$ in url is OK, wildcards like $P, $p, are also OK)
* */
{
// try to find a fieldName=url setting in the "urls" tdb statement, print id if not found
char *url = NULL;
if (fieldToUrl!=NULL)
url = (char*)hashFindVal(fieldToUrl, col->name);
if (url==NULL)
{
printf("