13b584581e6d7b1860e0cab97adc3594b1899308 braney Mon Aug 7 12:05:10 2023 -0700 add instaPort to bigBed support diff --git src/hg/hgTracks/simpleTracks.c src/hg/hgTracks/simpleTracks.c index 5b076d8..997059d 100644 --- src/hg/hgTracks/simpleTracks.c +++ src/hg/hgTracks/simpleTracks.c @@ -5136,46 +5136,57 @@ tg->itemHeight = tgFixedItemHeight; tg->itemStart = linkedFeaturesSeriesItemStart; tg->itemEnd = linkedFeaturesSeriesItemEnd; } struct linkedFeatures *lfFromBedExtra(struct bed *bed, int scoreMin, int scoreMax) /* Return a linked feature from a (full) bed. */ { struct linkedFeatures *lf; struct simpleFeature *sf, *sfList = NULL; int grayIx = grayInRange(bed->score, scoreMin, scoreMax); int *starts = bed->chromStarts, start; int *sizes = bed->blockSizes; int blockCount = bed->blockCount, i; -assert(starts != NULL && sizes != NULL && blockCount > 0); +//assert(starts != NULL && sizes != NULL && blockCount > 0); AllocVar(lf); lf->grayIx = grayIx; lf->name = cloneString(bed->name); lf->orientation = orientFromChar(bed->strand[0]); +if (sizes == NULL) + { + AllocVar(sf); + sf->start = bed->chromStart; + sf->end = bed->chromEnd; + sf->grayIx = grayIx; + slAddHead(&sfList, sf); + } +else + { for (i=0; i<blockCount; ++i) { AllocVar(sf); start = starts[i] + bed->chromStart; sf->start = start; sf->end = start + sizes[i]; sf->grayIx = grayIx; slAddHead(&sfList, sf); } slReverse(&sfList); + } lf->components = sfList; linkedFeaturesBoundsAndGrays(lf); lf->tallStart = bed->thickStart; lf->tallEnd = bed->thickEnd; lf->score = bed->score; return lf; } struct linkedFeaturesSeries *lfsFromColoredExonBed(struct bed *bed) /* Convert a single BED 14 thing into a special linkedFeaturesSeries */ /* where each linkedFeatures is a colored block. */ { struct linkedFeaturesSeries *lfs; struct linkedFeatures *lfList = NULL; int *starts = bed->chromStarts;