comparison table_annovar.xml @ 7:08b003ee9db7 draft

Uploaded
author devteam
date Wed, 22 Apr 2015 23:52:01 -0400
parents 091154194ce8
children d4e292ddda05
comparison
equal deleted inserted replaced
6:091154194ce8 7:08b003ee9db7
1 <tool id="table_annovar" name="ANNOVAR Annotate VCF" version="0.1"> 1 <tool id="table_annovar" name="ANNOVAR Annotate VCF" version="0.2">
2 <description>with functional information using ANNOVAR</description> 2 <description>with functional information using ANNOVAR</description>
3 3
4 <requirements> 4 <requirements>
5 <requirement type="package">annovar</requirement> 5 <requirement type="package">annovar</requirement>
6 <requirement type="set_environment">SCRIPT_PATH</requirement> 6 <requirement type="set_environment">SCRIPT_PATH</requirement>
7 </requirements> 7 </requirements>
8 8
9 <command> 9 <command>
10 ## Convert VCF to AV input format. 10 ## Convert VCF to AV input format.
11 convert2annovar.pl -format vcf4 -includeinfo ${input} > input.avinput 11 #if str($out_format) == "tabular":
12 convert2annovar.pl -format vcf4 -includeinfo ${input} > input.avinput ;
13 #set tab_anno_input = "input.avinput"
14 #else:
15 #set tab_anno_input = $input
16 #end if
12 17
13 ## Variant annotation; make sure to include entry in indexes table for build database. 18 ## Variant annotation; make sure to include entry in indexes table for build database.
14 19
15 #set protocol = [] 20 #set protocol = []
16 #set operation = [] 21 #set operation = []
17 22
18 ## Add gene annotations. 23 ## Add gene annotations.
32 #silent protocol.append( str( $filters ) ) 37 #silent protocol.append( str( $filters ) )
33 #silent operation.append( ','.join( ['f' for t in range( str($filters).count(',') + 1 )] ) ) 38 #silent operation.append( ','.join( ['f' for t in range( str($filters).count(',') + 1 )] ) )
34 #end if 39 #end if
35 40
36 #set protocol = ','.join( $protocol ) 41 #set protocol = ','.join( $protocol )
37 #set operation = ','.join( $operation ) 42 #set operation = ','.join( $operation )
38 43
39 ## Reduce variants. 44 ## Annotate variants.
40 ; table_annovar.pl input.avinput ${__get_data_table_entry__('annovar_indexes', 'dbkey', $input.dbkey, 'path')} -protocol ${protocol} -operation ${operation} -nastring NA -buildver ${input.dbkey} --outfile output 45 table_annovar.pl ${tab_anno_input} ${__get_data_table_entry__('annovar_indexes', 'dbkey', $input.dbkey, 'path')} -protocol ${protocol} -operation ${operation} -nastring '.' -buildver ${input.dbkey} --outfile output
41 46
42 ## Process annotated table to remove "NA" strings from numerical columns and copy to output. 47 ## Add option to consume/produce VCF.
43 ; cat output.${input.dbkey}_multianno.txt | python \$SCRIPT_PATH/replace_NA.py > ${output} 48 #if str($out_format) == "vcf":
49 --vcfinput
50 #end if
51
52 ## Post-processing: process annotated table to remove "NA" strings from numerical columns if
53 ## tabular. Copy to output.
54 #if str($out_format) == "tabular":
55 ; cat output.${input.dbkey}_multianno.txt | python \${SCRIPT_PATH}/replace_NA.py > ${output}
56 #else:
57 ; cp output.${input.dbkey}_multianno.vcf ${output}
58 #end if
44 </command> 59 </command>
45 60
46 <inputs> 61 <inputs>
47 <param name="input" type="data" format="vcf" metadata_name="dbkey" label="Variants" help=""> 62 <param name="input" type="data" format="vcf" metadata_name="dbkey" label="Variants" help="">
48 <validator type="unspecified_build" /> 63 <validator type="unspecified_build" />
59 <options from_data_table="annovar_indexes"> 74 <options from_data_table="annovar_indexes">
60 <filter type="data_meta" key="dbkey" ref="input" column="1"/> 75 <filter type="data_meta" key="dbkey" ref="input" column="1"/>
61 <filter type="static_value" name="type" value="region" column="2"/> 76 <filter type="static_value" name="type" value="region" column="2"/>
62 </options> 77 </options>
63 </param> 78 </param>
64 79
65 <param name="filters" type="select" multiple="True" label="Annotation Databases" help="" > 80 <param name="filters" type="select" multiple="True" label="Annotation Databases" help="" >
66 <options from_data_table="annovar_indexes"> 81 <options from_data_table="annovar_indexes">
67 <filter type="data_meta" key="dbkey" ref="input" column="1"/> 82 <filter type="data_meta" key="dbkey" ref="input" column="1"/>
68 <filter type="static_value" name="type" value="filter" column="2"/> 83 <filter type="static_value" name="type" value="filter" column="2"/>
69 </options> 84 </options>
70 </param> 85 </param>
86
87 <param name="out_format" type="select" label="Output data type">
88 <option value="vcf">VCF</option>
89 <option value="tabular">Tabular</option>
90 </param>
91
71 </inputs> 92 </inputs>
72 93
73 <stdio> 94 <stdio>
74 <regex match=".*" source="both" level="log" description="tool progress"/> 95 <regex match=".*" source="both" level="log" description="tool progress"/>
75 </stdio> 96 </stdio>
76 97
77 <outputs> 98 <outputs>
78 <data name="output" format="tabular"/> 99 <data name="output" format="tabular">
100 <change_format>
101 <when input="out_format" value="vcf" format="vcf"/>
102 </change_format>
103 </data>
79 </outputs> 104 </outputs>
80 105
81 <tests> 106 <tests>
82 </tests> 107 </tests>
83 108
84 <help> 109 <help>
85 **What it does** 110 **What it does**
86 111
87 This tool will annotate variants using specified gene annotations, regions, and filtering databases. Input is a VCF dataset, and output is a table of annotations for each variant in the 112 This tool will annotate variants using specified gene annotations, regions, and filtering databases. Input is a VCF dataset, and output is a table of annotations for each variant in the
88 VCF dataset. 113 VCF dataset or a VCF dataset with the annotations in INFO fields.
89 114
90 **ANNOVAR Website and Documentation** 115 **ANNOVAR Website and Documentation**
91 116
92 Website: http://www.openbioinformatics.org/annovar/ 117 Website: http://www.openbioinformatics.org/annovar/
93 118