comparison vardict.xml @ 0:2975b29bcaa1 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/vardict commit 8a561c35737f2bdef39842ce7f297a286380bf36"
author iuc
date Tue, 25 Aug 2020 05:41:19 -0400
parents
children 5f756651a1bc
comparison
equal deleted inserted replaced
-1:000000000000 0:2975b29bcaa1
1 <tool id="vardict_java" name="VarDict" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
2 <description>calls SNVs and indels for tumor-normal pairs</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <requirements>
7 <requirement type="package" version="@TOOL_VERSION@">vardict-java</requirement>
8 <requirement type="package" version="5.0.1">gawk</requirement>
9 <requirement type="package" version="1.10">samtools</requirement>
10 </requirements>
11 <command detect_errors="exit_code"><![CDATA[
12 #if $select_mode.mode == "paired"
13 ln -s '$select_mode.normal' ./normal.bam &&
14 ln -s '$select_mode.normal.metadata.bam_index' ./normal.bam.bai &&
15 #end if
16 ln -s '$select_mode.tumor' ./tumor.bam &&
17 ln -s '$select_mode.tumor.metadata.bam_index' ./tumor.bam.bai &&
18
19 ## INDEX REFERENCE FASTA FILE IF FROM HISTORY
20 #if $reference_source.reference_source_selector == "history":
21 ln -s '$reference_source.ref_file' ./ref.fa &&
22 samtools faidx ./ref.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for vardict' >&2 &&
23 #else if $reference_source.reference_source_selector == "cached"
24 ln -s '$reference_source.ref_file.fields.path' ./ref.fa &&
25 ln -s '${reference_source.ref_file.fields.path}.fai' ./ref.fa.fai &&
26 #end if
27
28 ## build BED file from chromosome list
29 #if $interval_file:
30 grep -w -f '$interval_file' ./ref.fa.fai > ./chromosomes.fa.fai &&
31 #else
32 ln -s ./ref.fa.fai ./chromosomes.fa.fai &&
33 #end if
34 awk 'BEGIN {FS=OFS="\t"} {print $1, "1", $2}' ./chromosomes.fa.fai > ./regions.bed &&
35
36 vardict-java
37 #if $select_mode.mode == "paired"
38 -b "./tumor.bam|./normal.bam"
39 -N 'Tumor'
40 #else
41 -b "./tumor.bam"
42 -N 'Sample'
43 #end if
44 -G ./ref.fa
45 -z
46 -th \${GALAXY_SLOTS:-1}
47
48 -f '$advancedsettings.f'
49 -k '$advancedsettings.k'
50 -r '$advancedsettings.r'
51 -B '$advancedsettings.B'
52 -Q '$advancedsettings.Q'
53 -q '$advancedsettings.q'
54 -m '$advancedsettings.m'
55 -T '$advancedsettings.T'
56 -X '$advancedsettings.X'
57 -P '$advancedsettings.P'
58 -o '$advancedsettings.o'
59 -O '$advancedsettings.O'
60 -V '$advancedsettings.V'
61
62 ## construct VFC table
63 -c 1 -S 2 -E 3 -g 4
64 ./regions.bed
65
66 ## postprocessing
67 #if $select_mode.mode == "paired"
68 | testsomatic.R
69 | var2vcf_paired.pl
70 -N 'Tumor|Normal'
71 #else
72 | teststrandbias.R
73 | var2vcf_valid.pl
74 -N 'Sample'
75 -E
76 #end if
77 -f '$advancedsettings.f'
78
79 > '$all_variants' &&
80
81 ## Filter for PASS variants
82 awk 'BEGIN {FS=OFS="\t"} substr(\$0, 1, 1) == "#" {print \$0; next} \$7 == "PASS" {print \$0}' '$all_variants' > '$passed_variants'
83 ]]></command>
84 <inputs>
85 <conditional name="select_mode">
86 <param name="mode" type="select" label="Choose run mode">
87 <option value="single">Single sample mode</option>
88 <option value="paired" selected="True">Paired variant calling</option>
89 </param>
90 <when value="single">
91 <expand macro="input_default" />
92 </when>
93 <when value="paired">
94 <param name="normal" type="data" format="bam" label="Normal file" />
95 <expand macro="input_default" />
96 </when>
97 </conditional>
98 <section name="advancedsettings" title="Advanced Settings" expanded="False">
99 <param argument="-f" type="float" min="0.0" max="1.0" value="0.01" label="Minimum variant allele fraction" />
100 <param argument="-k" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Indicate whether to perform local realignment" />
101 <param argument="-r" type="integer" min="0" value="2" label="Minimum number of reads supporting the variant" />
102 <param argument="-B" type="integer" min="0" value="2" label="Minimum number of reads for determining strand bias" />
103 <param argument="-Q" type="integer" min="0" value="1" label="Minimum mapping quality for reads to be considered" />
104 <param argument="-m" type="integer" value="8" label="Maximum number of mismatches before a read is no longer considered (gaps are not counted as mismatches)" />
105 <param argument="-T" type="integer" value="0" label="Maximum number of bases considered from 5' end (default: 0, no trimming)" />
106 <param argument="-X" type="integer" value="3" label="Maximum number of extended based after indel to look for mismatches" />
107 <param argument="-P" type="integer" value="5" label="Maximum average read position for a variant to be considered." />
108 <param argument="-q" type="integer" value="25" label="Minimum phred score for a base to be considered a good call" />
109 <param argument="-o" type="float" value="1.5" label="Minimum quality ratio [(good_quality_reads)/(bad_quality_reads+0.5)] (based on definition of a good call; see previous option)" />
110 <param argument="-O" type="float" min="0" value="0" label="Minimum average mapping quality" />
111 <param argument="-V" type="float" min="0.0" max="1.0" value="0.05" label="Maximum allowed variant allele fraction in the normal sample" />
112 </section>
113 <expand macro="ref_select" />
114 </inputs>
115 <outputs>
116 <data name="all_variants" format="vcf" label="VarDict SNVs and Indels (All)" />
117 <data name="passed_variants" format="vcf" label="VarDict SNVs and Indels (Passed)" />
118 </outputs>
119 <tests>
120 <test expect_num_outputs="2">
121 <conditional name="select_mode">
122 <param name="mode" value="paired" />
123 <param name="normal" ftype="bam" value="normal.bam" />
124 <param name="tumor" ftype="bam" value="tumor.bam" />
125 </conditional>
126 <conditional name="reference_source">
127 <param name="reference_source_selector" value="history"/>
128 <param name="ref_file" ftype="fasta" value="genome.fasta" />
129 </conditional>
130 <output name="all_variants" file="all_variants_paired.vcf" />
131 <output name="passed_variants" file="passed_variants_paired.vcf" />
132 </test>
133 <test expect_num_outputs="2">
134 <conditional name="select_mode">
135 <param name="mode" value="paired" />
136 <param name="normal" ftype="bam" value="normal.bam" />
137 <param name="tumor" ftype="bam" value="tumor.bam" />
138 </conditional>
139 <conditional name="reference_source">
140 <param name="reference_source_selector" value="cached"/>
141 <param name="ref_file" value="test_buildid"/>
142 </conditional>
143 <output name="all_variants" file="all_variants_paired.vcf" />
144 <output name="passed_variants" file="passed_variants_paired.vcf" />
145 </test>
146 <test expect_num_outputs="2">
147 <conditional name="select_mode">
148 <param name="mode" value="single" />
149 <param name="tumor" ftype="bam" value="tumor.bam" />
150 </conditional>
151 <conditional name="reference_source">
152 <param name="reference_source_selector" value="cached"/>
153 <param name="ref_file" value="test_buildid"/>
154 </conditional>
155 <output name="all_variants" file="all_variants_single.vcf" />
156 <output name="passed_variants" file="passed_variants_single.vcf" />
157 </test>
158 </tests>
159 <help>
160 <![CDATA[
161 VarDict
162 =======
163
164 VarDict is a sensitive variant caller for both single and paired sample variant calling from BAM files.
165 VarDict implements several novel features such as amplicon bias aware variant calling from targeted sequencing experiments,
166 rescue of long indels by realigning bwa soft clipped reads and better scalability than many other Java based variant callers.
167
168 For more information see the VarDict documentation_.
169
170 .. _documentation: https://github.com/AstraZeneca-NGS/VarDictJava
171 ]]>
172 </help>
173 <citations>
174 <citation type="doi">10.1093/nar/gkw227</citation>
175 </citations>
176 </tool>