annotate varscan_mpileup2snp_from_bam.xml @ 4:796653c6376b draft

Uploaded
author jason-ellul
date Wed, 01 Jun 2016 02:36:11 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
2 <tool id="varscan_mpileup2snp_from_bam" name="VarScan2 Call SNPs from BAM">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
3 <description>VarScan2 SNP/SNV detection; directly reading *.bam file(s) to avoid unncessairy I/O overhead.</description>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
4 <requirements>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
5 <!--<requirement type="package" version="0.1.19">samtools-parallel-mpileup</requirement>-->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
6 <requirement type="package" version="2.3.6">VarScan</requirement>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
7 <requirement type="package" version="0.1.19">package_samtools_0_1_19</requirement>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
8 </requirements>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
9 <command>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
10 #if $reference_genome_source.source_select == "attribute" and len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) != 1
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
11 echo "Invalid number of dbkeys are found: ${ len({ alignment.metadata.dbkey:True for alignment in $alignments }.keys()) }, while only one should be used. Make sure that the alignments are done on the same reference genome and that 'tool-data/all_fasta.loc' is configured properly!" >&amp;2
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
12 #else
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
13 <!--
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
14 #if $mpileup_parallelization.mpileup_parallelization_select == "true"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
15 samtools-parallel-mpileup mpileup
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
16 -t $mpileup_parallelization.samtools_threads
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
17 #else
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
18 samtools mpileup
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
19 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
20 -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
21 samtools mpileup
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
22 -f
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
23 #if $reference_genome_source.source_select == "indexed_filtered"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
24 "$reference_genome_source.reference_genome"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
25 #else if $reference_genome_source.source_select == "indexed_all"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
26 "$reference_genome_source.reference_genome"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
27 #else if $reference_genome_source.source_select == "history"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
28 "$reference_genome_source.reference_genome"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
29 #else
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
30 <!--
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
31 This is a workaround to obtain the "genome.fa" file that
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
32 corresponds to the dbkey of the alignments.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
33 Because this file is "calculated" during run-time, it can
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
34 be used in a workflow.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
35 -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
36 "${ filter( lambda x: str( x[0] ) == str( { alignment.metadata.dbkey:True for alignment in $alignments }.keys()[0] ), $__app__.tool_data_tables[ 'all_fasta' ].get_fields() )[0][-1] }"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
37 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
38
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
39 #if $extended_parameters_regions.samtools_regions == "region"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
40 -r $extended_parameters_regions.samtools_r
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
41 #elif $extended_parameters_regions.samtools_regions == "regions_file_pos" or $extended_parameters_regions.samtools_regions == "regions_file_bed"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
42 -l $extended_parameters_regions.samtools_l
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
43 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
44
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
45 #if $extended_parameters.parameters == "extended"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
46 $extended_parameters.samtools_6
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
47 $extended_parameters.samtools_A
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
48 $extended_parameters.samtools_B
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
49 -C $extended_parameters.samtools_C
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
50 -d $extended_parameters.samtools_d
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
51 $extended_parameters.samtools_E
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
52 -M $extended_parameters.samtools_M
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
53 $extended_parameters.samtools_R
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
54 -q $extended_parameters.samtools_q
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
55 -Q $extended_parameters.samtools_Q
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
56
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
57 -e $extended_parameters.samtools_e
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
58 -F $extended_parameters.samtools_F
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
59 -h $extended_parameters.samtools_h
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
60 $extended_parameters.samtools_I
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
61 -L $extended_parameters.samtools_L
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
62 -m $extended_parameters.samtools_m
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
63 -o $extended_parameters.samtools_o
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
64 $extended_parameters.samtools_p
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
65 -P $extended_parameters.samtools_P
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
66 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
67
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
68 #for $alignment in $alignments
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
69 ${alignment}
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
70 #end for
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
71 2>stderr_1.txt
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
72
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
73 <!--
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
74 #if $sort_mpileup
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
75 | sort -k 1,1 -k 2,2
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
76 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
77 -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
78
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
79 | java
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
80 -Xmx64G
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
81 -jar \$JAVA_JAR_PATH/VarScan.v2.3.6.jar
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
82 mpileup2snp
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
83
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
84 #if $extended_parameters.parameters == "extended"
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
85 --min-coverage $varscan_min_coverage
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
86 --min-reads2 $varscan_min_reads2
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
87 --min-avg-qual $varscan_min_avg_qual
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
88 --min-var-freq $varscan_min_var_freq
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
89 --min-freq-for-hom $varscan_min_freq_for_hom
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
90 --p-value $varscan_p_value
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
91 $varscan_strand_filter
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
92 $varscan_variants
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
93 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
94
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
95 #if $varscan_output_vcf
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
96 --output-vcf 1
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
97 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
98
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
99 2>stderr_2.txt
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
100 > $snv_output ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
101
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
102 echo "-------------------------[ mpileup generation ]-------------------------" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
103 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
104 cat stderr_1.txt ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
105 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
106 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
107 echo "-------------------------[ VarScan SNP detect ]-------------------------" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
108 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
109 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
110 cat stderr_2.txt ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
111 echo "" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
112 echo "------------------------------------------------------------------------" ;
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
113 #end if
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
114 </command>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
115
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
116 <inputs>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
117 <param format="bam,sam" multiple="true" name="alignments" type="data" label="Alignment file(s)" help="Mapped reads in BAM or SAM format."/>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
118
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
119 <!-- Find out how to access the reference genome from the BAM file(s) -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
120 <conditional name="reference_genome_source">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
121 <param name="source_select" type="select" label="Fasta Source">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
122 <option value="indexed_filtered">Use a built-in index (which fits your reference)</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
123 <option value="history">Use reference from the history</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
124 <option value="indexed_all">Use a built-in index (entire list) - avoid this option if possible; only useful if you design a workflow</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
125 <option value="attribute">Use a built-in index based on the 'metadata.dbkey' attribute; ideal in workflows</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
126 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
127 <when value="history">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
128 <param name="reference_genome" format="fasta" type="data" label="Reference Genome used during alignment (fasta)" help="Reference genome (genome.fa) that corresponds to the *.bam file." />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
129 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
130 <when value="indexed_filtered">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
131 <param name="reference_genome" type="select" label="Reference Genome used during alignment (fasta)" >
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
132 <options from_data_table="all_fasta">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
133 <column name="name" index="2"/>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
134 <column name="dbkey" index="1"/>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
135 <column name="value" index="3"/><!-- Value is the path of the fasta file -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
136 <filter type="data_meta" ref="alignments" multiple="false" key="dbkey" column="1" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
137 <validator type="no_options" message="No indexes are available for the selected input dataset" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
138 </options>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
139 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
140 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
141 <when value="indexed_all">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
142 <param name="reference_genome" type="select" label="Reference Genome used during alignment (fasta)" >
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
143 <options from_data_table="all_fasta">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
144 <column name="name" index="2"/>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
145 <column name="dbkey" index="1"/>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
146 <column name="value" index="3"/><!-- Value is the path of the fasta file -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
147 <validator type="no_options" message="No indexes are available for the selected input dataset" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
148 </options>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
149 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
150 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
151 <when value="attribute" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
152 </conditional>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
153
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
154 <conditional name="extended_parameters_regions">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
155 <param name="samtools_regions" type="select" label="Region specific parameters" help="Let samtools target specific genomic locations.">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
156 <option value="entire_genome">Entire genome</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
157 <option value="region">Specific region</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
158 <option value="regions_file_pos">Specific positions (file); list of positions</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
159 <option value="regions_file_bed">Specific regions (file); list of regions in BED</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
160 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
161 <when value="entire_genome" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
162 <when value="region">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
163 <param type="text" name="samtools_r" label="Samtools: region in which pileup is generated" help="chr:pos or chr:start-end" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
164 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
165 <when value="regions_file_pos">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
166 <param type="data" name="samtools_l" format="tabular" label="Samtools: list of positions (chr pos)" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
167 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
168 <when value="regions_file_bed">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
169 <param type="data" name="samtools_l" format="bed" label="Samtools: specific regions (BED)" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
170 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
171 </conditional>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
172
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
173
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
174 <!--
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
175 <conditional name="mpileup_parallelization">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
176 <param name="mpileup_parallelization_select" type="select" label="Use parallelization for the mpileup generation, WARNING: if parallelization is used output will be unsorted!" help="Especially if larger numbers of bam/sam files are processed, or the file infrastructure is optimized for IO-paralellization, this feature might improve performance.">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
177 <option value="false" >False - uses classical samtools</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
178 <option value="true">True - uses (experimental) samtools mpileup-parallel</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
179 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
180 <when value="false" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
181 <when value="true">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
182 <param type="integer" name="samtools_threads" value="2" min="1" label="Samtools: mpileup threads" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
183 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
184 </conditional>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
185
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
186 <param name="sort_mpileup" type="boolean" truevalue="true" falsevalue="false" label="Sort mpileup file" help="Because parallelization may disrupt the outputs order, sorting can be conveniet for e.g. testing. Notice that this function has only use in a limited number of situations but consumes (much) resources. Only use it if it's really neccesairy." />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
187 -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
188
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
189 <conditional name="extended_parameters">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
190 <param name="parameters" type="select" label="Advanced parameters" help="For more advanced VarScan and samtools settings.">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
191 <option value="default">Default settings</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
192 <option value="extended">Extended settings</option>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
193 </param>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
194 <when value="default" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
195 <when value="extended">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
196 <param type="boolean" name="samtools_6" falsevalue="" truevalue=" -6" label="Samtools: assume the quality is in the Illumina-1.3+ encoding" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
197 <param type="boolean" name="samtools_A" falsevalue="" truevalue=" -A" label="Samtools: count anomalous read pairs" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
198 <param type="boolean" name="samtools_B" falsevalue="" truevalue=" -B" label="Samtools: disable BAQ computation" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
199 <param type="integer" name="samtools_C" value="0" label="Samtools: parameter for adjusting mapQ; 0 to disable [0]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
200 <param type="integer" name="samtools_d" value="250" label="Samtools: max per-BAM depth to avoid excessive memory usage [250]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
201 <param type="boolean" name="samtools_E" falsevalue="" truevalue=" -E" label="Samtools: recalculate extended BAQ on the fly thus ignoring existing BQs" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
202 <param type="integer" name="samtools_M" value="60" label="cap mapping quality at INT [60]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
203 <param type="boolean" name="samtools_R" falsevalue="" truevalue=" -R" label="Samtools: ignore RG tags" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
204 <param type="integer" name="samtools_q" value="0" label="Samtools: skip alignments with mapQ smaller than INT [0]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
205 <param type="integer" name="samtools_Q" value="13" label="Samtools: skip bases with baseQ/BAQ smaller than INT [13]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
206
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
207 <param type="integer" name="samtools_e" value="20" label="Samtools: Phred-scaled gap extension seq error probability [20]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
208 <param type="float" name="samtools_F" value="0.002" label="Samtools: minimum fraction of gapped reads for candidates [0.002]" help="Alias: -F" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
209 <param type="integer" name="samtools_h" value="100" label="Samtools: coefficient for homopolymer errors [100]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
210 <param type="boolean" name="samtools_I" falsevalue="" truevalue=" -I" label="Samtools: do not perform indel calling" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
211 <param type="integer" name="samtools_L" value="250" label="Samtools: max per-sample depth for INDEL calling [250]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
212 <param type="integer" name="samtools_m" value="1" label="Samtools: minimum gapped reads for indel candidates [1]" help="Alias: -m" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
213 <param type="integer" name="samtools_o" value="40" label="Samtools: Phred-scaled gap open sequencing error probability [40]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
214 <param type="boolean" name="samtools_p" falsevalue="" truevalue=" -p" label="Samtools: apply -m and -F per-sample to increase sensitivity" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
215 <param type="text" name="samtools_P" value="all" label="Samtools: comma separated list of platforms for indels [all]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
216
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
217 <param type="integer" name="varscan_min_coverage" value="8" label="VarScan: Minimum read depth at a position to make a call [8]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
218 <param type="integer" name="varscan_min_reads2" value="2" label="VarScan: PMinimum supporting reads at a position to call variants [2]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
219 <param type="integer" name="varscan_min_avg_qual" value="15" label="VarScan: Minimum base quality at a position to count a read [15]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
220 <param type="float" name="varscan_min_var_freq" value="0.01" label="VarScan: minimum fraction of gapped reads for candidates [0.002]" help="Alias: -F" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
221 <param type="float" name="varscan_min_freq_for_hom" value="0.75" label="VarScan: Minimum frequency to call homozygote [0.75]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
222 <param type="float" name="varscan_p_value" value="0.99" label="VarScan: Default p-value threshold for calling variants [99e-02]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
223 <param type="boolean" name="varscan_strand_filter" falsevalue=" --strand_filter 0" truevalue=" --strand_filter 1" checked="true" label="VarScan: Ignore variants with >90% support on one strand [1]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
224 <param type="boolean" name="varscan_variants" falsevalue=" --variants 0" truevalue=" --variants 1" checked="false" label="VarScan: Report only variant (SNP/indel) positions [0]" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
225 </when>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
226 </conditional>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
227
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
228 <param type="boolean" name="varscan_output_vcf" falsevalue="0" truevalue="1" label="VarScan: If set to 1, outputs in VCF format" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
229 </inputs>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
230
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
231 <outputs>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
232 <data format="tabular" name="snv_output" label="${tool.name} on ${', '.join([ str(a.hid)+': '+a.name for a in $alignments ])}">
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
233 <change_format>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
234 <when input="varscan_output_vcf" value="1" format="vcf" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
235 </change_format>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
236 </data>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
237 </outputs>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
238
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
239 <tests>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
240 <test><!-- Use classical samtools -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
241 <param name="alignments" value="hg19_mutant.bam.txt" dbkey="hg19" ftype="bam" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
242 <param name="source_select" value="attribute" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
243 <param name="samtools_regions" value="entire_genome" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
244
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
245 <!-- <param name="mpileup_parallelization_select" value="false" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
246 <param name="sort_mpileup" value="true" /> -->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
247
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
248 <param name="parameters" value="default" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
249 <param name="varscan_output_vcf" value="1" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
250
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
251
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
252 <output name="snv_output" file="hg19_mutant.vcf" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
253 </test>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
254 <!-- <test> Use parallelized samtools
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
255 <param name="alignments" value="hg19_mutant.bam.txt" dbkey="hg19" ftype="bam" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
256 <param name="source_select" value="attribute" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
257 <param name="samtools_regions" value="entire_genome" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
258
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
259 param name="mpileup_parallelization_select" value="true" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
260 <param name="samtools_threads" value="2" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
261 <param name="sort_mpileup" value="true" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
262
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
263 <param name="parameters" value="default" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
264 <param name="varscan_output_vcf" value="1" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
265
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
266
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
267 <output name="snv_output" file="hg19_mutant.vcf" />
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
268 </test>-->
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
269 </tests>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
270
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
271 <help>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
272 **VarScan 2.3.6**
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
273
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
274 VarScan is a platform-independent mutation caller for targeted, exome, and whole-genome resequencing data generated on Illumina, SOLiD, Life/PGM, Roche/454, and similar instruments. The newest version, VarScan 2, is written in Java, so it runs on most operating systems.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
275 http://dx.doi.org/10.1101/gr.129684.111
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
276 http://www.ncbi.nlm.nih.gov/pubmed/19542151
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
277
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
278 *VarScan* requires mpileup formatted input files, which are generally derived from BAM files. Since mpileup files can become humongous, the interim step of storing it is bypassed. Thus, in this wrapper one or multiple BAM/SAM files go in, get processed into a mpileup file and get directly linked to VarScan.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
279 The samtools package is not able to parallelize the mpileup generation which make it a very slow process.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
280 Other people were aware of this and have written a version that can do parallelization:
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
281 https://github.com/mydatascience/parallel-mpileup
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
282
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
283 Consequently, when a BAM files gets processed by this wrapper, it's processed by *parallel-mpileup* before its send to VarScan.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
284
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
285 .. _VarScan: http://varscan.sourceforge.net/
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
286
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
287 **Input formats**
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
288
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
289 VarScan2 accepts sequencing alignments in the same, either SAM or BAM format (http://samtools.sourceforge.net/). The alignment files have to be linked to a reference genome by galaxy. This is indicated under every history item with e.g.: *"database: hg19"* for a link to hg19, or *"database: ?"* if the link is missing.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
290
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
291 **Installation**
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
292
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
293 Make sure your reference genomes are properly annotated in "tool-data/all_fasta.loc", and linked to the names of the reference used for alignment.
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
294
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
295 **License**
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
296
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
297 * VarScan2.3.6: Non-Profit Open Software License 3.0 (Non-Profit OSL 3.0)
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
298 * parallel-mpileup: MIT License (https://github.com/mydatascience/parallel-mpileup/blob/master/samtools-0.1.19/COPYING)
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
299
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
300
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
301 **Contact**
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
302
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
303 The tool wrapper has been written by Youri Hoogstrate from the Erasmus Medical Center (Rotterdam, Netherlands) on behalf of the Translational Research IT (TraIT) project:
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
304 http://www.ctmm.nl/en/programmas/infrastructuren/traitprojecttranslationeleresearch
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
305
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
306 More tools by the Translational Research IT (TraIT) project can be found in the following repository:
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
307 http://toolshed.dtls.nl/
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
308 </help>
796653c6376b Uploaded
jason-ellul
parents:
diff changeset
309 </tool>