e1a1fb5375a5511bd57e4fb67182e7fa8627b37b
hiram
  Wed Mar 22 11:11:50 2023 -0700
add some tests on hs1 refs #30544

diff --git src/hg/hubApi/tests/makefile src/hg/hubApi/tests/makefile
index 9658baa..4eed613 100644
--- src/hg/hubApi/tests/makefile
+++ src/hg/hubApi/tests/makefile
@@ -17,50 +17,52 @@
   SERVERNAME=\"https://genome-test.gi.ucsc.edu\" make test8\n"
 
 hgwdev::
 	SERVERNAME="https://api-test.gi.ucsc.edu" make test
 
 alpha::
 	SERVERNAME="https://genome-test.gi.ucsc.edu" make test
 
 beta::
 	SERVERNAME="https://apibeta.soe.ucsc.edu" make test
 
 all:: test0 listFunctions getFunctions listSchema getSequence wigData \
 	search supportedTypes errorTests notSupported bugReports
 
 listFunctions: list01 list02 list03 list04 list05 list06 list07 list08 list09 \
-	list10 list11 list12 list13 list14 list15 list16 list17 list18
+	list10 list11 list12 list13 list14 list15 list16 list17 list18 list19 \
+	list20 list21
 
 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 \
 	test48 test49 test50 test51 test52 test53 test54 test55 test56 test57 \
-	multiTrack1
+	multiTrack01
 
 listSchema: schema01 schema02 schema03 schema04 schema05 schema06 schema07 \
 	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
 
 search: search01
 
-chrAlias: chrAlias01 chrAlias02 chrAlias03 chrAlias04 chrAlias05 chrAlias06
+chrAlias: chrAlias01 chrAlias02 chrAlias03 chrAlias04 chrAlias05 chrAlias06 \
+	chrAlias07 chrAlias08 chrAlias09
 
 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 \
 	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
 
 notSupported: notSup01 notSup02 notSup03 notSup07 notSup10
 
@@ -191,30 +193,48 @@
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="equCab3" -track="transMapEnsemblV5" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # list chromosomes for a bigWig track=gc5BaseBw genome=rheMac10
 list17: setOutput
 	@printf "### $@ '${SERVERNAME}/list/chromosomes?track=gc5BaseBw;genome=rheMac10'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="rheMac10" -track="gc5BaseBw" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # list chromosomes for a wigMaf table track=multiz7way genome=hg38
 list18: setOutput
 	@printf "### $@ '${SERVERNAME}/list/chromosomes?track=multiz7way;genome=hg38'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hg38" -track="multiz7way" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
+# list chromosomes for a 'curated' assembly track=assembly genome=hs1
+list19: setOutput
+	@printf "### $@ '${SERVERNAME}/list/chromosomes?track=assembly;genome=hs1'\n"
+	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hs1" -track="assembly" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
+# testing /list/tracks? for a 'curated' assembly genome=hs1 trackLeavesOnly
+list20: setOutput
+	@printf "### $@ '${SERVERNAME}/list/tracks?trackLeavesOnly=1;genome=hs1'\n"
+	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/tracks" -genome="hs1" -trackLeavesOnly 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
+# testing /list/chromosomes?genome=hs1 - a 'curated' assembly
+list21: setOutput
+	@printf "### $@ '${SERVERNAME}/list/chromosomes?genome=hs1'\n"
+	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hs1" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
 ##########################   getData functions  #############################
 # testing /getData/track?genome=ce11&track=gold
 test8: setOutput
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -maxItemsOutput=123 -endpoint="/getData/track" -genome="ce11" -track="gold" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/track?genome=ce11&track=gold&chrom=chrM
 test9: setOutput
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="ce11" -track="gold" -chrom="chrM" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/track?genome=ce11&track=gold&chrom=chrI&start=1&end=1024
 test10: setOutput
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome="ce11" -track="gold" -chrom="chrI" -start=1 -end=1024 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
@@ -390,35 +410,43 @@
 # get data from clonePos track with chrom and start,end specified
 test56: setOutput
 	@printf "### $@ ### '${SERVERNAME}/getData/track?track=clonePos;genome=hg19;jsonOutputArrays=1;maxItemsOutput=5;chrom=chr21;start=20000000;end=30000000'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -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
 
 # https://hgwdev-hiram.gi.ucsc.edu/cgi-bin/hubApi/getData/track?genome=ce11;track=mrna;maxItemsOutput=5
 
 # PSL track, no chrom specified, exercise column name tName instead of chrom
 test57: setOutput
 	@printf "### $@ ### '${SERVERNAME}/getData/track?track=mrna;genome=ce11;jsonOutputArrays=1;maxItemsOutput=5'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome=ce11 -track=mrna -maxItemsOutput=5 -jsonOutputArrays | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # getData but with multiple tracks
