3b8b0dfa4a74833c50166b85257ebaf1affe5a06 hiram Thu Oct 10 16:35:41 2019 -0700 adding bigLolly type support diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile index 800fc33..87fd1d4 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -1,30 +1,30 @@ test:: all 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 list16 list17 list18 getFunctions: test8 test9 test10 test11 test12 test13 test14 \ test15 test16 test19 test21 test26 test27 test28 \ - test29 test39 test40 test41 test42 test43 test44 + test29 test39 test40 test41 test42 test43 test44 test45 test46 test47 listSchema: schema01 schema02 schema03 schema04 schema05 schema06 schema07 \ - schema08 + schema08 schema09 getSequence: getSeq01 getSeq02 getSeq03 getSeq04 getSeq05 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 ctgPos expRatio \ interact netAlign peptideMapping pgSnp 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 \ @@ -279,30 +279,48 @@ @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=multiz7way -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # get data from wigMaf database table with chrom specified test43: setOutput @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=multiz7way;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr22'\n" @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=multiz7way -maxItemsOutput=5 -jsonOutputArrays -chrom=chr22 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # get data from wigMaf database table with chrom and start,end specified test44: setOutput @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=multiz7way;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n" @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=multiz7way -maxItemsOutput=5 -jsonOutputArrays -chrom=chr21 -start=20000000 -end=30000000 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz +# get data from bigLolly track +test45: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=BLCA;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=BLCA -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigLolly track with chrom specified +test46: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=BLCA;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr22'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=BLCA -maxItemsOutput=5 -jsonOutputArrays -chrom=chr22 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigLolly track with chrom and start,end specified +test47: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=BLCA;genome=hg38;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg38 -track=BLCA -maxItemsOutput=5 -jsonOutputArrays -chrom=chr21 -start=20000000 -end=30000000 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + ############################################################################### # /getData/sequence testing ############################################################################### # testing /getData/sequence? hubUrl genome=hg19&chrom=chrCp&start=4321&end=5647 getSeq01: setOutput @printf "### $@ " @./jsonConsumer.pl -endpoint="/getData/sequence" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -chrom="chrCp" -start=4321 -end=5678 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # testing /getData/sequence? hubUrl Bejerano genome=hg19&chrom=chrM&start=4321&end=5647 getSeq02: setOutput @printf "### $@ " @./jsonConsumer.pl -endpoint="/getData/sequence" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/GillBejerano/hub.txt" -genome="hg19" -chrom="chrM" -start=4321 -end=5678 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz @@ -359,30 +377,36 @@ @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg38" -track=crispr10KTargets | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # list schema for bigWig file with table and bigWig file schema07: setOutput @printf "### $@ 'https://hgwdev-hiram.gi.ucsc.edu/list/schema?track=gc5BaseBw;genome=ce11'\n" @./jsonConsumer.pl -endpoint="/list/schema" -genome="ce11" -track=gc5BaseBw | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # list schema for wigMaf table type schema08: setOutput @printf "### $@ 'https://api-test.gi.ucsc.edu/list/schema?track=multiz7way;genome=hg38'\n" @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg38" -track=multiz7way | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz +# list schema for bigLolly table type +schema09: setOutput + @printf "### $@ 'https://api-test.gi.ucsc.edu/list/schema?track=BLCA;genome=hg38'\n" + @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg38" -track=BLCA | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + ############################################################################### # ERROR testing ############################################################################### # generate an error: ask for non-existent chrom in a track hub # /getData/track? hubUrl Plants &track=assembly&chrom=chrI&start=1&end=14309681 err01: setOutput @printf "### $@ https://hgwdev-api.gi.ucsc.edu/getData/track?track=assembly;chrom=chrI;genome=araTha1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt;end=14309681;start=1\n" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/Plants/hub.txt" -genome="araTha1" -track="assembly" -chrom="chrI" -start=1 -end=14309681 2>&1 | sed -e 's#https://.*/getData#/getData#;' | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz # error test, can not open bigWig file err02: setOutput @printf "### $@ https://hgwdev-api.gi.ucsc.edu/getData/track?track=gc5Base;chrom=chrA9;genome=braRap1;hubUrl=http://genome-test.gi.ucsc.edu/~hiram/hubs/bPlants/hub.txt\n" @./jsonConsumer.pl -endpoint="/getData/track" -hubUrl="http://genome-test.gi.ucsc.edu/~hiram/hubs/bPlants/hub.txt" -genome="braRap1" -track="gc5Base" -chrom=chrA9 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz @zdiff expected/$@.gz testOutput/$@.gz