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