-multiTrack1:
+multiTrack01:
 	@printf "### $@ ### '${SERVERNAME}/getData/track?tracks=gold,gap;genome=hg38;jsonOutputArrays=1;chrom=chr2;start=16129261;end=16163278'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome=hg38 -track=gold,gap -jsonOutputArrays -chrom=chr2 -start=16129261 -end=16163278 | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
+### XXX ### THIS DOES NOT WORK - the sequence name in the assembly is chr2
+###           but the name in the track is CP068276.2
+###  can not decide what name to use to fetch data
+# getData but with multiple tracks from a 'curated' hub
+multiTrack02:
+	@printf "### $@ ### '${SERVERNAME}/getData/track?tracks=gc5Base;genome=hs1;jsonOutputArrays=1;chrom=chr2;start=16129261;end=16163278'\n"
+	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -genome=hs1 -track=gc5Base -jsonOutputArrays -chrom=chr2 -start=16129261 -end=16163278 | 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 -serverName="${SERVERNAME}" -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 -serverName="${SERVERNAME}" -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
@@ -1004,43 +1032,47 @@
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # chrom alias on an assembly hub
 chrAlias05: setOutput
 	@ printf "### $@ '${SERVERNAME}/getData/track?genome=GCF_000001735.4;track=assembly;chrom=chrPltd;hubUrl=https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -hubUrl="https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt" -genome="GCF_000001735.4" -track="assembly" -chrom="chrPltd" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/getData#/getData#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # chrom alias on an assembly hub
 chrAlias06: setOutput
 	@ printf "### $@ '${SERVERNAME}/getData/track?genome=GCF_000001735.4;track=assembly;chrom=Pltd;hubUrl=https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/track" -hubUrl="https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt" -genome="GCF_000001735.4" -track="assembly" -chrom="Pltd" | egrep -v "${excludeLines}" | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/sequence? hubUrl genome=GCF_000001735.4&chrom=Pltd&start=4321&end=5647
-# Pltd
 chrAlias07: setOutput
 	@ printf "### $@ '${SERVERNAME}/getData/sequence?genome=GCF_000001735.4;chrom=Pltd;start=4321;end=5678;hubUrl=https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/sequence" -hubUrl="https://hgdownload.soe.ucsc.edu/hubs/GCF/000/001/735/GCF_000001735.4/hub.txt" -genome="GCF_000001735.4" -chrom="Pltd" -start=4321 -end=5678 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/sequence#/sequence#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
 # testing /getData/sequence? genome=hg19&chrom=MT&start=4321&end=5647
-# Pltd
 chrAlias08: setOutput
 	@ printf "### $@ '${SERVERNAME}/getData/sequence?genome=hg19;chrom=MT;start=4321;end=5678'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/sequence" -genome="hg19" -chrom="MT" -start=4321 -end=5678 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/sequence#/sequence#;' | gzip -c > testOutput/$@.gz
 	@zdiff expected/$@.gz testOutput/$@.gz
 
+# testing /getData/sequence? genome=hs1&chrom=MT&start=4321&end=5647
+chrAlias09: setOutput
+	@ printf "### $@ '${SERVERNAME}/getData/sequence?genome=hs1;chrom=MT;start=4321;end=5678'\n"
+	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/getData/sequence" -genome="hs1" -chrom="MT" -start=4321 -end=5678 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/sequence#/sequence#;' | gzip -c > testOutput/$@.gz
+	@zdiff expected/$@.gz testOutput/$@.gz
+
 ##############################################################################
 ### supportedTypes - test both /list/chromosomes and /getData/track
 ###                - for each type
 ##############################################################################
 
 altGraphX: setOutput
 	@printf "### $@ '${SERVERNAME}/list/chromosomes?track=sibTxGraph;genome=hg19'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -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 -serverName="${SERVERNAME}" -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 "### $@ '${SERVERNAME}/list/chromosomes?track=gtexBrain;genome=hg38'\n"
 	@./jsonConsumer.pl -serverName="${SERVERNAME}" -endpoint="/list/chromosomes" -genome="hg38" -track="gtexBrain" 2>&1 | egrep -v "${excludeLines}" | sed -e 's#https://.*/list#/list#;' | gzip -c > testOutput/$@.gz