Mercurial > repos > iuc > snpsift
comparison snpSift_filter.xml @ 11:b884686a80dc draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/snpsift/snpsift commit 344140b8df53b8b7024618bb04594607a045c03a
| author | iuc |
|---|---|
| date | Mon, 04 May 2015 22:37:06 -0400 |
| parents | f0faaa4d6ee5 |
| children | 6bf58286d795 |
comparison
equal
deleted
inserted
replaced
| 10:93577c5e76ec | 11:b884686a80dc |
|---|---|
| 1 <tool id="snpSift_filter" name="SnpSift Filter" version="4.0.0"> | 1 <tool id="snpSift_filter" name="SnpSift Filter" version="4.0.0"> |
| 2 <options sanitize="False" /> | 2 <options sanitize="False" /> |
| 3 <description>Filter variants using arbitrary expressions</description> | 3 <description>Filter variants using arbitrary expressions</description> |
| 4 <expand macro="requirements" /> | |
| 5 <macros> | 4 <macros> |
| 6 <import>snpSift_macros.xml</import> | 5 <import>snpSift_macros.xml</import> |
| 7 </macros> | 6 </macros> |
| 7 <expand macro="requirements" /> | |
| 8 <expand macro="stdio" /> | |
| 8 <command> | 9 <command> |
| 9 java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile $inverse | 10 java -Xmx6G -jar \$SNPEFF_JAR_PATH/SnpSift.jar filter -f $input -e $exprFile $inverse |
| 10 #if $filtering.mode == 'field': | 11 #if $filtering.mode == 'field': |
| 11 #if $filtering.replace.pass: | 12 #if $filtering.replace.pass: |
| 12 --pass | 13 --pass |
| 13 #if $filtering.replace.filterId and len($filtering.replace.filterId.__str__.strip()) > 0: | 14 #if $filtering.replace.filterId and len($filtering.replace.filterId.__str__.strip()) > 0: |
| 14 --filterId "$filtering.replace.filterId" | 15 --filterId "$filtering.replace.filterId" |
| 21 --rmFilter "$filtering.rmFilter" | 22 --rmFilter "$filtering.rmFilter" |
| 22 #end if | 23 #end if |
| 23 #end if | 24 #end if |
| 24 > $output | 25 > $output |
| 25 </command> | 26 </command> |
| 27 <configfiles> | |
| 28 <configfile name="exprFile"> | |
| 29 $expr#slurp | |
| 30 </configfile> | |
| 31 </configfiles> | |
| 26 <inputs> | 32 <inputs> |
| 27 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/> | 33 <param format="vcf" name="input" type="data" label="Variant input file in VCF format"/> |
| 28 <param name="expr" type="text" label="Filter criteria" size="160" help="Need help? See below a few examples." /> | 34 <param name="expr" type="text" label="Filter criteria" size="160" help="Need help? See below a few examples." /> |
| 29 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" /> | 35 <param name="inverse" type="boolean" truevalue="--inverse" falsevalue="" checked="false" label="Inverse filter" help="Show lines that do not match filter expression" /> |
| 30 <conditional name="filtering"> | 36 <conditional name="filtering"> |
| 31 <param name="mode" type="select" label="Filter mode"> | 37 <param name="mode" type="select" label="Filter mode"> |
| 32 <option value="entries" selected="true">Retain entries that pass filter, remove other entries</option> | 38 <option value="entries" selected="true">Retain entries that pass filter, remove other entries</option> |
| 33 <option value="field">Change the FILTER field, but retain all entries</option> | 39 <option value="field">Change the FILTER field, but retain all entries</option> |
| 34 </param> | 40 </param> |
| 35 <when value="entries"/> | 41 <when value="entries"/> |
| 36 <when value="field"> | 42 <when value="field"> |
| 37 <conditional name="replace"> | 43 <conditional name="replace"> |
| 38 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'" | 44 <param name="pass" type="boolean" truevalue="yes" falsevalue="no" checked="false" label="Set matching entry FILTER to 'PASS'" |
| 39 help="appends an ID tag to non-matching entry FILTER "/> | 45 help="appends an ID tag to non-matching entry FILTER "/> |
| 40 <when value="no"/> | 46 <when value="no"/> |
| 41 <when value="yes"> | 47 <when value="yes"> |
| 42 <param name="filterId" type="text" value="" optional="true" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." size="10" | 48 <param name="filterId" type="text" value="" optional="true" label="ID appended to non-matching (##FILTER tag in header and FILTER VCF field)." size="10" |
| 43 help="Default ID is 'SnpSift'"/> | 49 help="Default ID is 'SnpSift'"/> |
| 46 <param name="addFilter" type="text" value="" optional="true" label="Add a string to FILTER VCF field if 'expression' is true." size="10"/> | 52 <param name="addFilter" type="text" value="" optional="true" label="Add a string to FILTER VCF field if 'expression' is true." size="10"/> |
| 47 <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)." size="10"/> | 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)." size="10"/> |
| 48 </when> | 54 </when> |
| 49 </conditional> | 55 </conditional> |
| 50 </inputs> | 56 </inputs> |
| 51 <configfiles> | |
| 52 <configfile name="exprFile"> | |
| 53 $expr#slurp | |
| 54 </configfile> | |
| 55 </configfiles> | |
| 56 | 57 |
| 57 <outputs> | 58 <outputs> |
| 58 <data format="vcf" name="output" /> | 59 <data format="vcf" name="output" /> |
| 59 </outputs> | 60 </outputs> |
| 60 <expand macro="stdio" /> | |
| 61 <tests> | 61 <tests> |
| 62 <test> | 62 <test> |
| 63 <param name="input" ftype="vcf" value="test01.vcf"/> | 63 <param name="input" ftype="vcf" value="test01.vcf"/> |
| 64 <param name="expr" value="QUAL >= 50"/> | 64 <param name="expr" value="QUAL >= 50"/> |
| 65 <param name="mode" value="entries"/> | 65 <param name="mode" value="entries"/> |
| 127 | 127 |
| 128 - *Filter value is either 'PASS' or it is missing*: | 128 - *Filter value is either 'PASS' or it is missing*: |
| 129 | 129 |
| 130 :: | 130 :: |
| 131 | 131 |
| 132 (FILTER = 'PASS') | ( na FILTER ) | 132 (FILTER = 'PASS') | ( na FILTER ) |
| 133 | 133 |
| 134 - *I want to filter lines with an EFF of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*: | 134 - *I want to filter lines with an EFF of 'frameshift_variant' ( for vcf files using Sequence Ontology terms )*: |
| 135 | 135 |
| 136 :: | 136 :: |
| 137 | 137 |
| 138 ( EFF[*].EFFECT = 'frameshift_variant' ) | 138 ( EFF[*].EFFECT = 'frameshift_variant' ) |
| 139 | 139 |
| 140 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*: | 140 - *I want to filter lines with an EFF of 'FRAME_SHIFT' ( for vcf files using Classic Effect names )*: |
| 141 | 141 |
| 142 :: | 142 :: |
| 143 | 143 |
| 144 ( EFF[*].EFFECT = 'FRAME_SHIFT' ) | 144 ( EFF[*].EFFECT = 'FRAME_SHIFT' ) |
| 145 | 145 |
| 146 - *I want to filter out samples with quality less than 30*: | 146 - *I want to filter out samples with quality less than 30*: |
| 147 | 147 |
| 148 :: | 148 :: |
| 152 - *...but we also want InDels that have quality 20 or more*: | 152 - *...but we also want InDels that have quality 20 or more*: |
| 153 | 153 |
| 154 :: | 154 :: |
| 155 | 155 |
| 156 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) | 156 (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
| 157 | 157 |
| 158 - *...or any homozygous variant present in more than 3 samples*: | 158 - *...or any homozygous variant present in more than 3 samples*: |
| 159 | 159 |
| 160 :: | 160 :: |
| 161 | 161 |
| 162 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) | 162 (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
| 163 | 163 |
| 164 - *...or any heterozygous sample with coverage 25 or more*: | 164 - *...or any heterozygous sample with coverage 25 or more*: |
| 165 | 165 |
| 166 :: | 166 :: |
| 167 | 167 |
| 168 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) | 168 ((countHet() > 0) & (DP >= 25)) | (countHom() > 3) | (( exists INDEL ) & (QUAL >= 20)) | (QUAL >= 30 ) |
| 169 | 169 |
| 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*: | 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*: |
| 171 | 171 |
| 172 :: | 172 :: |
| 173 | 173 |
| 174 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] )) | 174 (isHom( GEN[0] ) & isVariant( GEN[0] ) & isRef( GEN[1] )) |
| 175 | 175 |
| 176 | 176 |
| 177 **For information regarding HGVS and Sequence Ontology terms versus classic names**: | 177 **For information regarding HGVS and Sequence Ontology terms versus classic names**: |
| 178 | 178 |
