748c56e2d262310331911bee681b3608d7879051 hiram Fri Oct 11 14:07:48 2019 -0700 adding track types bigBarChart bigInteract clonePos refs #23589 diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile index 87fd1d4..656dc24 100644 --- src/hg/hubApi/tests/makefile +++ src/hg/hubApi/tests/makefile @@ -1,30 +1,31 @@ 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 test45 test46 test47 + test29 test39 test40 test41 test42 test43 test44 test45 test46 test47 \ + test48 test49 test50 test51 test52 test53 test54 test55 test56 listSchema: schema01 schema02 schema03 schema04 schema05 schema06 schema07 \ - schema08 schema09 + schema08 schema09 schema10 schema11 schema12 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 \ @@ -297,30 +298,84 @@ @./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 +# get data from bigBarChart track +test48: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=gtexTranscExpr;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=gtexTranscExpr -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigBarChart track with chrom specified +test49: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=gtexTranscExpr;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr22'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=gtexTranscExpr -maxItemsOutput=5 -jsonOutputArrays -chrom=chr22 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigBarChart track with chrom and start,end specified +test50: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=gtexTranscExpr;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=gtexTranscExpr -maxItemsOutput=5 -jsonOutputArrays -chrom=chr21 -start=20000000 -end=30000000 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigInteract track +test51: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=geneHancerInteractions;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=geneHancerInteractions -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigInteract track with chrom specified +test52: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=geneHancerInteractions;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr22'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=geneHancerInteractions -maxItemsOutput=5 -jsonOutputArrays -chrom=chr22 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from bigInteract track with chrom and start,end specified +test53: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=geneHancerInteractions;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=geneHancerInteractions -maxItemsOutput=5 -jsonOutputArrays -chrom=chr21 -start=20000000 -end=30000000 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from clonePos track +test54: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=clonePos;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=clonePos -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from clonePos track with chrom specified +test55: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=clonePos;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr22'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=clonePos -maxItemsOutput=5 -jsonOutputArrays -chrom=chr22 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# get data from clonePos track with chrom and start,end specified +test56: setOutput + @printf "### $@ ### 'https://api-test.gi.soe.ucsc.edu/getData/track?track=clonePos;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n" + @./jsonConsumer.pl -endpoint="/getData/track" -genome=hg19 -track=clonePos -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 @@ -383,30 +438,48 @@ @./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 +# list schema for bigBarChart table type +schema10: setOutput + @printf "### $@ 'https://api-test.gi.ucsc.edu/list/schema?track=gtexTranscExpr;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg19" -track=gtexTranscExpr | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# list schema for bigInteract table type +schema11: setOutput + @printf "### $@ 'https://api-test.gi.ucsc.edu/list/schema?track=geneHancerInteractions;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg19" -track=geneHancerInteractions | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz + @zdiff expected/$@.gz testOutput/$@.gz + +# list schema for clonePos table type +schema12: setOutput + @printf "### $@ 'https://api-test.gi.ucsc.edu/list/schema?track=clonePos;genome=hg19'\n" + @./jsonConsumer.pl -endpoint="/list/schema" -genome="hg19" -track=clonePos | 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