annotate variant_filtration.xml @ 15:01ff8dd37d4d draft default tip

Uploaded
author lz_hust
date Sat, 01 Jun 2019 07:20:41 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
1 <tool id="gatk2_variant_filtration" name="Variant Filtration" version="@VERSION@.0">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
2 <description>on VCF files</description>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
3 <macros>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
4 <import>gatk2_macros.xml</import>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
5 </macros>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
6 <expand macro="requirements" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
7 <expand macro="version_command" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
8 <command interpreter="python">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
9 #from binascii import hexlify
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
10
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
11 gatk2_wrapper.py
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
12 --stdout "${output_log}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
13 -d "--variant:variant,%(file_type)s" "${reference_source.input_variant}" "${reference_source.input_variant.ext}" "input_variant"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
14 -p '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
15 @JAR_PATH@
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
16 -T "VariantFiltration"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
17 \$GATK2_SITE_OPTIONS
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
18
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
19 -o "${output_vcf}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
20
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
21 #if $reference_source.reference_source_selector != "history":
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
22 -R "${reference_source.ref_file.fields.path}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
23 #end if
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
24 '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
25 #for $variant_filter in $variant_filters:
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
26 #set $variant_filter = "--%sExpression '%s' --%sName '%s'" % ( str( $variant_filter.is_genotype_filter ), str( $variant_filter.filter_expression ), str( $variant_filter.is_genotype_filter ), str( $variant_filter.filter_name ) )
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
27 -o '${ hexlify( $variant_filter ) }'
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
28 #end for
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
29
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
30 #if str( $mask_rod_bind_type.mask_rod_bind_type_selector ) == 'set_mask':
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
31 -d "--mask:${mask_rod_bind_type.mask_rod_name},%(file_type)s" "${mask_rod_bind_type.input_mask_rod}" "${mask_rod_bind_type.input_mask_rod.ext}" "input_mask_${mask_rod_bind_type.mask_rod_name}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
32 -p '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
33 --maskExtension "${mask_rod_bind_type.mask_extension}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
34 --maskName "${mask_rod_bind_type.mask_rod_name}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
35 '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
36 #end if
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
37
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
38 #include source=$standard_gatk_options#
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
39
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
40 ##start analysis specific options
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
41 #if $cluster_snp_type.cluster_snp_type_selector == "cluster_snp":
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
42 -p '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
43 --clusterSize "${cluster_snp_type.cluster_size}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
44 --clusterWindowSize "${cluster_snp_type.cluster_window_size}"
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
45 '
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
46 #end if
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
47 -p '${missing_values_in_expressions_should_evaluate_as_failing}'
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
48 </command>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
49 <inputs>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
50 <conditional name="reference_source">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
51 <expand macro="reference_source_selector_param" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
52 <when value="cached">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
53 <param name="input_variant" type="data" format="vcf" label="Variant file to annotate" help="-V,--variant &amp;lt;variant&amp;gt;" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
54 <param name="ref_file" type="select" label="Using reference genome" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
55 <options from_data_table="gatk2_picard_indexes">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
56 <filter type="data_meta" key="dbkey" ref="input_variant" column="dbkey"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
57 </options>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
58 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
59 </param>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
60 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
61 <when value="history"> <!-- FIX ME!!!! -->
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
62 <param name="input_variant" type="data" format="vcf" label="Variant file to annotate" help="-V,--variant &amp;lt;variant&amp;gt;" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
63 <param name="ref_file" type="data" format="fasta" label="Using reference file" help="-R,--reference_sequence &amp;lt;reference_sequence&amp;gt;" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
64 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
65 </conditional>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
66
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
67 <repeat name="variant_filters" title="Variant Filters">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
68 <param name="filter_expression" value="AB &lt; 0.2 || MQ0 &gt; 50" type="text" label="Filter expression" help="JEXL formatted expressions (-filter,--filterExpression &amp;lt;filterExpression&amp;gt;)">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
69 <sanitizer>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
70 <valid initial="string.printable">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
71 <remove value="&apos;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
72 </valid>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
73 <mapping initial="none"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
74 </sanitizer>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
75 </param>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
76 <param name="filter_name" value="custom_filter" type="text" label="Filter name" help="-filterName,--filterName &amp;lt;filterName&amp;gt;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
77 <param name="is_genotype_filter" type="boolean" truevalue="genotypeFilter" falsevalue="filter" label="Use filter at the individual sample level" help="Use -G_filter,--genotypeFilterExpression &amp;lt;genotypeFilterExpression&amp;gt; and -G_filterName,--genotypeFilterName &amp;lt;genotypeFilterName&amp;gt; for filter type" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
78 </repeat>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
79
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
80 <conditional name="mask_rod_bind_type">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
81 <param name="mask_rod_bind_type_selector" type="select" label="Provide a Mask reference-ordered data file">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
82 <option value="set_mask" selected="True">Set mask</option>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
83 <option value="exclude_mask">Don't set mask</option>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
84 </param>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
85 <when value="exclude_mask">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
86 <!-- Do nothing here -->
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
87 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
88 <when value="set_mask">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
89 <param name="input_mask_rod" type="data" format="bed,gatk_dbsnp,vcf" label="Mask ROD file" help="--mask &amp;lt;mask&amp;gt;" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
90 <param name="mask_rod_name" type="text" value="Mask" label="Mask Name" help="-maskName,--maskName &amp;lt;maskName&amp;gt;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
91 <param name="mask_extension" type="integer" value="0" label="Mask Extension" help="-maskExtend,--maskExtension &amp;lt;maskExtension&amp;gt;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
92 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
93 </conditional>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
94
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
95 <expand macro="gatk_param_type_conditional" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
96
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
97 <conditional name="cluster_snp_type">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
98 <param name="cluster_snp_type_selector" type="select" label="Cluster SNPs">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
99 <option value="cluster_snp">Cluster SNPs</option>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
100 <option value="do_not_cluster_snp" selected="True">Do not cluster SNPs</option>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
101 </param>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
102 <when value="do_not_cluster_snp">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
103 <!-- Do nothing here -->
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
104 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
105 <when value="cluster_snp">
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
106 <param name="cluster_size" type="integer" value="3" label="The number of SNPs which make up a cluster" help="-cluster,--clusterSize &amp;lt;clusterSize&amp;gt;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
107 <param name="cluster_window_size" type="integer" value="0" label="The window size (in bases) in which to evaluate clustered SNPs" help="-window,--clusterWindowSize &amp;lt;clusterWindowSize&amp;gt;"/>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
108 </when>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
109 </conditional>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
110
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
111 <param name="missing_values_in_expressions_should_evaluate_as_failing" type="boolean" truevalue="--missingValuesInExpressionsShouldEvaluateAsFailing" falsevalue="" label="Should missing values be considered failing the expression" help="--missingValuesInExpressionsShouldEvaluateAsFailing" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
112
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
113 </inputs>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
114 <outputs>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
115 <data format="vcf" name="output_vcf" label="${tool.name} on ${on_string} (Variant File)" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
116 <data format="txt" name="output_log" label="${tool.name} on ${on_string} (log)" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
117 </outputs>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
118 <tests>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
119 <test>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
120 <param name="reference_source_selector" value="history" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
121 <param name="ref_file" value="phiX.fasta" ftype="fasta" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
122 <param name="input_variant" value="gatk/gatk_variant_annotator/gatk_variant_annotator_out_1.vcf" ftype="vcf" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
123 <param name="filter_expression" value="MQ &lt; 37.74 || MQ0 &gt; 50" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
124 <param name="filter_name" value="Galaxy_filter" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
125 <param name="is_genotype_filter" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
126 <param name="mask_rod_bind_type_selector" value="set_mask" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
127 <param name="input_mask_rod" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
128 <param name="mask_rod_name" value="." />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
129 <param name="mask_extension" value="0" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
130 <param name="gatk_param_type_selector" value="basic" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
131 <param name="cluster_snp_type_selector" value="do_not_cluster_snp" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
132 <param name="missing_values_in_expressions_should_evaluate_as_failing" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
133 <output name="output_vcf" file="gatk/gatk_variant_annotator/gatk_variant_annotator_out_1.vcf" lines_diff="4" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
134 <output name="output_log" file="gatk/gatk_variant_filtration/gatk_variant_filtration_out_1.log.contains" compare="contains" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
135 </test>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
136 </tests>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
137 <help>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
138 **What it does**
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
139
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
140 Filters variant calls using a number of user-selectable, parameterizable criteria.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
141
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
142 For more information on using the VariantFiltration module, see this `tool specific page &lt;http://www.broadinstitute.org/gatk/gatkdocs/org_broadinstitute_sting_gatk_walkers_filters_VariantFiltration.html&gt;`_.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
143
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
144 To learn about best practices for variant detection using GATK, see this `overview &lt;http://www.broadinstitute.org/gatk/guide/topic?name=best-practices&gt;`_.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
145
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
146 If you encounter errors, please view the `GATK FAQ &lt;http://www.broadinstitute.org/gatk/guide/topic?name=faqs&gt;`_.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
147
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
148 ------
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
149
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
150 **Inputs**
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
151
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
152 GenomeAnalysisTK: VariantFiltration accepts a VCF input file.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
153
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
154
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
155 **Outputs**
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
156
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
157 The output is in VCF format.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
158
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
159 Go `here &lt;http://www.broadinstitute.org/gatk/guide/topic?name=intro&gt;`_ for details on GATK file formats.
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
160
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
161 -------
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
162
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
163 **Settings**::
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
164
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
165
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
166 filterExpression One or more expression used with INFO fields to filter (see wiki docs for more info)
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
167 filterName Names to use for the list of filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
168 genotypeFilterExpression One or more expression used with FORMAT (sample/genotype-level) fields to filter (see wiki docs for more info)
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
169 genotypeFilterName Names to use for the list of sample/genotype filters (must be a 1-to-1 mapping); this name is put in the FILTER field for variants that get filtered
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
170 clusterSize The number of SNPs which make up a cluster (see also --clusterWindowSize); [default:3]
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
171 clusterWindowSize The window size (in bases) in which to evaluate clustered SNPs (to disable the clustered SNP filter, set this value to less than 1); [default:0]
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
172 maskName The text to put in the FILTER field if a 'mask' rod is provided and overlaps with a variant call; [default:'Mask']
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
173 missingValuesInExpressionsShouldEvaluateAsFailing When evaluating the JEXL expressions, should missing values be considered failing the expression (by default they are considered passing)?
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
174
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
175 @CITATION_SECTION@
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
176 </help>
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
177 <expand macro="citations" />
01ff8dd37d4d Uploaded
lz_hust
parents:
diff changeset
178 </tool>