Mercurial > repos > jjohnson > bcftools_convert_to_vcf
comparison bcftools_convert_to_vcf.xml @ 0:bca07db8f55c draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 21c66fb27c7e2fd21c7f7607b3b29e77e64fb86d-dirty
author | jjohnson |
---|---|
date | Sat, 25 Jun 2016 20:47:33 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:bca07db8f55c |
---|---|
1 <?xml version='1.0' encoding='utf-8'?> | |
2 <tool name="bcftools @EXECUTABLE@ to vcf" id="bcftools_@EXECUTABLE@_to_vcf" version="@VERSION@.0"> | |
3 <description>Converts other formats to VCF/BCFk</description> | |
4 <macros> | |
5 <token name="@EXECUTABLE@">convert</token> | |
6 <import>macros.xml</import> | |
7 </macros> | |
8 <expand macro="requirements" /> | |
9 <expand macro="version_command" /> | |
10 <command detect_errors="aggressive"><![CDATA[ | |
11 @PREPARE_ENV@ | |
12 #set $input_vcf = None | |
13 #if $convert.convert_from == 'gvcf': | |
14 #set $input_vcf = 'input.vcf.gz' | |
15 #if $convert.input_file.datatype.file_ext == 'vcf' | |
16 bgzip -c "$convert.input_file" > $input_vcf && | |
17 bcftools index $input_vcf && | |
18 #elif $convert.input_file.datatype.file_ext == 'vcf_bgzip' | |
19 ln -s "$convert.input_file" $input_vcf | |
20 #elif $convert.input_file.datatype.file_ext == 'bcf' | |
21 #set $input_vcf = 'input.bcf' | |
22 ln -s "$convert.input_file" $input_vcf && | |
23 bcftools index $input_vcf && | |
24 #elif $convert.input_file.datatype.file_ext == 'bcf_bgzip' | |
25 ln -s "$convert.input_file" $input_vcf && | |
26 #end if | |
27 #end if | |
28 #set $section = $convert | |
29 @PREPARE_FASTA_REF@ | |
30 | |
31 bcftools @EXECUTABLE@ | |
32 | |
33 @OUTPUT_TYPE@ | |
34 | |
35 #set $section = $convert | |
36 #if $convert.convert_from == 'gen_sample': | |
37 --gensample2vcf "$convert.input_file,$convert.input_sample" | |
38 #elif $convert.convert_from == 'hap_sample': | |
39 --hapsample2vcf "$convert.input_file,$convert.input_sample" | |
40 #elif $convert.convert_from == 'hap_legend_sample': | |
41 --haplegendsample2vcf "$convert.input_file,$convert.input_legend,$convert.input_sample" | |
42 #elif $convert.convert_from == 'gvcf': | |
43 @FASTA_REF@ | |
44 --gvcf2vcf $input_vcf | |
45 #elif $convert.convert_from == 'tsv': | |
46 @FASTA_REF@ | |
47 @SAMPLES@ | |
48 @COLUMNS@ | |
49 --tsv2vcf "$convert.input_file" | |
50 #end if | |
51 > "$output_file" | |
52 ]]> | |
53 </command> | |
54 <inputs> | |
55 <conditional name="convert"> | |
56 <param name="convert_from" type="select" label="convert from"> | |
57 <option value="tsv">tsv - TAB-Separated-Value (e.g. 23andMe)</option> | |
58 <option value="gvcf">gVCF - GATK Variant Call Format</option> | |
59 <option value="gen_sample">gen sample - IMPUTE2 or SHAPEIT</option> | |
60 <option value="hap_sample">haps sample - IMPUTE2 or SHAPEIT</option> | |
61 <option value="hap_legend_sample">haps legend sample - IMPUTE2 or SHAPEIT</option> | |
62 </param> | |
63 <when value="tsv"> | |
64 <param name="input_file" type="data" format="tabular" label="Tabular Variant Data" | |
65 help="Reference sequence and samples are required"/> | |
66 <expand macro="macro_fasta_ref" /> | |
67 <expand macro="macro_samples"/> | |
68 <expand macro="macro_columns"/> | |
69 </when> | |
70 <when value="gvcf"> | |
71 <param name="input_file" type="data" format="gvcf" label="Genomic VCF (GATK HaplotypeCaller)" /> | |
72 <expand macro="macro_fasta_ref" /> | |
73 </when> | |
74 <when value="gen_sample"> | |
75 <param name="input_file" type="data" format="tabular" label="The .gen file" /> | |
76 <param name="input_sample" type="data" format="tabular" label="The .samples file" /> | |
77 </when> | |
78 <when value="hap_sample"> | |
79 <param name="input_file" type="data" format="tabular" label="The .hap file" /> | |
80 <param name="input_sample" type="data" format="tabular" label="The .samples file" /> | |
81 </when> | |
82 <when value="hap_legend_sample"> | |
83 <param name="input_file" type="data" format="tabular" label="The .hap file" /> | |
84 <param name="input_legend" type="data" format="tabular" label="The .legend file" /> | |
85 <param name="input_sample" type="data" format="tabular" label="The .samples file" /> | |
86 </when> | |
87 | |
88 </conditional> | |
89 <expand macro="macro_select_output_type" /> | |
90 </inputs> | |
91 <outputs> | |
92 <expand macro="macro_vcf_output"/> | |
93 </outputs> | |
94 <tests> | |
95 <test> | |
96 <param name="convert_from" value="gen_sample" /> | |
97 <param name="input_file" ftype="tabular" value="convert.gs.gt.gen" /> | |
98 <param name="input_sample" ftype="tabular" value="convert.gs.gt.samples" /> | |
99 <param name="output_type" value="v" /> | |
100 <output name="output_file"> | |
101 <assert_contents> | |
102 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | |
103 <has_text_matching expression="X\t2698560\t.\tG\tA\t.\t.\t.\tGT:GP" /> | |
104 </assert_contents> | |
105 </output> | |
106 </test> | |
107 <test> | |
108 <param name="convert_from" value="hap_sample" /> | |
109 <param name="input_file" ftype="tabular" value="convert.hs.gt.hap" /> | |
110 <param name="input_sample" ftype="tabular" value="convert.hs.gt.samples" /> | |
111 <param name="output_type" value="v" /> | |
112 <output name="output_file"> | |
113 <assert_contents> | |
114 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | |
115 <has_text_matching expression="X\t2698769\t.\tAAG\tA\t.\t.\t.\tGT\t1|0\t1|1\t0|1\t1|0\t1|0\t0|0\t0|0\t0|0\t0|0\t0|0" /> | |
116 </assert_contents> | |
117 </output> | |
118 </test> | |
119 <test> | |
120 <param name="convert_from" value="hap_legend_sample" /> | |
121 <param name="input_file" ftype="tabular" value="convert.hls.gt.hap" /> | |
122 <param name="input_legend" ftype="tabular" value="convert.hls.gt.legend" /> | |
123 <param name="input_sample" ftype="tabular" value="convert.hls.gt.samples" /> | |
124 <param name="output_type" value="v" /> | |
125 <output name="output_file"> | |
126 <assert_contents> | |
127 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | |
128 <has_text_matching expression="X\t2698769\t.\tAAG\tA\t.\t.\t.\tGT\t1|0\t1|1\t0|1\t1|0\t1|0\t0|0\t0|0\t0|0\t0|0\t0|0" /> | |
129 </assert_contents> | |
130 </output> | |
131 </test> | |
132 <test> | |
133 <param name="convert_from" value="gvcf" /> | |
134 <param name="input_file" ftype="vcf" value="convert.gvcf.vcf" /> | |
135 <param name="fasta_ref" ftype="fasta" value="gvcf.fa" /> | |
136 <param name="output_type" value="v" /> | |
137 <output name="output_file"> | |
138 <assert_contents> | |
139 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE99" /> | |
140 <has_text_matching expression="22\t10\t.\tC\t.\t0\tLowGQX\tEND=20;BLOCKAVG_min30p3a\tGT:GQX:DP:DPF\t0/0:5:2:0" /> | |
141 </assert_contents> | |
142 </output> | |
143 </test> | |
144 <test> | |
145 <param name="convert_from" value="tsv" /> | |
146 <param name="input_file" ftype="tabular" value="convert.23andme" /> | |
147 <param name="fasta_ref" ftype="fasta" value="23andme.fa" /> | |
148 <param name="samples" value="SAMPLE1" /> | |
149 <param name="columns" value="ID,CHROM,POS,AA" /> | |
150 <param name="output_type" value="v" /> | |
151 <output name="output_file"> | |
152 <assert_contents> | |
153 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE1" /> | |
154 <has_text_matching expression="1\t10\trs002\tG\tA\t.\t.\t.\tGT\t1/0" /> | |
155 </assert_contents> | |
156 </output> | |
157 </test> | |
158 </tests> | |
159 | |
160 <help><![CDATA[ | |
161 ===================================== | |
162 bcftools @EXECUTABLE@ plugin | |
163 ===================================== | |
164 | |
165 Converts other variant formats to vcf. See man page for file formats details. | |
166 | |
167 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ | |
168 | |
169 @BCFTOOLS_WIKI@ | |
170 ]]> | |
171 </help> | |
172 <expand macro="citations" /> | |
173 </tool> |