d6c216fa6a01dbd47ae3a8848d0b6456adf31a4b braney Mon Sep 21 17:31:58 2026 -0700 hubApi: serve bigNarrowPeak tracks, refs #38395 initSupportedTypes() advertises bigNarrowPeak but allowedBigBedType() left it out, so bigFileOpen() returned NULL for a type the API says it supports. Three endpoints were affected: /getData/track and /list/schema reported the bigDataUrl as missing although the file was there, and /list/chromosomes killed the CGI, because bigFileChromInfoOutput() passed the null bbi straight to bbiChromList(). Add bigNarrowPeak to allowedBigBedType(), guard the null in bigFileChromInfoOutput() so a future divergence between the two lists is a 415 rather than a crash, and note in each list that they have to agree. Adds a bigNarrowPeak test to the supportedTypes group covering all three endpoints. diff --git src/hg/hubApi/hubApi.c src/hg/hubApi/hubApi.c index c42aa2fb4fe..d8958a88a03 100644 --- src/hg/hubApi/hubApi.c +++ src/hg/hubApi/hubApi.c @@ -75,31 +75,34 @@ static boolean allTrackSettings = FALSE; /* checkbox setting */ static char **shortLabels = NULL; /* public hub short labels in array */ static int publicHubCount = 0; static char *defaultHub = "Synonymous Constraint"; static char *defaultDb = "ce11"; long enteredMainTime = 0; /* will become = clock1000() on entry */ /* to allow calculation of when to bail out, taking too long */ static long timeOutSeconds = 100; static boolean timedOut = FALSE; static char *urlPrefix = ""; /* initalized to support self references */ /* supportedTypes will be initialized to a known supported set */ struct slName *supportedTypes = NULL; static void initSupportedTypes() -/* initalize the list of supported track types */ +/* initalize the list of supported track types + * a bed-like big* type added here must also be added to allowedBigBedType() + * in apiUtils.c, which is what actually opens the file + */ { struct slName *el = newSlName("bed"); slAddHead(&supportedTypes, el); el = newSlName("wig"); slAddHead(&supportedTypes, el); el = newSlName("wigMaf"); slAddHead(&supportedTypes, el); el = newSlName("broadPeak"); slAddHead(&supportedTypes, el); el = newSlName("narrowPeak"); slAddHead(&supportedTypes, el); el = newSlName("bigBed"); slAddHead(&supportedTypes, el); el = newSlName("bigWig"); slAddHead(&supportedTypes, el);