1- <tool id =" scriptmanager_bam-to-bed" name =" ScriptManager: Convert BAM to BED" version =" 0.1.0+galaxy0 " python_template_version = " 3.5 " profile =" 21.05 " >
1+ <tool id =" scriptmanager_bam-to-bed" name =" ScriptManager: Convert BAM to BED" version =" 0.1.0" profile =" 22.01 " >
22 <description > Convert BAM file to BED file </description >
3+ <macros >
4+ <import >scriptmanager_macros.xml</import >
5+ </macros >
36 <requirements >
4- <requirement type =" package" version =" 11.0.11" >openjdk</requirement >
7+ <expand macro =" requirement_openjdk" />
8+ <expand macro =" requirement_samtools" />
59 </requirements >
610 <command detect_errors =" exit_code" ><![CDATA[
7- ln -s '$BAM' bamfile.bam &&
8- ln -s '$output1' output1.bed &&
9- #if $BAM.is_of_type('bam'):
10- #if str( $BAM.metadata.bam_index ) != "None":
11- ln -s '${BAM.metadata.bam_index}' bamfile.bam.bai &&
11+ ln -s '$input' bamfile.bam &&
12+ #if $input.is_of_type('bam'):
13+ #if str( $input.metadata.bam_index ) != "None":
14+ ln -s '${input.metadata.bam_index}' bamfile.bam.bai &&
1215 #else:
1316 samtools index bamfile.bam bamfile.bai &&
1417 #end if
1518 #end if
1619
17- java -jar $__tool_directory__/ScriptManager-v0.14.jar bam-format-converter bam-to-bed
20+ java -jar $__tool_directory__/@JAR_FILENAME@ bam-format-converter bam-to-bed
1821
22+ #if str($gzip) == "Yes" :
23+ --gzip
24+ #end if
1925 #if str($read) == "read_1" :
2026 -1
2127 #else if str($read) == "read_2" :
2733 #else if str($read) == "fragment" :
2834 -f
2935 #end if
30-
31- #if str($mate_pair) == "Yes" :
36+ #if str($require_paired_end.mate_pair) == "Yes" :
3237 -p
38+ #if str($require_paired_end.filter_by_min.filter_min) == "Yes" :
39+ -n "$require_paired_end.filter_by_min.min_insert"
40+ #end if
41+ #if str($require_paired_end.filter_by_max.filter_max) == "Yes" :
42+ -x "$require_paired_end.filter_by_max.max_insert"
43+ #end if
3344 #end if
34-
35- #if str($filter_by_min.filter_min) == "Yes" :
36- -n "$filter_by_min.min_insert"
37- #end if
38-
39- -o output1.bed
40-
41- #if str($filter_by_max.filter_max) == "Yes" :
42- -x "$filter_by_max.max_insert"
43- #end if
44-
45+ -o '$output'
4546 bamfile.bam
4647 ]]> </command >
4748 <inputs >
48- <param type =" data" name =" BAM" format =" bam" label =" Input BAM file" />
49-
49+ <param type =" data" name =" input" format =" bam" label =" Input BAM file" />
5050 <param type =" select" name =" read" label =" Select which read to output" >
5151 <option value =" read_1" selected =" True" >Read 1</option >
5252 <option value =" read_2" >Read 2</option >
5353 <option value =" combined" >Combined </option >
5454 <option value =" midpoint" >Midpoint (Require PE) </option >
5555 <option value =" fragment" >Fragment (Require PE) </option >
5656 </param >
57-
58- <param type =" boolean" name =" mate_pair" truevalue =" Yes" falsevalue =" No" label =" Require proper mate-pair" />
59-
60- <conditional name =" filter_by_min" >
61- <param type =" boolean" name =" filter_min" truevalue =" Yes" falsevalue =" No" label =" Filter by min insert size (bp)" >
62- </param >
57+ <conditional name =" require_paired_end" >
58+ <param type =" boolean" name =" mate_pair" truevalue =" Yes" falsevalue =" No" label =" Require proper mate-pair" />
6359 <when value =" Yes" >
64- <param type =" integer" name =" min_insert" value =" 0" label =" Min insert size (bp)" />
65- </when >
66- <when value =" No" >
60+ <conditional name =" filter_by_min" >
61+ <param type =" boolean" name =" filter_min" truevalue =" Yes" falsevalue =" No" label =" Filter by min insert size (bp)" />
62+ <when value =" Yes" >
63+ <param type =" integer" name =" min_insert" value =" 0" label =" Min insert size (bp)" />
64+ </when >
65+ <when value =" No" />
66+ </conditional >
67+ <conditional name =" filter_by_max" >
68+ <param type =" boolean" name =" filter_max" truevalue =" Yes" falsevalue =" No" label =" Filter by max insert size (bp)" />
69+ <when value =" Yes" >
70+ <param type =" integer" name =" max_insert" value =" 1000" label =" Max insert size (bp)" />
71+ </when >
72+ <when value =" No" />
73+ </conditional >
6774 </when >
6875 </conditional >
69-
70- <conditional name =" filter_by_max" >
71- <param type =" boolean" name =" filter_max" truevalue =" Yes" falsevalue =" No" label =" Filter by max insert size (bp)" >
72- </param >
73- <when value =" Yes" >
74- <param type =" integer" name =" max_insert" value =" 1000" label =" Max insert size (bp)" />
75- </when >
76- <when value =" No" >
77- </when >
78- </conditional >
79-
76+ <param name =" gzip" type =" boolean" checked =" true" truevalue =" Yes" falsevalue =" No" label =" Gzip output" />
8077 </inputs >
8178 <outputs >
82- <data name =" output1 " format =" bed" label =" ${tool.name} (composite) on ${on_string}" />
79+ <data name =" output " format =" bed" label =" ${tool.name} (composite) on ${on_string}" />
8380 </outputs >
8481 <help >
85- **What it does**
86- Convert BAM file to BED file.
82+ **What it does**
83+
84+ Convert BAM file to BED file.
8785 </help >
88- </tool >
86+ <expand macro =" citations_pearc" />
87+ </tool >
0 commit comments