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/tests/makefile src/hg/hubApi/tests/makefile index f492eb0abb8..3f21e47ee43 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -49,31 +49,32 @@ listSchema: schema01 schema02 schema03 schema04 schema05 schema06 schema07 \ schema08 schema09 schema10 schema11 schema12 getSequence: getSeq01 getSeq02 getSeq03 getSeq04 getSeq05 getSeq06 getSeq07 wigData: wig01 wig02 wig03 wig04 wig05 wig06 wig07 wig08 wig09 wig10 \ wig11 wig12 wig13 wig14 wig15 wig16 wig17 wig18 wig19 wig20 \ wig21 wig22 wig23 wig24 search: search01 chrAlias: chrAlias01 chrAlias02 chrAlias03 chrAlias04 chrAlias05 chrAlias06 \ chrAlias07 chrAlias08 chrAlias09 chrAlias10 chrAlias11 supportedTypes: altGraphX barChart chain ctgPos expRatio \ - interact netAlign peptideMapping pgSnp bigDbSnp bigMaf bigChain + interact netAlign peptideMapping pgSnp bigDbSnp bigMaf bigChain \ + bigNarrowPeak supportedTypes0: altGraphX barChart chain ctgPos expRatio factorSource gvf \ interact netAlign peptideMapping pgSnp errorTests: err01 err02 err03 err04 err05 err06 err07 err08 err09 err10 \ err11 err12 err13 err14 err15 err16 err17 err18 err19 err20 \ err21 err22 err23 err24 err25 err26 err27 err28 err29 err30 \ err31 err32 err33 err34 err35 err36 err37 err38 err39 err40 \ err41 err42 err43 err44 err45 err46 err47 err48 err49 err50 \ err51 err52 err53 notSupported: notSup01 notSup02 notSup03 notSup07 notSup10 bugReports: redmine24089a redmine24089b redmine24666 redmine25840 @@ -1357,30 +1358,42 @@ @printf "### $@ '${SERVERNAME}/getData/track?track=dbSnp153Mult;chrom=chr1;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="hg38" -track="dbSnp153Mult" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz @printf "### $@ '${SERVERNAME}/list/schema?track=dbSnp153Mult;genome=hg38'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/schema" -genome="hg38" -track="dbSnp153Mult" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c >> testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz bigMaf: setOutput @printf "### $@ '${SERVERNAME}/list/chromosomes?track=rbestNetHs1;genome=hg38'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hg38" -track="rbestNetHs1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @printf "### $@ '${SERVERNAME}/getData/track?track=rbestNetHs1;chrom=chr1;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="hg38" -track="rbestNetHs1" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz @printf "### $@ '${SERVERNAME}/list/schema?track=rbestNetHs1;genome=hg38'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/schema" -genome="hg38" -track="rbestNetHs1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c >> testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz +# bigNarrowPeak was missing from allowedBigBedType() so none of these three +# endpoints worked for it: /list/chromosomes crashed the CGI and the other two +# reported the bigDataUrl as missing, refs #38395 +bigNarrowPeak: setOutput + @printf "### $@ '${SERVERNAME}/list/chromosomes?track=fiberSeqCompendium_PM00001_peaks;genome=hg38'\n" + @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hg38" -track="fiberSeqCompendium_PM00001_peaks" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @printf "### $@ '${SERVERNAME}/getData/track?track=fiberSeqCompendium_PM00001_peaks;chrom=chr21;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="hg38" -track="fiberSeqCompendium_PM00001_peaks" -chrom="chr21" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz + @printf "### $@ '${SERVERNAME}/list/schema?track=fiberSeqCompendium_PM00001_peaks;genome=hg38'\n" + @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/schema" -genome="hg38" -track="fiberSeqCompendium_PM00001_peaks" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c >> testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + bigChain: setOutput @printf "### $@ '${SERVERNAME}/list/chromosomes?track=chainSynGCA_011100615.1;genome=hg38'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hg38" -track="chainSynGCA_011100615.1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @printf "### $@ '${SERVERNAME}/getData/track?track=chainSynGCA_011100615.1;chrom=chr1;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="hg38" -track="chainSynGCA_011100615.1" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz @printf "### $@ '${SERVERNAME}/list/schema?track=chainSynGCA_011100615.1;genome=hg38'\n" @./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/schema" -genome="hg38" -track="chainSynGCA_011100615.1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c >> testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz ############################################################################## ### notSupported ############################################################################## # request a track type that is not yet supported: bam notSup01: setOutput @printf "### $@ '${SERVERNAME}/cgi-bin/hubApi/getData/track?track=shMethylSubtrack;chrom=chr1;genome=hg19;hubUrl=http://lasallelab.genomecenter.ucdavis.edu/UCSChub/hub.txt;jsonOutputArrays=1;maxItemsOutput=5'\n"