comparison lumpy.xml @ 2:b1e152172de9 draft

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/lumpy commit 5f3fb85a6eb667b04c4de65eb722261f315c8241
author drosofff
date Tue, 06 Dec 2016 17:29:34 -0500
parents a006d42dd759
children 0bd777f0d6d8
comparison
equal deleted inserted replaced
1:a006d42dd759 2:b1e152172de9
1 <tool id="lumpy" name="lumpy-sv" version="0.1"> 1 <tool id="lumpy" name="lumpy-sv" version="0.2">
2 <description>find structural variants</description> 2 <description>find structural variants</description>
3 <requirements> 3 <requirements>
4 <requirement type="package" version="0.2.12">lumpy-sv</requirement> 4 <requirement type="package" version="0.2.12">lumpy-sv</requirement>
5 <requirement type="package" version="1.3.1">samtools</requirement> 5 <requirement type="package" version="1.3.1">samtools</requirement>
6 <requirement type="package" version="1.11.2">numpy</requirement> 6 <requirement type="package" version="1.11.2">numpy</requirement>
8 <stdio> 8 <stdio>
9 <exit_code range="1:" level="fatal" description="Tool exception" /> 9 <exit_code range="1:" level="fatal" description="Tool exception" />
10 </stdio> 10 </stdio>
11 <version_command>lumpy --version</version_command> 11 <version_command>lumpy --version</version_command>
12 <command><![CDATA[ 12 <command><![CDATA[
13 ln -f -s "$input_file" input.bam && 13 #if $analysis_type.analysis_type_list == "one_sample":
14 #if $seq_method.seq_method_list == "paired-end": 14 ln -f -s $analysis_type.input_file input.bam &&
15 samtools view -b -F 1294 input.bam > "input.discordants.unsorted.bam" && 15 #else:
16 samtools view -h input.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.splitters.unsorted.bam" && 16 ln -f -s $analysis_type.input_file input.A.bam &&
17 samtools sort input.discordants.unsorted.bam > input.discordants.bam && 17 ln -f -s $analysis_type.input_fileB input.B.bam &&
18 samtools sort input.splitters.unsorted.bam > input.splitters.bam &&
19 samtools view -r readgroup input.bam
20 |tail -n +$seq_method.additional_params.samplingValue
21 |python $__tool_directory__/pairend_distro.py -r 101 -X 4 -N $seq_method.additional_params.samplingValue -o input.lib.histo > meandev.txt &&
22 mean=\$(cat meandev.txt | sed s/mean:// | sed -r s/stdev:.+//) &&
23 stdev=\$(cat meandev.txt | sed -r s/mean:.+stdev://) &&
24 lumpy -mw 4 -tt 0
25 -pe id:input.bam,bam_file:input.discordants.bam,histo_file:input.lib.histo,mean:"\$mean",stdev:"\$stdev",read_length:$seq_method.readLength,min_non_overlap:$seq_method.additional_params.min_non_overlap,discordant_z:$seq_method.additional_params.discordant_z,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
26 -sr id:input.bam,bam_file:input.splitters.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf &&
27 mv input.discordants.bam $discordants &&
28 mv input.splitters.bam $splits &&
29 mv input.lib.histo $histogram &&
30 mv output.vcf $vcf_call &&
31 rm input.discordants.unsorted.bam input.splitters.unsorted.bam meandev.txt
32 #end if 18 #end if
33 #if $seq_method.seq_method_list == "single-read": 19
34 samtools view -h input.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.splitters.unsorted.bam" && 20 #if $analysis_type.analysis_type_list == "one_sample":
35 lumpy -mw 4 -tt 0 21
36 -sr id:input.bam,bam_file:input.splitters.unsorted.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf && 22 #if $seq_method.seq_method_list == "paired-end":
37 mv input.splitters.unsorted.bam $splits && 23 samtools view -b -F 1294 input.bam > "input.discordants.unsorted.bam" &&
38 mv output.vcf $vcf_call 24 samtools view -h input.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.splitters.unsorted.bam" &&
25 samtools sort input.discordants.unsorted.bam > input.discordants.bam &&
26 samtools sort input.splitters.unsorted.bam > input.splitters.bam &&
27 samtools view -r readgroup input.bam
28 |tail -n +$seq_method.additional_params.samplingValue
29 |python $__tool_directory__/pairend_distro.py -r 101 -X 4 -N $seq_method.additional_params.samplingValue -o input.lib.histo > meandev.txt &&
30 mean=\$(cat meandev.txt | sed s/mean:// | sed -r s/stdev:.+//) &&
31 stdev=\$(cat meandev.txt | sed -r s/mean:.+stdev://) &&
32 lumpy -mw $seq_method.additional_params.mw -tt $seq_method.additional_params.tt
33 -pe id:input.bam,bam_file:input.discordants.bam,histo_file:input.lib.histo,mean:"\$mean",stdev:"\$stdev",read_length:$seq_method.readLength,min_non_overlap:$seq_method.additional_params.min_non_overlap,discordant_z:$seq_method.additional_params.discordant_z,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
34 -sr id:input.bam,bam_file:input.splitters.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf &&
35 mv input.discordants.bam $discordants &&
36 mv input.splitters.bam $splits &&
37 mv input.lib.histo $histogram &&
38 mv output.vcf $vcf_call &&
39 rm input.discordants.unsorted.bam input.splitters.unsorted.bam meandev.txt
40 #end if
41 #if $seq_method.seq_method_list == "single-read":
42 samtools view -h input.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.splitters.unsorted.bam" &&
43 lumpy -mw $seq_method.additional_params.mw -tt $seq_method.additional_params.tt
44 -sr id:input.bam,bam_file:input.splitters.unsorted.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf &&
45 mv input.splitters.unsorted.bam $splits &&
46 mv output.vcf $vcf_call
47 #end if
48
49 #else:
50
51 #if $seq_method.seq_method_list == "paired-end":
52 samtools view -b -F 1294 input.A.bam > "input.A.discordants.unsorted.bam" &&
53 samtools view -b -F 1294 input.B.bam > "input.B.discordants.unsorted.bam" &&
54 samtools view -h input.A.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.A.splitters.unsorted.bam" &&
55 samtools view -h input.B.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.B.splitters.unsorted.bam" &&
56 samtools sort input.A.discordants.unsorted.bam > input.A.discordants.bam &&
57 samtools sort input.B.discordants.unsorted.bam > input.B.discordants.bam &&
58 samtools sort input.A.splitters.unsorted.bam > input.A.splitters.bam &&
59 samtools sort input.B.splitters.unsorted.bam > input.B.splitters.bam &&
60 samtools view -r readgroup input.A.bam
61 |tail -n +$seq_method.additional_params.samplingValue
62 |python $__tool_directory__/pairend_distro.py -r 101 -X 4 -N $seq_method.additional_params.samplingValue -o input.A.lib.histo > meandevA.txt &&
63 samtools view -r readgroup input.B.bam
64 |tail -n +$seq_method.additional_params.samplingValue
65 |python $__tool_directory__/pairend_distro.py -r 101 -X 4 -N $seq_method.additional_params.samplingValue -o input.B.lib.histo > meandevB.txt &&
66 meanA=\$(cat meandevA.txt | sed s/mean:// | sed -r s/stdev:.+//) &&
67 meanB=\$(cat meandevB.txt | sed s/mean:// | sed -r s/stdev:.+//) &&
68 stdevA=\$(cat meandevA.txt | sed -r s/mean:.+stdev://) &&
69 stdevB=\$(cat meandevB.txt | sed -r s/mean:.+stdev://) &&
70 lumpy -mw $seq_method.additional_params.mw -tt $seq_method.additional_params.tt
71 -pe id:inputA.bam,bam_file:input.A.discordants.bam,histo_file:input.A.lib.histo,mean:"\$meanA",stdev:"\$stdevA",read_length:$seq_method.readLength,min_non_overlap:$seq_method.additional_params.min_non_overlap,discordant_z:$seq_method.additional_params.discordant_z,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
72 -pe id:inputB.bam,bam_file:input.B.discordants.bam,histo_file:input.B.lib.histo,mean:"\$meanB",stdev:"\$stdevA",read_length:$seq_method.readLength,min_non_overlap:$seq_method.additional_params.min_non_overlap,discordant_z:$seq_method.additional_params.discordant_z,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
73 -sr id:inputA.bam,bam_file:input.A.splitters.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
74 -sr id:inputB.bam,bam_file:input.B.splitters.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf &&
75 mv input.A.discordants.bam $discordants &&
76 mv input.B.discordants.bam $discordantsB &&
77 mv input.A.splitters.bam $splits &&
78 mv input.B.splitters.bam $splitsB &&
79 mv input.A.lib.histo $histogram &&
80 mv input.B.lib.histo $histogramB &&
81 mv output.vcf $vcf_call &&
82 rm input.A.discordants.unsorted.bam input.B.discordants.unsorted.bam input.A.splitters.unsorted.bam input.B.splitters.unsorted.bam meandevA.txt meandevB.txt
83 #end if
84 #if $seq_method.seq_method_list == "single-read":
85 samtools view -h input.A.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.A.splitters.unsorted.bam" &&
86 samtools view -h input.B.bam | python $__tool_directory__/extractSplitReads_BwaMem.py -i stdin | samtools view -Sb - > "input.B.splitters.unsorted.bam" &&
87 lumpy -mw $seq_method.additional_params.mw -tt $seq_method.additional_params.tt
88 -sr id:input.A.bam,bam_file:input.A.splitters.unsorted.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold
89 -sr id:input.B.bam,bam_file:input.B.splitters.unsorted.bam,back_distance:$seq_method.additional_params.back_distance,weight:$seq_method.additional_params.weight,min_mapping_threshold:$seq_method.additional_params.min_mapping_threshold > output.vcf &&
90 mv input.A.splitters.unsorted.bam $splits &&
91 mv input.B.splitters.unsorted.bam $splitsB &&
92 mv output.vcf $vcf_call
93 #end if
94
95
39 #end if 96 #end if
40 97
41 ]]></command> 98 ]]></command>
42 <!-- basic error handling --> 99 <!-- basic error handling -->
43 <inputs> 100 <inputs>
44 <param format="bam" name="input_file" type="data" label="One BAM alignment file produced by BWA-mem"/> 101 <conditional name="analysis_type">
102 <param help="Single or paired conditions (eg tumor vs normal)" label="Analysis type" name="analysis_type_list" type="select">
103 <option selected="True" value="one_sample">One Sample</option>
104 <option value="two_sample">Two samples</option>
105 </param>
106 <when value="one_sample">
107 <param format="bam" name="input_file" type="data" label="One BAM alignment file produced by BWA-mem"/>
108 </when>
109 <when value="two_sample">
110 <param format="bam" name="input_file" type="data" label="One BAM alignment file produced by BWA-mem"/>
111 <param format="bam" name="input_fileB" type="data" label="One BAM alignment file produced by BWA-mem"/>
112 </when>
113 </conditional>
45 <conditional name="seq_method"> 114 <conditional name="seq_method">
46 <param help="Paired-end or single-read sequencing" label="Sequencing method" name="seq_method_list" type="select"> 115 <param help="Paired-end or single-read sequencing" label="Sequencing method" name="seq_method_list" type="select">
47 <option selected="True" value="paired-end">Paired-end sequencing</option> 116 <option selected="True" value="paired-end">Paired-end sequencing</option>
48 <option value="single-read">Single-read sequencing</option> 117 <option value="single-read">Single-read sequencing</option>
49 </param> 118 </param>
50 <when value="paired-end"> 119 <when value="paired-end">
51 <param name="readLength" value="151" type="integer" label="read length" help="e.g. 151 nt" /> 120 <param name="readLength" value="151" type="integer" label="read length" help="e.g. 151 nt" />
52 <section name="additional_params" title="Additional Options" expanded="False"> 121 <section name="additional_params" title="Additional Options" expanded="False">
53 <param name="samplingValue" value="100000" type="integer" label="number of reads to compute mean and stdev of read length" help="e.g. 10000" /> 122 <param name="samplingValue" value="100000" type="integer" label="number of reads to compute mean and stdev of read length" help="e.g. 10000" />
123 <param name="mw" value="4" type="integer" label="-mw" help="minimum weight across all samples for a call (default: 4)" />
124 <param name="tt" value="0" type="integer" label="-tt" help="trim threshold (default: 0)" />
54 <param name="min_non_overlap" value="101" type="integer" label="min_non_overlap" help="e.g. 101" /> 125 <param name="min_non_overlap" value="101" type="integer" label="min_non_overlap" help="e.g. 101" />
55 <param name="discordant_z" value="5" type="integer" label="discordant_z" help="e.g. 5" /> 126 <param name="discordant_z" value="5" type="integer" label="discordant_z" help="e.g. 5" />
56 <param name="back_distance" value="10" type="integer" label="back_distance" help="e.g. 10" /> 127 <param name="back_distance" value="10" type="integer" label="back_distance" help="e.g. 10" />
57 <param name="weight" value="1" type="integer" label="weight" help="e.g. 1" /> 128 <param name="weight" value="1" type="integer" label="weight" help="e.g. 1" />
58 <param name="min_mapping_threshold" value="20" type="integer" label="min_mapping_threshold" help="e.g. 20" /> 129 <param name="min_mapping_threshold" value="20" type="integer" label="min_mapping_threshold" help="e.g. 20" />
59 </section> 130 </section>
60 </when> 131 </when>
61 <when value="single-read"> 132 <when value="single-read">
62 <section name="additional_params" title="Additional Options" expanded="False"> 133 <section name="additional_params" title="Additional Options" expanded="False">
134 <param name="mw" value="4" type="integer" label="-mw" help="minimum weight across all samples for a call (default: 4)" />
135 <param name="tt" value="0" type="integer" label="-tt" help="trim threshold (default: 0)" />
63 <param name="back_distance" value="10" type="integer" label="back_distance" help="e.g. 10" /> 136 <param name="back_distance" value="10" type="integer" label="back_distance" help="e.g. 10" />
64 <param name="weight" value="1" type="integer" label="weight" help="e.g. 1" /> 137 <param name="weight" value="1" type="integer" label="weight" help="e.g. 1" />
65 <param name="min_mapping_threshold" value="20" type="integer" label="min_mapping_threshold" help="e.g. 20" /> 138 <param name="min_mapping_threshold" value="20" type="integer" label="min_mapping_threshold" help="e.g. 20" />
66 </section> 139 </section>
67 </when> 140 </when>
69 </conditional> 142 </conditional>
70 143
71 </inputs> 144 </inputs>
72 145
73 <outputs> 146 <outputs>
74 <data format="tabular" name="histogram" type="data" label="Lumpy on ${input_file.element_identifier}: Fragment size distribution"> 147 <data format="tabular" name="histogram" type="data" label="Lumpy on ${analysis_type.input_file.element_identifier}: Fragment size distribution">
75 <filter>seq_method['seq_method_list'] == "paired-end"</filter> 148 <filter>seq_method['seq_method_list'] == "paired-end"</filter>
76 </data> 149 </data>
77 <data format="bam" name="splits" type="data" label="Lumpy on ${input_file.element_identifier}: Split Reads (Bam format)"/> 150 <data format="tabular" name="histogramB" type="data" label="Lumpy on ${analysis_type.input_fileB.element_identifier}: Fragment size distribution">
78 <data format="bam" name="discordants" type="data" label="Lumpy on ${input_file.element_identifier}: Discordant Pairs (Bam format)"> 151 <filter>seq_method['seq_method_list'] == "paired-end"</filter>
79 <filter>seq_method['seq_method_list'] == "paired-end"</filter> 152 <filter>analysis_type['analysis_type_list'] == "two_sample"</filter>
80 </data> 153 </data>
81 <data format="vcf" name="vcf_call" type="data" label="Lumpy on ${input_file.element_identifier}: Variant Calling (vcf format)"/> 154 <data format="bam" name="splits" type="data" label="Lumpy on ${analysis_type.input_file.element_identifier}: Split Reads (Bam format)"/>
155 <data format="bam" name="splitsB" type="data" label="Lumpy on ${analysis_type.input_fileB.element_identifier}: Split Reads (Bam format)">
156 <filter>analysis_type['analysis_type_list'] == "two_sample"</filter>
157 </data>
158 <data format="bam" name="discordants" type="data" label="Lumpy on ${analysis_type.input_file.element_identifier}: Discordant Pairs (Bam format)">
159 <filter>seq_method['seq_method_list'] == "paired-end"</filter>
160 </data>
161 <data format="bam" name="discordantsB" type="data" label="Lumpy on ${analysis_type.input_fileB.element_identifier}: Discordant Pairs (Bam format)">
162 <filter>seq_method['seq_method_list'] == "paired-end"</filter>
163 <filter>analysis_type['analysis_type_list'] == "two_sample"</filter>
164 </data>
165 <data format="vcf" name="vcf_call" type="data" label="Lumpy Variant Calling (vcf format)"/>
82 </outputs> 166 </outputs>
83 167
84 <tests> 168 <tests>
85 <test> 169 <test>
170 <param name="analysis_type" value="one_sample" />
86 <param name="input_file" value="sr.input.bam" ftype="bam"/> 171 <param name="input_file" value="sr.input.bam" ftype="bam"/>
87 <param name="seq_method_list" value="single-read" /> 172 <param name="seq_method_list" value="single-read" />
173 <param name="mw" value="4"/>
174 <param name="tt" value="0"/>
88 <param name="back_distance" value="10"/> 175 <param name="back_distance" value="10"/>
89 <param name="weight" value="1" /> 176 <param name="weight" value="1" />
90 <param name="min_mapping_threshold" value="20" /> 177 <param name="min_mapping_threshold" value="20" />
91 <output name="vcf_call" file="output.vcf" ftype="vcf"/> 178 <output name="vcf_call" file="output.vcf" ftype="vcf"/>
92 </test> 179 </test>