fcda64e213150b3bd0ade930139e2893e1da42a4 braney Tue Aug 4 12:09:19 2015 -0700 first cut at bigPsl support in the browser. #14241 diff --git src/hg/hgTracks/cds.c src/hg/hgTracks/cds.c index 011b018..dc850b5 100644 --- src/hg/hgTracks/cds.c +++ src/hg/hgTracks/cds.c @@ -646,31 +646,35 @@ if (drawOpt == baseColorDrawItemBases || drawOpt == baseColorDrawDiffBases) { int grayIx = pslGrayIx(psl, isXeno, maxShade); sfList = sfFromPslX(psl, grayIx, sizeMul); } else { /* Previous code didn't use exon frames for baseColorDrawGenomicCodons. * This meant simply counting off aligned bases to define frames. It * didn't work very well for TransMap alignments and not clear that its * the right thing to do for any alignment. By using exonFrames for * genomic codons, this is letting the query sequence define the frame. */ struct genbankCds cds; + if (startsWith("bigPsl", tg->tdb->type)) + genbankCdsParse(lf->cds, &cds); + else getPslCds(psl, tg, &cds); + int insertMergeSize = -1; unsigned opts = genePredCdsStatFld|genePredExonFramesFld; struct genePred *gp = genePredFromPsl2(psl, opts, &cds, insertMergeSize); lf->start = gp->txStart; lf->end = gp->txEnd; lf->tallStart = gp->cdsStart; lf->tallEnd = gp->cdsEnd; sfList = baseColorCodonsFromGenePred(lf, gp, colorStopStart, FALSE); genePredFree(&gp); } return(sfList); } @@ -1818,30 +1822,31 @@ * baseColorInitTrack must be called before this (in tg->drawItems) -- * this is meant to be called by tg->drawItemAt (i.e. linkedFeaturesDrawAt). */ { enum baseColorDrawOpt drawOpt = baseColorGetDrawOpt(tg); boolean indelShowDoubleInsert, indelShowQueryInsert, indelShowPolyA; indelEnabled(cart, (tg ? tg->tdb : NULL), basesPerPixel, &indelShowDoubleInsert, &indelShowQueryInsert, &indelShowPolyA); if (drawOpt <= baseColorDrawOff && !(indelShowQueryInsert || indelShowPolyA)) return drawOpt; checkTrackInited(tg, "calling baseColorDrawSetup"); /* If we are using item sequence, fetch alignment and sequence: */ if ((drawOpt > baseColorDrawOff && (startsWith("psl", tg->tdb->type) || + sameString("bigPsl", tg->tdb->type) || sameString("lrg", tg->tdb->track))) || indelShowQueryInsert || indelShowPolyA) { if (sameString("lrg", tg->tdb->track)) *retPsl = lrgToPsl(lf->original, hChromSize(database, chromName)); else *retPsl = (struct psl *)(lf->original); if (*retPsl == NULL) return baseColorDrawOff; } if (drawOpt == baseColorDrawItemBases || drawOpt == baseColorDrawDiffBases || drawOpt == baseColorDrawItemCodons || drawOpt == baseColorDrawDiffCodons || indelShowPolyA)