forked from goeckslab/hub-archive-creator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhubArchiveCreator.xml
1490 lines (1415 loc) · 75.4 KB
/
hubArchiveCreator.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<tool id="hubArchiveCreator" name="Hub Archive Creator" version="2.5.3">
<description>
This Galaxy tool permits to prepare your files to be ready for
Assembly Hub visualization.
</description>
<macros>
<import>macros.xml</import>
</macros>
<requirements>
<requirement type="package" version="340">ucsc_hac</requirement>
<requirement type="package" version="1.2">samtools</requirement>
<requirement type="package" version="340">ucsc_bigwig</requirement>
<requirement type="package" version="340">ucsc_bigbed</requirement>
</requirements>
<stdio>
<regex match="^pass1"
source="stderr"
level="log"
description="bedToBigBed"/>
<!-- TODO: Add the case pass1 and 0 chroms -->
<!-- TODO: Add the case pass2 and 0 records or 0 fields -->
</stdio>
<!-- Idea: python \ -augustus [parameters] \ -trfBig [parameters] -->
<command detect_errors="exit_code"><![CDATA[
mkdir -p $output.extra_files_path;
## Dump the tool parameters into a JSON file
python $json_file parameters.json;
python $__tool_directory__/hubArchiveCreator.py --data_json parameters.json -o $output;
]]></command>
<environment_variables>
<!-- Sort uppercase letters before lowercase (required by UCSC tools) -->
<environment_variable name="LC_COLLATE">C</environment_variable>
</environment_variables>
<configfiles>
<configfile name="json_file">
import json
import sys
file_path = sys.argv[1]
#set global $data_parameter_dict = {}
## Ask the user to enter the genome name
#silent $data_parameter_dict.update({"genome_name": str($genome_name)})
## Function to retrieve the data of the inputs
#def prepare_json($datatype, $input_to_prepare, $order_index, $extra_data_dict={})
#set false_path = str($input_to_prepare)
#set $data_dict = {"false_path": $false_path}
#set name = str($input_to_prepare.name)
#silent $data_dict.update({"name": $name})
#silent $data_dict.update($extra_data_dict)
## Add the ordering by taking the tool form indexes
#silent $data_dict.update({"order_index": $order_index})
#if $datatype in $data_parameter_dict
#silent $data_parameter_dict[$datatype].append($data_dict)
#else
#set array_inputs = []
#silent $array_inputs.append($data_dict)
#silent $data_parameter_dict.update({$datatype: $array_inputs})
#end if
#end def
## Get the number of digits from tracks, to have a unique integer from group index and track index
#set temp_max_digit = 0
#for $g in $group
#if len($g.format) > $temp_max_digit
#silent temp_max_digit = len($g.format)
#end if
#end for
#set nb_digits_max_track = len(str($temp_max_digit))
## END Get the number of digits
#for $i_g, $g in enumerate( $group )
#for $i, $f in enumerate( $g.format )
## Create the order index using index_group+1 concatenated with index_track
#set index_group_final = str($i_g + 1)
#set index_track_final = str($index_group_final) + str($i).zfill($nb_digits_max_track)
## For each format, we have a few mandatory fields we store in a dict
#set track_color = str($f.formatChoice.track_color)
#set group_name = str($g.group_name)
#set longLabel = str($f.formatChoice.longLabel)
#set extra_data_dict = {"track_color": $track_color,
"group_name": $group_name,
"long_label": $longLabel}
#if $f.formatChoice.format_select == "bam"
#set bam_index = $f.formatChoice.BAM.metadata.bam_index
## Add Bam format specific fields
#silent $extra_data_dict.update({"index": $bam_index})
#silent $prepare_json("Bam", $f.formatChoice.BAM, $index_track_final, $extra_data_dict)
#end if
#if $f.formatChoice.format_select == "bed"
#if $f.formatChoice.bedChoice.bed_select == "bed_generic"
#silent $prepare_json("Bed", $f.formatChoice.bedChoice.BED, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.bedChoice.bed_select == "bed_cytoBand"
#silent $prepare_json("CytoBand", $f.formatChoice.bedChoice.BED_cytoBand, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.bedChoice.bed_select == "bed_simple_repeats_option"
#silent $prepare_json("BedSimpleRepeats", $f.formatChoice.bedChoice.BED_simple_repeats, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.bedChoice.bed_select == "bed_splice_junctions_option"
#silent $prepare_json("BedSpliceJunctions", $f.formatChoice.bedChoice.BED_splice_junctions, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.bedChoice.bed_select == "bed_blast_alignment_option"
#set database = str($f.formatChoice.bedChoice.database)
#silent $extra_data_dict.update({"database": $database})
#if $f.formatChoice.bedChoice.add_trix_index.add_trix_index_selector == "yes"
#for i in $f.formatChoice.bedChoice.add_trix_index.trix_index
#if $i.element_identifier.endswith("ix")
#$extra_data_dict.update({"index_ix": str($i)})
#elif $i.element_identifier.endswith("ixx")
#$extra_data_dict.update({"index_ixx": str($i)})
#end if
#end for
##set ix_index = str($f.formatChoice.bedChoice.add_trix_index.trix_index.index_ix)
##set ixx_index = str($f.formatChoice.bedChoice.add_trix_index.trix_index.index_ixx)
##silent $extra_data_dict.update({"indexIx": $ix_index, "indexIxx": $ixx_index})
#end if
#silent $prepare_json("BedBlastAlignments", $f.formatChoice.bedChoice.BED_blast_alignment, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.bedChoice.bed_select == "bed_blat_alignment_option"
#set database = str($f.formatChoice.bedChoice.database)
#silent $extra_data_dict.update({"database": $database})
#if $f.formatChoice.bedChoice.add_trix_index.add_trix_index_selector == "yes"
#for i in $f.formatChoice.bedChoice.add_trix_index.trix_index
#if $i.element_identifier.endswith("ix")
#$extra_data_dict.update({"index_ix": str($i)})
#elif $i.element_identifier.endswith("ixx")
#$extra_data_dict.update({"index_ixx": str($i)})
#end if
#end for
##set ix_index = str($f.formatChoice.bedChoice.add_trix_index.trix_index.index_ix)
##set ixx_index = str($f.formatChoice.bedChoice.add_trix_index.trix_index.index_ixx)
##silent $extra_data_dict.update({"indexIx": $ix_index, "indexIxx": $ixx_index})
#end if
#silent $prepare_json("BedBlatAlignments", $f.formatChoice.bedChoice.BED_blat_alignment, $index_track_final,
$extra_data_dict)
#end if
#end if
#if $f.formatChoice.format_select == "psl"
#silent $prepare_json("Psl", $f.formatChoice.PSL, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == "bigwig"
#silent $prepare_json("BigWig", $f.formatChoice.BIGWIG, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == "bigbed"
#if $f.formatChoice.add_trix_index.add_trix_index_selector == "yes"
##set ix_index = str($f.formatChoice.add_trix_index.trix_index.index_ix)
##set ixx_index = str($f.formatChoice.add_trix_index.trix_index.index_ixx)
#for i in $f.formatChoice.add_trix_index.trix_index
#if $i.element_identifier.endswith("ix")
#$extra_data_dict.update({"index_ix": str($i)})
#elif $i.element_identifier.endswith("ixx")
#$extra_data_dict.update({"index_ixx": str($i)})
#end if
#end for
#$extra_data_dict.update({"trix_id": str($f.formatChoice.add_trix_index.trix_id)})
##set trix_id = str($f.formatChoice.add_trix_index.trix_id)
##silent $extra_data_dict.update({"indexIx": $ix_index, "indexIxx": $ixx_index, "trix_id": $trix_id})
#end if
#silent $prepare_json("BigBed", $f.formatChoice.BIGBED, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == "gff3"
#silent $prepare_json("Gff3", $f.formatChoice.GFF3, $index_track_final,
$extra_data_dict)
#end if
#if $f.formatChoice.format_select == "gtf"
## Add also GTF from Agustus? See https://github.com/ENCODE-DCC/kentUtils/issues/8
#silent $prepare_json("Gtf", $f.formatChoice.GTF, $index_track_final,
$extra_data_dict)
#end if
#end for
#end for
## We combine the fasta file dataset name with his false path in a JSON object
#set fasta_json = {"false_path": str($fasta_file), "name": str($fasta_file.name)}
$data_parameter_dict.update({"fasta": $fasta_json})
## Retrieve the user email
#silent $data_parameter_dict.update({"user_email": str($__user_email__)})
#silent $data_parameter_dict.update({"tool_directory": str($__tool_directory__)})
#silent $data_parameter_dict.update({"extra_files_path": str($output.extra_files_path)})
#silent $data_parameter_dict.update({"debug_mode": str($advanced_options.debug_mode)})
with open(file_path, 'w') as f:
json.dump($data_parameter_dict, f)
</configfile>
</configfiles>
<inputs>
<param
name="genome_name"
type="text"
size="30"
value="unknown"
label="UCSC Genome Browser assembly ID"
/>
<param
format="fasta"
name="fasta_file"
type="data"
label="Reference genome"
/>
<repeat name="group" title="New group">
<param type="text" name="group_name" label="Group name" value="Default group"/>
<repeat name="format" title="New track">
<conditional name="formatChoice">
<param name="format_select" type="select" label="Format">
<option value="bam" selected="true">BAM</option>
<option value="bed">BED</option>
<option value="psl">PSL</option>
<option value="bigwig">BIGWIG</option>
<option value="bigbed">BIGBED</option>
<option value="gff3">GFF3</option>
<option value="gtf">GTF</option>
</param>
<when value="bam">
<param
format="bam"
name="BAM"
type="data"
label="BAM File"
/>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<!-- TODO: Find a solution to avoid repetition and to generate a new color depending on the others -->
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="bed">
<conditional name="bedChoice">
<param name="bed_select" type="select" label="Bed Choice">
<option value="bed_generic" selected="true">BED Generic</option>
<option value="bed_cytoBand">cytoBand Track (bed4+1)</option>
<option value="bed_simple_repeats_option">BED Simple repeat (bed4+12 / simpleRepeat.as)</option>
<option value="bed_splice_junctions_option">BED Splice junctions (bed12+1 / spliceJunctions.as)</option>
<option value="bed_blast_alignment_option">Blast alignments (bed12+12 / bigPsl.as)</option>
<option value="bed_blat_alignment_option">BLAT alignments (bigPsl / bigPsl.as)</option>
</param>
<when value="bed_generic">
<param
format="bed"
name="BED"
type="data"
label="Generic Bed File Choice"
/>
</when>
<when value="bed_cytoBand">
<param
format="bed"
name="BED_cytoBand"
type="data"
label="cytoBand Track (Bed4)"
/>
</when>
<when value="bed_simple_repeats_option">
<param
format="bed"
name="BED_simple_repeats"
type="data"
label="Bed Simple Repeats (Bed4+12) File"
/>
</when>
<when value="bed_splice_junctions_option">
<param
format="bed"
name="BED_splice_junctions"
type="data"
label="Bed Splice Junctions (Bed12+1) File"
/>
</when>
<when value="bed_blast_alignment_option">
<param
format="bed"
name="BED_blast_alignment"
type="data"
label="Bed Blast Alignments (Bed12+12) File"
/>
<param name="database" type="select" label="Protein database">
<option value="NCBI" selected="true">NCBI</option>
<option value="UniProt">UniProt</option>
<option value="FlyBase">FlyBase</option>
<option value="Others">Others</option>
</param>
<expand macro="add_trix_file"/>
</when>
<when value="bed_blat_alignment_option">
<param
format="bed"
name="BED_blat_alignment"
type="data"
label="Bed BLAT Alignments (bigPsl) File"
/>
<param name="database" type="select" label="mRNA database">
<option value="NCBI" selected="true">NCBI</option>
<option value="Others">Others</option>
</param>
<expand macro="add_trix_file"/>
</when>
</conditional>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="psl">
<param
format="psl"
name="PSL"
type="data"
label="PSL File"
/>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="bigwig">
<param
format="bigwig"
name="BIGWIG"
type="data"
label="BIGWIG File"
/>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="bigbed">
<param
format="bigbed"
name="BIGBED"
type="data"
label="BIGBED File"
/>
<expand macro="add_trix_file">
<param
name="trix_id"
value="name"
type="text"
size="30"
label="Specify Trix identifier (The default is name)"
/>
</expand>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="gff3">
<param
format="gff3"
name="GFF3"
type="data"
label="GFF3 File"
/>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
<when value="gtf">
<param
format="gtf"
name="GTF"
type="data"
label="GTF File"
/>
<param name="longLabel" type="text" size="76" label="Track label" help="It is limited to 76 printable characters, the first 17 printable characters will be used as a short label of the track" />
<param name="track_color" type="color" label="Track color" value="#000000">
<sanitizer>
<valid initial="string.letters,string.digits">
<add value="#"/>
</valid>
</sanitizer>
</param>
</when>
</conditional>
</repeat>
</repeat>
<conditional name="advanced_options">
<param name="advanced_options_selector" type="select" label="Advanced options">
<option value="off" selected="true">Hide advanced options</option>
<option value="on">Display advanced options</option>
</param>
<!-- TODO: Avoid redundancy here -->
<when value="on">
<param name="debug_mode" type="select" label="Activate debug mode">
<option value="false" selected="true">No</option>
<option value="true">Yes</option>
<help>
Use this option if you are a G-OnRamp developer
</help>
</param>
</when>
<when value="off">
<param name="debug_mode" type="hidden"
value="false">
</param>
</when>
</conditional>
</inputs>
<outputs>
<data format="trackhub" name="output"/>
</outputs>
<tests>
<!-- Test with only the fasta file -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<output name="output" file="only_genome/only_genome.html">
<!-- Use macro to check the whole common structure without repeated code -->
<expand macro="verify_hub_structure_no_track" test="only_genome" />
</output>
</test>
<!-- Test with Bam -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bam"/>
<param name="BAM" value="bam/inputs/HISAT2_Accepted_Hits.bam" />
<param name="longLabel" value="HISAT sequence alignment" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="bam/bam.html">
<!-- Verify tracks folder contains bam and bai -->
<extra_files type="file"
name="myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam"
value="bam/myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam"
compare="sim_size"
/>
<extra_files type="file"
name="myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam.bai"
value="bam/myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam.bai"
compare="sim_size"
/>
<!-- Use macro to check the whole common structure without repeated code -->
<expand macro="verify_hub_structure" test="bam" />
</output>
</test>
<!-- Test with Bed Generic -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_generic"/>
<param name="BED" ftype="bed" value="bed_generic/inputs/TBLASTN_Alignment_to_proteins"/>
<param name="longLabel" value="TBLASTN alignment" />
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_generic/bed_generic.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/TBLASTN_Alignment_to_proteins.bb"
value="bed_generic/myHub/Dbia3/tracks/TBLASTN_Alignment_to_proteins.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_generic" />
</output>
</test>
<!-- Test with Bed Simple repeat -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_simple_repeats_option"/>
<param name="BED_simple_repeats" ftype="bed" value="bed_simple_repeats/inputs/Repeating_Elements_by_TrfBig"/>
<param name="longLabel" value="Simple repeat" />
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_simple_repeats/bed_simple_repeats_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/Repeating_Elements_by_TrfBig.bb"
value="bed_simple_repeats/myHub/Dbia3/tracks/Repeating_Elements_by_TrfBig.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_simple_repeats" />
</output>
</test>
<!-- Test with Psl -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="psl"/>
<param name="PSL" value="psl/inputs/blastXmlToPsl"/>
<param name="longLabel" value="BLAST Alignment" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="psl/psl_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/blastXmlToPsl.bb"
value="psl/myHub/Dbia3/tracks/blastXmlToPsl.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="psl" />
</output>
</test>
<!-- Test with BigWig -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bigwig"/>
<param name="BIGWIG" value="bigwig/inputs/RNA-Seq_Alignment_Coverage"/>
<param name="longLabel" value="RNA-Seq Coverage" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="bigwig/bigwig.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/RNA-Seq_Alignment_Coverage.bigwig"
value="bigwig/myHub/Dbia3/tracks/RNA-Seq_Alignment_Coverage.bigwig"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bigwig" />
<!-- check additional trackDb settings for BigWig -->
<extra_files type="file" name="myHub/Dbia3/trackDb.txt">
<assert_contents>
<has_text text="autoScale"/>
<has_text text="maxHeightPixels"/>
<has_text text="windowingFunction"/>
</assert_contents>
</extra_files>
</output>
</test>
<!-- Test with GFF3 -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gff3"/>
<param name="GFF3" value="gff3/inputs/Augustus_Gene_Predictions"/>
<param name="longLabel" value="Augustus" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="gff3/gff3_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/Augustus_Gene_Predictions.bb"
value="gff3/myHub/Dbia3/tracks/Augustus_Gene_Predictions.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="gff3" />
</output>
</test>
<!-- Test with GTF -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gtf"/>
<param name="GTF" value="gtf/inputs/StringTie_Assembled_Transcripts"/>
<param name="longLabel" value="StringTie transcripts" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="gtf/gtf_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/StringTie_Assembled_Transcripts.bb"
value="gtf/myHub/Dbia3/tracks/StringTie_Assembled_Transcripts.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="gtf" />
</output>
</test>
<!-- Test with BLAT Alignment -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_blat_alignment_option"/>
<param name="BED_blat_alignment" ftype="bed" value="bed_blat_alignment/inputs/BLAT_alignment_bigpsl"/>
<param name="longLabel" value="BLAT alignment" />
<param name="track_color" value="#000000"/>
<param name="database" value="NCBI" />
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_blat_alignment/blat_alignment_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/BLAT_alignment_bigpsl.bb"
value="bed_blat_alignment/myHub/Dbia3/tracks/BLAT_alignment_bigpsl.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_blat_alignment" />
<!-- check additional trackDb settings for BLAT -->
<extra_files type="file" name="myHub/Dbia3/trackDb.txt">
<assert_contents>
<has_text text="searchIndex"/>
<has_text text="url"/>
<has_text text="urlLabel"/>
<has_text text="iframeUrl"/>
<has_text text="iframeOptions"/>
</assert_contents>
</extra_files>
</output>
</test>
<!-- Test with BLAST Alignment -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_blast_alignment_option"/>
<param name="BED_blast_alignment" ftype="bed" value="bed_blast_alignment/inputs/BLAST_alignment_bigpsl"/>
<param name="longLabel" value="BLAST alignment" />
<param name="track_color" value="#000000"/>
<param name="database" value="NCBI" />
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_blast_alignment/blast_alignment_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/BLAST_alignment_bigpsl.bb"
value="bed_blast_alignment/myHub/Dbia3/tracks/BLAST_alignment_bigpsl.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_blast_alignment" />
<!-- check additional trackDb settings for BLAST -->
<extra_files type="file" name="myHub/Dbia3/trackDb.txt">
<assert_contents>
<has_text text="searchIndex"/>
<has_text text="url"/>
<has_text text="urlLabel"/>
<has_text text="iframeUrl"/>
<has_text text="iframeOptions"/>
</assert_contents>
</extra_files>
</output>
</test>
<!-- Test with Regtools Splice Junctions -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_splice_junctions_option"/>
<param name="BED_splice_junctions" ftype="bed" value="bed_splice_junctions/inputs/regtools_junctions"/>
<param name="longLabel" value="Splice junctions" />
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_splice_junctions/splice_junctions_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/regtools_junctions.bb"
value="bed_splice_junctions/myHub/Dbia3/tracks/regtools_junctions.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_splice_junctions" />
</output>
</test>
<!-- Test with Cytoband -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_cytoBand"/>
<param name="BED_cytoBand" ftype="bed" value="bed_cytoband/inputs/Cytoband"/>
<param name="longLabel" value="Cytoband" />
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="bed_cytoband/cytoband_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/Cytoband.bb"
value="bed_cytoband/myHub/Dbia3/tracks/Cytoband.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="bed_cytoband" />
<extra_files type="file" name="myHub/Dbia3/trackDb.txt">
<assert_contents>
<has_text text="track cytoBandIdeo"/>
</assert_contents>
</extra_files>
</output>
</test>
<!-- Test with bigBed -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bigbed"/>
<param name="BIGBED" value="big_bed/inputs/BLAT_alignment_bigbed" />
<param name="longLabel" value="bigBed" />
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="big_bed/bigbed_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/BLAT_alignment_bigbed.bigbed"
value="big_bed/myHub/Dbia3/tracks/BLAT_alignment_bigbed.bigbed"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="big_bed" />
</output>
</test>
<!-- Test with one group and multiple tracks -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gtf"/>
<param name="GTF" value="gtf/inputs/StringTie_Assembled_Transcripts"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gff3"/>
<param name="GFF3" value="gff3/inputs/Augustus_Gene_Predictions"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
</repeat>
<output name="output" file="gtf_gff/gtf_gff_trackhub.html">
<extra_files type="file"
name="myHub/Dbia3/tracks/StringTie_Assembled_Transcripts.bb"
value="gtf/myHub/Dbia3/tracks/StringTie_Assembled_Transcripts.bb"
compare="sim_size"
/>
<extra_files type="file"
name="myHub/Dbia3/tracks/Augustus_Gene_Predictions.bb"
value="gff3/myHub/Dbia3/tracks/Augustus_Gene_Predictions.bb"
compare="sim_size"
/>
<expand macro="verify_hub_structure" test="gtf_gff" />
</output>
</test>
<!-- Test with one group and all the supported datatypes -->
<test>
<param name="genome_name" value="Dbia3"/>
<param name="fasta_file" value="common/dbia3.fa"/>
<repeat name="group">
<param name="group_name" value="Default group"/>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bam"/>
<param name="BAM" value="bam/inputs/HISAT2_Accepted_Hits.bam"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed"/>
<conditional name="bedChoice">
<param name="bed_select" value="bed_generic"/>
<param name="BED" ftype="bed" value="bed_generic/inputs/TBLASTN_Alignment_to_proteins"/>
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed"/>
<conditional name="bedChoice">
<param name="bed_select" value="bed_simple_repeats_option"/>
<param name="BED_simple_repeats" ftype="bed"
value="bed_simple_repeats/inputs/Repeating_Elements_by_TrfBig"/>
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="psl"/>
<param name="PSL" value="psl/inputs/blastXmlToPsl"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bigwig"/>
<param name="BIGWIG" value="bigwig/inputs/RNA-Seq_Alignment_Coverage"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gff3"/>
<param name="GFF3" value="gff3/inputs/Augustus_Gene_Predictions"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="gtf"/>
<param name="GTF" value="gtf/inputs/StringTie_Assembled_Transcripts"/>
<param name="track_color" value="#000000"/>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_cytoBand"/>
<param name="BED_cytoBand" ftype="bed" value="bed_cytoband/inputs/Cytoband"/>
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_splice_junctions_option"/>
<param name="BED_splice_junctions" ftype="bed" value="bed_splice_junctions/inputs/regtools_junctions"/>
<param name="track_color" value="#000000"/>
</conditional>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_blast_alignment_option"/>
<param name="BED_blast_alignment" ftype="bed" value="bed_blast_alignment/inputs/BLAST_alignment_bigpsl"/>
<param name="track_color" value="#000000"/>
<param name="database" value="NCBI" />
</conditional>
</conditional>
</repeat>
<repeat name="format">
<conditional name="formatChoice">
<param name="format_select" value="bed" />
<conditional name="bedChoice">
<param name="bed_select" value="bed_blat_alignment_option"/>
<param name="BED_blat_alignment" ftype="bed" value="bed_blat_alignment/inputs/BLAT_alignment_bigpsl"/>
<param name="track_color" value="#000000"/>
<param name="database" value="NCBI" />
</conditional>
</conditional>
</repeat>
</repeat>
<output name="output" file="all_datatypes/all_datatypes_trackhub.html">
<!-- verify tracks folder contains all the files -->
<extra_files type="file"
name="myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam"
value="all_datatypes/myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam"
compare="sim_size"
/>
<extra_files type="file"
name="myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam.bai"
value="all_datatypes/myHub/Dbia3/tracks/HISAT2_Accepted_Hits.bam.bai"
compare="sim_size"
/>
<extra_files type="file"
name="myHub/Dbia3/tracks/TBLASTN_Alignment_to_proteins.bb"
value="all_datatypes/myHub/Dbia3/tracks/TBLASTN_Alignment_to_proteins.bb"
compare="sim_size"
/>
<extra_files type="file"
name="myHub/Dbia3/tracks/Repeating_Elements_by_TrfBig.bb"
value="all_datatypes/myHub/Dbia3/tracks/Repeating_Elements_by_TrfBig.bb"
compare="sim_size"