48ff31d7c310549df1111e86dcd3abd66abe6586
angie
Wed Oct 24 16:37:39 2018 -0700
Alt haplotype and fix patch alignment tracks with links to multi-region mode (refs #18854)
* Adding altSeqLiftOverPsl and fixSeqListOverPsl as top-level tracks (release alpha).
* New 'db' option for baseColorUseSequence makes it fetch sequence from the current database
(or other database if specified) -- we don't need seq/extFile for alts and patches now that
they have been added to the .2bit.
* Special hgc handler for {alt,fix}SeqLiftOverPsl has links to view the alt/fix in multi-region
mode, to see the alignment details in the current position range, and to jump to the
corresponding position range in the browser.
diff --git src/hg/hgTracks/cds.c src/hg/hgTracks/cds.c
index dd47d20..bb28cb3 100644
--- src/hg/hgTracks/cds.c
+++ src/hg/hgTracks/cds.c
@@ -972,30 +972,38 @@
mrnaSeq = newDnaSeq(cloneString(lf->extra), strlen(lf->extra), lf->extra);
if (lf->orientation == -1)
reverseComplement(mrnaSeq->dna, mrnaSeq->size);
}
else if (sameString("lrg", seqSource))
{
struct lrg *lrg = lf->original;
mrnaSeq = lrgReconstructSequence(lrg, database);
}
else if (startsWith("table ", seqSource))
{
char *table = seqSource;
nextWord(&table);
mrnaSeq = hGenBankGetMrna(database, name, table);
}
+else if (startsWithWord("db", seqSource))
+ {
+ char *sourceDb = seqSource;
+ nextWord(&sourceDb);
+ if (isEmpty(sourceDb))
+ sourceDb = database;
+ mrnaSeq = hChromSeq(sourceDb, name, 0, 0);
+ }
else
mrnaSeq = hGenBankGetMrna(database, name, NULL);
if (mrnaSeq != NULL)
touppers(mrnaSeq->dna);
return mrnaSeq;
}
static void makeCdsShades(struct hvGfx *hvg, Color *cdsColor)
/* setup CDS colors */
{
cdsColor[CDS_ERROR] = hvGfxFindColorIx(hvg,0,0,0);
cdsColor[CDS_ODD] = hvGfxFindColorIx(hvg,CDS_ODD_R,CDS_ODD_G,CDS_ODD_B);