1340926c015448621f1896176dbb3107f5468b28 hiram Fri Jul 5 15:33:42 2019 -0700 adding supported types altGraphX, barChart, chain refs #23589 diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile index 5410325..c681fba 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -1,44 +1,45 @@ -test:: test0 listFunctions getFunctions listSchema getSequence wigData \ - errorTests notSupported bugReports +test:: all -all:: listFunctions getFunctions getSequence wigData errorTests \ - notSupported +all:: test0 listFunctions getFunctions listSchema getSequence wigData \ + supportedTypes errorTests notSupported bugReports listFunctions: list01 list02 list03 list04 list05 list06 list07 list08 list09 \ list10 list11 list12 list13 list14 list15 getFunctions: test6 test7 test8 test9 test10 test11 test12 test13 test14 \ test15 test16 test19 test21 test26 test27 test28 \ test29 test39 test40 listSchema: schema01 schema02 schema03 schema04 schema05 getSequence: getSeq01 getSeq02 getSeq03 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 +supportedTypes: altGraphX barChart chain + 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 notSupported: notSup01 notSup02 notSup03 notSup04 notSup05 notSup06 \ - notSup07 notSup08 + notSup07 notSup08 notSup09 bugReports: redmine23733 setOutput: @if [ ! -d testOutput ]; then mkdir testOutput; fi clean:: rm -f testOutput/*.gz rmdir testOutput # exclude these lines from the JSON output for comparison with expected excludeLines = downloadTime|dataTime # testing /list/noSubCommand, /list/publicHubs and /list/ucscGenomes test0: setOutput @@ -671,30 +672,67 @@ @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -track="gc5Base" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # wiggle data from a track hub bigWig file, with chrom wig23: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/getData/track?track=gc5Base;chrom=chrCp;genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -track="gc5Base" -chrom="chrCp" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # wiggle data from a track hub bigWig file, with chrom, start, end wig24: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/getData/track?track=gc5Base;chrom=chrCp;genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt;end=5647;start=1234;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -track="gc5Base" -chrom="chrCp" -start=1234 -end=5647 -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz +############################################################################## +### supportedTypes - test both /list/chromosomes and /getData/track +### - for each type +############################################################################## + +altGraphX: setOutput + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=sibTxGraph;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="hg19" -track="sibTxGraph" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/getData/track?track=sibTxGraph;chrom=chr1;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome="hg19" -track="sibTxGraph" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +barChart: setOutput + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=gtexBrain;genome=hg38'\n" + @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="hg38" -track="gtexBrain" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/getData/track?track=gtexBrain;chrom=chr1;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome="hg38" -track="gtexBrain" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +chain: setOutput + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=chainMelGal1;genome=hg38'\n" + @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="hg38" -track="chainMelGal1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/getData/track?track=chainMelGal1;chrom=chr1;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome="hg38" -track="chainMelGal1" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# clonePos does not have an 'as' definiton in tableDescriptions +clonePos: setOutput + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=clonePos;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="hg19" -track="clonePos" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/getData/track?track=clonePos;chrom=chr1;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome="hg19" -track="clonePos" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c >> testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +############################################################################## +### notSupported +############################################################################## # request a track type that is not yet supported: bam notSup01: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/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" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://lasallelab.genomecenter.ucdavis.edu/UCSChub/hub.txt" -genome="hg19" -track="shMethylSubtrack" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # request a track type that is not yet supported: vcfTabix notSup02: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/getData/track?track=variants;chrom=chr1;genome=danRer11;hubUrl=http://research.nhgri.nih.gov/manuscripts/Burgess/zebrafish/downloads/NHGRI-1/hub.txt;jsonOutputArrays=1;maxItemsOutput=5'\n" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://research.nhgri.nih.gov/manuscripts/Burgess/zebrafish/downloads/NHGRI-1/hub.txt" -genome="danRer11" -track="variants" -chrom="chr1" -jsonOutputArrays -maxItemsOutput=5 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # request a track type that is not yet supported: gvf notSup03: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/getData/track?track=cnvDevDelayCase;genome=hg38'\n" @@ -719,30 +757,36 @@ @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track="gdcCancer" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # request chromosome list from a track that is a container, not a data track notSup07: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=gdcCancer;genome=hg38'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome=hg38 -track="gdcCancer" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # request chromosome list from a track that is a container, not a data track notSup08: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=allCancer;genome=hg38'\n" @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome=hg38 -track="allCancer" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz +# clonePos does not have an 'as' definiton in tableDescriptions +notSup09: setOutput + @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/chromosomes?track=clonePos;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/chromosomes" -genome="hg19" -track="clonePos" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + # 34 bam - not supported</li> # 2 bigBarChart - not supported</li> # 3 bigInteract - not supported</li> # 18 bigMaf - not supported</li> # 152 composite container - not supported</li> # 93 composite view - not supported</li> # 37 halSnake - not supported</li> # 31 superTrack child - not supported</li> # 5 vcfTabix - not supported</li> redmine23733: setOutput @printf "### $@ 'https://api-test.gi.ucsc.edu/getData/track?track=knownGene;genome=hg38;chrom=chr1;end=48000;start=47000'\n" @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=knownGene -chrom=chr1 -start=47000 -end=48000 2>&1 | sed -e 's/, /,\n/g;' | egrep -v "${excludeLines}" | tail -5 | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz