Mercurial > repos > iuc > snpsift
annotate snpSift_filter.xml @ 14:80da7fae14b8 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
| author | iuc |
|---|---|
| date | Mon, 05 Dec 2016 12:10:54 -0500 |
| parents | ed810da439cc |
| children | 8bd645802765 |
| rev | line source |
|---|---|
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
1 <tool id="snpSift_filter" name="SnpSift Filter" version="@WRAPPER_VERSION@.1"> |
| 0 | 2 <description>Filter variants using arbitrary expressions</description> |
| 3 <macros> | |
| 4 <import>snpSift_macros.xml</import> | |
| 5 </macros> | |
|
11
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
6 <expand macro="requirements" /> |
|
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
7 <expand macro="stdio" /> |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
8 <expand macro="version_command" /> |
|
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
9 |
|
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
10 <command><![CDATA[ |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
11 @CONDA_SNPSIFT_JAR_PATH@ && |
|
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
12 java -Xmx6G -jar "\$SNPSIFT_JAR_PATH/SnpSift.jar" filter -f "$input" -e "$exprFile" $inverse |
| 0 | 13 #if $filtering.mode == 'field': |
| 14 #if $filtering.replace.pass: | |
| 15 --pass | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
16 #if $filtering.replace.filterId and len(str($filtering.replace.filterId).strip()) > 0: |
| 0 | 17 --filterId "$filtering.replace.filterId" |
| 18 #end if | |
| 19 #end if | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
20 #if $filtering.addFilter and len(str($filtering.addFilter).strip()) > 0: |
| 0 | 21 --addFilter "$filtering.addFilter" |
| 22 #end if | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
23 #if $filtering.rmFilter and len(str($filtering.rmFilter).strip()) > 0: |
| 0 | 24 --rmFilter "$filtering.rmFilter" |
| 25 #end if | |
| 26 #end if | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
27 > "$output" |
|
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
28 ]]> |
| 0 | 29 </command> |
|
11
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
30 <configfiles> |
|
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
31 <configfile name="exprFile"> |
|
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
32 $expr#slurp |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
33 </configfile> |
|
11
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
34 </configfiles> |
| 0 | 35 <inputs> |
| 36 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/> | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
37 <param name="expr" type="text" label="Filter criteria" help="Need help? See below a few examples." > |
|
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
38 <sanitizer sanitize="False"/> |
|
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
39 </param> |
| 0 | 40 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" /> |
| 41 <conditional name="filtering"> | |
| 42 <param name="mode" type="select" label="Filter mode"> | |
| 43 <option value="entries" selected="true">Retain entries that pass filter, remove other entries</option> | |
| 44 <option value="field">Change the FILTER field, but retain all entries</option> | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
45 </param> |
| 0 | 46 <when value="entries"/> |
| 47 <when value="field"> | |
| 48 <conditional name="replace"> | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
49 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'" |
| 0 | 50 help="appends an ID tag to non-matching entry FILTER "/> |
| 51 <when value="no"/> | |
| 52 <when value="yes"> | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
53 <param name="filterId" type="text" value="" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." help="Default ID is 'SnpSift'"/> |
| 0 | 54 </when> |
| 55 </conditional> | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
56 <param name="addFilter" type="text" value="" label="Add a string to FILTER VCF field if 'expression' is true." /> |
|
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
57 <param name="rmFilter" type="text" value="" label="Remove a string from FILTER VCF field if 'expression' is true (and 'str' is in the field)." /> |
| 0 | 58 </when> |
| 59 </conditional> | |
| 60 </inputs> | |
| 61 | |
| 62 <outputs> | |
| 63 <data format="vcf" name="output" /> | |
| 64 </outputs> | |
| 65 <tests> | |
| 66 <test> | |
| 67 <param name="input" ftype="vcf" value="test01.vcf"/> | |
| 68 <param name="expr" value="QUAL >= 50"/> | |
| 69 <param name="mode" value="entries"/> | |
| 70 <output name="output"> | |
| 71 <assert_contents> | |
| 72 <has_text text="28837706" /> | |
| 73 <not_has_text text="NT_166464" /> | |
| 74 </assert_contents> | |
| 75 </output> | |
| 76 </test> | |
| 77 | |
| 78 <test> | |
| 79 <param name="input" ftype="vcf" value="test01.vcf"/> | |
| 80 <param name="expr" value="(CHROM = '19')"/> | |
| 81 <param name="mode" value="entries"/> | |
| 82 <output name="output"> | |
| 83 <assert_contents> | |
| 84 <has_text text="3205820" /> | |
| 85 <not_has_text text="NT_16" /> | |
| 86 </assert_contents> | |
| 87 </output> | |
| 88 </test> | |
| 89 | |
| 90 <test> | |
| 91 <param name="input" ftype="vcf" value="test01.vcf"/> | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
92 <param name="expr" value="(POS >= 20175) & (POS <= 35549)"/> |
| 0 | 93 <param name="mode" value="entries"/> |
| 94 <output name="output"> | |
| 95 <assert_contents> | |
| 96 <has_text text="20175" /> | |
| 97 <has_text text="35549" /> | |
| 98 <has_text text="22256" /> | |
| 99 <not_has_text text="18933" /> | |
| 100 <not_has_text text="37567" /> | |
| 101 </assert_contents> | |
| 102 </output> | |
| 103 </test> | |
| 104 | |
| 105 <test> | |
| 106 <param name="input" ftype="vcf" value="test01.vcf"/> | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
107 <param name="expr" value="( DP >= 5 )"/> |
| 0 | 108 <param name="mode" value="entries"/> |
| 109 <output name="output"> | |
| 110 <assert_contents> | |
| 111 <has_text text="DP=5;" /> | |
| 112 <has_text text="DP=6;" /> | |
| 113 <not_has_text text="DP=1;" /> | |
| 114 </assert_contents> | |
| 115 </output> | |
| 116 </test> | |
| 117 </tests> | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
118 <help><![CDATA[ |
| 0 | 119 |
| 120 **SnpSift filter** | |
| 121 | |
| 122 You can filter a VCF file using arbitrary expressions, for instance "(QUAL > 30) | (exists INDEL) | ( countHet() > 2 )". The actual expressions can be quite complex, so it allows for a lot of flexibility. | |
| 123 | |
| 124 Some examples: | |
| 125 | |
| 126 - *I want just the variants from the second million bases of chr1*: | |
| 127 | |
| 128 :: | |
| 129 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
130 ( CHROM = 'chr1' ) & ( POS > 1000000 ) & ( POS < 2000000 ) |
| 0 | 131 |
| 132 - *Filter value is either 'PASS' or it is missing*: | |
| 133 | |
| 134 :: | |
| 135 | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
136 (FILTER = 'PASS') | ( na FILTER ) |
| 0 | 137 |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
138 - *I want to filter lines with an ANN annotation EFFECT of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*: |
| 0 | 139 |
| 140 :: | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
141 |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
142 ( ANN[*].EFFECT has 'frameshift_variant' ) |
|
11
b884686a80dc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
iuc
parents:
0
diff
changeset
|
143 |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
144 **Important** According to the specification, there can be more than one EFFECT separated by & (e.g. 'missense_variant&splice_region_variant', thus using has operator is better than using equality operator (=). For instance 'missense_variant&splice_region_variant' = 'missense_variant' is false, whereas 'missense_variant&splice_region_variant' has 'missense_variant' is true. |
| 0 | 145 |
| 146 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*: | |
| 147 | |
| 148 :: | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
149 |
| 0 | 150 ( EFF[*].EFFECT = 'FRAME_SHIFT' ) |
| 151 | |
| 152 - *I want to filter out samples with quality less than 30*: | |
| 153 | |
| 154 :: | |
| 155 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
156 ( QUAL > 30 ) |
| 0 | 157 |
| 158 - *...but we also want InDels that have quality 20 or more*: | |
| 159 | |
| 160 :: | |
| 161 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
162 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
163 |
| 0 | 164 - *...or any homozygous variant present in more than 3 samples*: |
| 165 | |
| 166 :: | |
| 167 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
168 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
169 |
| 0 | 170 - *...or any heterozygous sample with coverage 25 or more*: |
| 171 | |
| 172 :: | |
| 173 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
174 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
175 |
| 0 | 176 - *I want to keep samples where the genotype for the first sample is homozygous variant and the genotype for the second sample is reference*: |
| 177 | |
| 178 :: | |
|
14
80da7fae14b8
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12355cea76843e3ed6f09d96c3e9fe22afe4a4f
iuc
parents:
13
diff
changeset
|
179 |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
180 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] )) |
| 0 | 181 |
| 182 | |
| 183 **For information regarding HGVS and Sequence Ontology terms versus classic names**: | |
| 184 | |
| 185 - http://snpeff.sourceforge.net/SnpEff_manual.html#cmdline for the options: -classic, -hgvs, and -sequenceOntology | |
| 186 - http://snpeff.sourceforge.net/SnpEff_manual.html#input for the table containing the classic name and sequence onology term for each effect | |
| 187 | |
| 188 | |
| 189 @EXTERNAL_DOCUMENTATION@ | |
| 190 http://snpeff.sourceforge.net/SnpSift.html#filter | |
| 191 | |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
192 ]]> |
| 0 | 193 </help> |
|
13
ed810da439cc
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit d12a2e9dd273b4c23db48bbb747f32700887710e
iuc
parents:
12
diff
changeset
|
194 <expand macro="citations" /> |
| 0 | 195 </tool> |
