Mercurial > repos > iuc > bcftools_convert_to_vcf
comparison bcftools_convert_to_vcf.xml @ 9:d28f63ca1919 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit e648d86d550ddf2eb67237752320c390b3a780e5
| author | iuc |
|---|---|
| date | Wed, 05 Jun 2019 12:49:27 -0400 |
| parents | 45d35a05dbaa |
| children | ca34c1ae8ba8 |
comparison
equal
deleted
inserted
replaced
| 8:45d35a05dbaa | 9:d28f63ca1919 |
|---|---|
| 1 <?xml version='1.0' encoding='utf-8'?> | 1 <?xml version='1.0' encoding='utf-8'?> |
| 2 <tool name="bcftools @EXECUTABLE@ to vcf" id="bcftools_@EXECUTABLE@_to_vcf" version="@TOOL_VERSION@"> | 2 <tool name="bcftools @EXECUTABLE@ to vcf" id="bcftools_@EXECUTABLE@_to_vcf" version="@TOOL_VERSION@+galaxy1"> |
| 3 <description>Converts other formats to VCF/BCFk</description> | 3 <description>Converts other formats to VCF/BCFk</description> |
| 4 <macros> | 4 <macros> |
| 5 <token name="@EXECUTABLE@">convert</token> | 5 <token name="@EXECUTABLE@">convert</token> |
| 6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
| 7 </macros> | 7 </macros> |
| 25 bcftools index $input_vcf && | 25 bcftools index $input_vcf && |
| 26 #elif $convert.input_file.is_of_type('bcf_bgzip') | 26 #elif $convert.input_file.is_of_type('bcf_bgzip') |
| 27 ln -s '$convert.input_file' $input_vcf && | 27 ln -s '$convert.input_file' $input_vcf && |
| 28 #end if | 28 #end if |
| 29 #end if | 29 #end if |
| 30 #set $section = $convert | 30 #if $convert.convert_from == 'gvcf' or $convert.convert_from == 'tsv': |
| 31 @PREPARE_FASTA_REF@ | 31 #set $section = $convert.reference_source |
| 32 @PREPARE_FASTA_REF@ | |
| 33 #end if | |
| 32 | 34 |
| 33 bcftools @EXECUTABLE@ | 35 bcftools @EXECUTABLE@ |
| 34 | 36 |
| 35 @OUTPUT_TYPE@ | 37 @OUTPUT_TYPE@ |
| 36 | 38 |
| 37 #set $section = $convert | |
| 38 #if $convert.convert_from == 'gen_sample': | 39 #if $convert.convert_from == 'gen_sample': |
| 39 --gensample2vcf '$convert.input_file,$convert.input_sample' | 40 --gensample2vcf '$convert.input_file,$convert.input_sample' |
| 40 #elif $convert.convert_from == 'hap_sample': | 41 #elif $convert.convert_from == 'hap_sample': |
| 41 --hapsample2vcf '$convert.input_file,$convert.input_sample' | 42 --hapsample2vcf '$convert.input_file,$convert.input_sample' |
| 42 #elif $convert.convert_from == 'hap_legend_sample': | 43 #elif $convert.convert_from == 'hap_legend_sample': |
| 44 #elif $convert.convert_from == 'gvcf': | 45 #elif $convert.convert_from == 'gvcf': |
| 45 @FASTA_REF@ | 46 @FASTA_REF@ |
| 46 --gvcf2vcf $input_vcf | 47 --gvcf2vcf $input_vcf |
| 47 #elif $convert.convert_from == 'tsv': | 48 #elif $convert.convert_from == 'tsv': |
| 48 @FASTA_REF@ | 49 @FASTA_REF@ |
| 50 #set $section = $convert | |
| 49 @SAMPLES@ | 51 @SAMPLES@ |
| 50 @COLUMNS@ | 52 @COLUMNS@ |
| 51 --tsv2vcf '$convert.input_file' | 53 --tsv2vcf '$convert.input_file' |
| 52 #end if | 54 #end if |
| 53 > '$output_file' | 55 > '$output_file' |
| 93 <outputs> | 95 <outputs> |
| 94 <expand macro="macro_vcf_output"/> | 96 <expand macro="macro_vcf_output"/> |
| 95 </outputs> | 97 </outputs> |
| 96 <tests> | 98 <tests> |
| 97 <test> | 99 <test> |
| 98 <param name="convert_from" value="gen_sample" /> | 100 <conditional name="convert"> |
| 99 <param name="input_file" ftype="tabular" value="convert.gs.gt.gen" /> | 101 <param name="convert_from" value="gen_sample" /> |
| 100 <param name="input_sample" ftype="tabular" value="convert.gs.gt.samples" /> | 102 <param name="input_file" ftype="tabular" value="convert.gs.gt.gen" /> |
| 103 <param name="input_sample" ftype="tabular" value="convert.gs.gt.samples" /> | |
| 104 </conditional> | |
| 101 <param name="output_type" value="v" /> | 105 <param name="output_type" value="v" /> |
| 102 <output name="output_file"> | 106 <output name="output_file"> |
| 103 <assert_contents> | 107 <assert_contents> |
| 104 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | 108 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> |
| 105 <has_text_matching expression="X\t2698560\t.\tG\tA\t.\t.\t.\tGT:GP" /> | 109 <has_text_matching expression="X\t2698560\t.\tG\tA\t.\t.\t.\tGT:GP" /> |
| 106 </assert_contents> | 110 </assert_contents> |
| 107 </output> | 111 </output> |
| 108 </test> | 112 </test> |
| 109 <test> | 113 <test> |
| 110 <param name="convert_from" value="hap_sample" /> | 114 <conditional name="convert"> |
| 111 <param name="input_file" ftype="tabular" value="convert.hs.gt.hap" /> | 115 <param name="convert_from" value="hap_sample" /> |
| 112 <param name="input_sample" ftype="tabular" value="convert.hs.gt.samples" /> | 116 <param name="input_file" ftype="tabular" value="convert.hs.gt.hap" /> |
| 117 <param name="input_sample" ftype="tabular" value="convert.hs.gt.samples" /> | |
| 118 </conditional> | |
| 113 <param name="output_type" value="v" /> | 119 <param name="output_type" value="v" /> |
| 114 <output name="output_file"> | 120 <output name="output_file"> |
| 115 <assert_contents> | 121 <assert_contents> |
| 116 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | 122 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> |
| 117 <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" /> | 123 <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" /> |
| 118 </assert_contents> | 124 </assert_contents> |
| 119 </output> | 125 </output> |
| 120 </test> | 126 </test> |
| 121 <test> | 127 <test> |
| 122 <param name="convert_from" value="hap_legend_sample" /> | 128 <conditional name="convert"> |
| 123 <param name="input_file" ftype="tabular" value="convert.hls.gt.hap" /> | 129 <param name="convert_from" value="hap_legend_sample" /> |
| 124 <param name="input_legend" ftype="tabular" value="convert.hls.gt.legend" /> | 130 <param name="input_file" ftype="tabular" value="convert.hls.gt.hap" /> |
| 125 <param name="input_sample" ftype="tabular" value="convert.hls.gt.samples" /> | 131 <param name="input_legend" ftype="tabular" value="convert.hls.gt.legend" /> |
| 132 <param name="input_sample" ftype="tabular" value="convert.hls.gt.samples" /> | |
| 133 </conditional> | |
| 126 <param name="output_type" value="v" /> | 134 <param name="output_type" value="v" /> |
| 127 <output name="output_file"> | 135 <output name="output_file"> |
| 128 <assert_contents> | 136 <assert_contents> |
| 129 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> | 137 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tNA00001\tNA00002\tNA00003\tNA00004\tNA00005\tNA00006\tNA00007\tNA00008\tNA00009\tNA00010" /> |
| 130 <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" /> | 138 <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" /> |
| 131 </assert_contents> | 139 </assert_contents> |
| 132 </output> | 140 </output> |
| 133 </test> | 141 </test> |
| 134 <test> | 142 <test> |
| 135 <param name="convert_from" value="gvcf" /> | 143 <conditional name="convert"> |
| 136 <param name="input_file" ftype="vcf" value="convert.gvcf.vcf" /> | 144 <param name="convert_from" value="gvcf" /> |
| 137 <param name="fasta_ref" ftype="fasta" value="gvcf.fa" /> | 145 <param name="input_file" ftype="vcf" value="convert.gvcf.vcf" /> |
| 146 <expand macro="test_using_reference" ref="gvcf.fa" /> | |
| 147 </conditional> | |
| 138 <param name="output_type" value="v" /> | 148 <param name="output_type" value="v" /> |
| 139 <output name="output_file"> | 149 <output name="output_file"> |
| 140 <assert_contents> | 150 <assert_contents> |
| 141 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE99" /> | 151 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE99" /> |
| 142 <has_text_matching expression="22\t10\t.\tC\t.\t0\tLowGQX\tBLOCKAVG_min30p3a\tGT:GQX:DP:DPF\t0/0:5:2:0" /> | 152 <has_text_matching expression="22\t10\t.\tC\t.\t0\tLowGQX\tBLOCKAVG_min30p3a\tGT:GQX:DP:DPF\t0/0:5:2:0" /> |
| 143 </assert_contents> | 153 </assert_contents> |
| 144 </output> | 154 </output> |
| 145 </test> | 155 </test> |
| 146 <test> | 156 <test> |
| 147 <param name="convert_from" value="tsv" /> | 157 <conditional name="convert"> |
| 148 <param name="input_file" ftype="tabular" value="convert.23andme" /> | 158 <param name="convert_from" value="gvcf" /> |
| 149 <param name="fasta_ref" ftype="fasta" value="23andme.fa" /> | 159 <param name="input_file" ftype="vcf" dbkey="?" value="convert.gvcf.vcf" /> |
| 150 <param name="samples" value="SAMPLE1" /> | 160 <expand macro="test_using_reference" select_from="cached" ref="gvcf" /> |
| 151 <param name="columns" value="ID,CHROM,POS,AA" /> | 161 </conditional> |
| 162 <param name="output_type" value="v" /> | |
| 163 <output name="output_file"> | |
| 164 <assert_contents> | |
| 165 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE99" /> | |
| 166 <has_text_matching expression="22\t10\t.\tC\t.\t0\tLowGQX\tBLOCKAVG_min30p3a\tGT:GQX:DP:DPF\t0/0:5:2:0" /> | |
| 167 </assert_contents> | |
| 168 </output> | |
| 169 </test> | |
| 170 <test> | |
| 171 <conditional name="convert"> | |
| 172 <param name="convert_from" value="tsv" /> | |
| 173 <param name="input_file" ftype="tabular" value="convert.23andme" /> | |
| 174 <expand macro="test_using_reference" ref="23andme.fa" /> | |
| 175 <param name="samples" value="SAMPLE1" /> | |
| 176 <param name="columns" value="ID,CHROM,POS,AA" /> | |
| 177 </conditional> | |
| 178 <param name="output_type" value="v" /> | |
| 179 <output name="output_file"> | |
| 180 <assert_contents> | |
| 181 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE1" /> | |
| 182 <has_text_matching expression="1\t10\trs002\tG\tA\t.\t.\t.\tGT\t1/0" /> | |
| 183 </assert_contents> | |
| 184 </output> | |
| 185 </test> | |
| 186 <test> | |
| 187 <conditional name="convert"> | |
| 188 <param name="convert_from" value="tsv" /> | |
| 189 <param name="input_file" ftype="tabular" dbkey="?" value="convert.23andme" /> | |
| 190 <expand macro="test_using_reference" select_from="cached" ref="23andme" /> | |
| 191 <param name="samples" value="SAMPLE1" /> | |
| 192 <param name="columns" value="ID,CHROM,POS,AA" /> | |
| 193 </conditional> | |
| 152 <param name="output_type" value="v" /> | 194 <param name="output_type" value="v" /> |
| 153 <output name="output_file"> | 195 <output name="output_file"> |
| 154 <assert_contents> | 196 <assert_contents> |
| 155 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE1" /> | 197 <has_text_matching expression="#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tSAMPLE1" /> |
| 156 <has_text_matching expression="1\t10\trs002\tG\tA\t.\t.\t.\tGT\t1/0" /> | 198 <has_text_matching expression="1\t10\trs002\tG\tA\t.\t.\t.\tGT\t1/0" /> |
