0384fa0a17672e37966d89532192e9f61352c7cd kate Tue Jul 11 10:57:36 2017 -0700 Restore order of linked feature components after codon translation. Fixes bug with label display of split codons in pack mode. refs #19634 diff --git src/hg/hgTracks/peptideAtlasTrack.c src/hg/hgTracks/peptideAtlasTrack.c index f4db865..c480766 100644 --- src/hg/hgTracks/peptideAtlasTrack.c +++ src/hg/hgTracks/peptideAtlasTrack.c @@ -16,30 +16,31 @@ }; static DNA *dnaForLinkedFeature(struct linkedFeatures *lf, struct dnaBuf *dnaBuf) /* Return DNA string for all simple features in a linked feature using buffer of * genomic sequence in the browser window */ { struct dyString *dna = dyStringNew(0); struct simpleFeature *sf; // NOTE: odd this is needed slReverse(&lf->components); for (sf = lf->components; sf != NULL; sf = sf->next) { dyStringAppendN(dna, dnaBuf->dna + sf->start - dnaBuf->chromStart, sf->end - sf->start); } +slReverse(&lf->components); if (lf->orientation == -1) { reverseComplement(dna->string, strlen(dna->string)); } return dyStringCannibalize(&dna); } void linkedFeaturesRange(struct track *tg, int *minStart, int *maxEnd) /* Return minimum chromStart and maximum chromEnd for linked features in the track */ { if (minStart == NULL || maxEnd == NULL) errAbort("Internal error: peptideAtlas feature comparison (hide this track)"); *minStart = hChromSize(database, chromName); *maxEnd = 0; struct linkedFeatures *lf;