ae31cb7c9cb0b29fe6a23e7f96e3ad2b8d55f9d3
chmalee
  Thu Sep 21 16:46:47 2023 -0700
Fill in missing bedList field for narrowPeak custom tracks, refs #32262

diff --git src/hg/lib/customFactory.c src/hg/lib/customFactory.c
index 1234f4a..ce321f8 100644
--- src/hg/lib/customFactory.c
+++ src/hg/lib/customFactory.c
@@ -858,30 +858,31 @@
 char *db = ctGenomeOrCurrent(track);
 struct encodePeak *peakList = NULL;
 enum encodePeakType pt = encodePeakInferType(track->fieldCount, track->tdb->type);
 if (!dbRequested)
     errAbort("encodePeak custom track type unavailable without custom trash database. Please set that up in your hg.conf");
 while ((line = customFactoryNextRealTilTrack(cpp)) != NULL)
     {
     char *row[ENCODE_PEAK_KNOWN_FIELDS];
     int wordCount = chopLine(line, row);
     struct lineFile *lf = cpp->fileStack;
     lineFileExpectAtLeast(lf, track->fieldCount, wordCount);
     struct encodePeak *peak = customTrackEncodePeak(db, row, pt, chromHash, lf);
     slAddHead(&peakList, peak);
     }
 slReverse(&peakList);
+track->bedList = (struct bed *)peakList;
 return encodePeakFinish(track, peakList, pt);
 }
 
 static struct customFactory encodePeakFactory =
 /* Factory for bed tracks */
     {
     NULL,
     "encodePeak",
     encodePeakRecognizer,
     encodePeakLoader,
     };
 
 /*** bedDetail Factory - close to bed but added fields for detail page ***/
 
 static boolean bedDetailRecognizer(struct customFactory *fac,