Mercurial > repos > greg > bcftools_sort
comparison macros.xml @ 0:770db64c4cfc draft
Uploaded
| author | greg |
|---|---|
| date | Thu, 01 Nov 2018 10:23:32 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:770db64c4cfc |
|---|---|
| 1 <macros> | |
| 2 <token name="@VERSION@">1.4.0</token> | |
| 3 <xml name="requirements"> | |
| 4 <requirements> | |
| 5 <requirement type="package" version="1.9">bcftools</requirement> | |
| 6 <requirement type="package" version="1.9">htslib</requirement> | |
| 7 <yield /> | |
| 8 </requirements> | |
| 9 </xml> | |
| 10 <xml name="citations"> | |
| 11 <citations> | |
| 12 <citation type="doi">10.1093/bioinformatics/btp352</citation> | |
| 13 <yield /> | |
| 14 </citations> | |
| 15 </xml> | |
| 16 <token name="@THREADS@"> | |
| 17 --threads \${GALAXY_SLOTS:-4} | |
| 18 </token> | |
| 19 <token name="@PREPARE_ENV@"> | |
| 20 <![CDATA[ | |
| 21 export BCFTOOLS_PLUGINS=`which bcftools | sed 's,bin/bcftools,libexec/bcftools,'`; | |
| 22 ]]> | |
| 23 </token> | |
| 24 <xml name="macro_input"> | |
| 25 <param name="input_file" type="data" format="vcf,vcf_bgzip,bcf,bcf_bgzip" label="VCF/BCF Data" /> | |
| 26 </xml> | |
| 27 <token name="@PREPARE_INPUT_FILE@"> | |
| 28 <![CDATA[ | |
| 29 ## May need to symlink input if there is an associated | |
| 30 #set $input_vcf = 'input.vcf.gz' | |
| 31 #if $input_file.is_of_type('vcf') | |
| 32 bgzip -c '$input_file' > $input_vcf && | |
| 33 bcftools index $input_vcf && | |
| 34 #elif $input_file.is_of_type('vcf_bgzip') | |
| 35 ln -s '$input_file' $input_vcf && | |
| 36 #elif $input_file.is_of_type('bcf') | |
| 37 #set $input_vcf = 'input.bcf' | |
| 38 ln -s '$input_file' $input_vcf && | |
| 39 #if $input_file.metadata.bcf_index: | |
| 40 ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi && | |
| 41 #else | |
| 42 bcftools index $input_vcf && | |
| 43 #end if | |
| 44 #elif $input_file.is_of_type('bcf_bgzip') | |
| 45 ln -s '$input_file' $input_vcf && | |
| 46 #end if | |
| 47 ]]> | |
| 48 </token> | |
| 49 <token name="@INPUT_FILE@"> | |
| 50 $input_vcf | |
| 51 </token> | |
| 52 <xml name="macro_select_output_type"> | |
| 53 <param name="output_type" type="select"> | |
| 54 <option value="b">compressed BCF</option> | |
| 55 <option value="u">uncompressed BCF</option> | |
| 56 <option value="z">compressed VCF</option> | |
| 57 <option value="v">uncompressed VCF</option> | |
| 58 </param> | |
| 59 </xml> | |
| 60 <token name="@OUTPUT_TYPE@"> | |
| 61 #if str($output_type) != "__none__": | |
| 62 --output-type '${output_type}' | |
| 63 #end if | |
| 64 </token> | |
| 65 | |
| 66 <xml name="macro_vcf_output"> | |
| 67 <data name="output_file" format="vcf"> | |
| 68 <change_format> | |
| 69 <when input="output_type" value="b" format="bcf" /> | |
| 70 <when input="output_type" value="u" format="bcf" /> | |
| 71 <when input="output_type" value="z" format="vcf_bgzip" /> | |
| 72 <when input="output_type" value="v" format="vcf" /> | |
| 73 </change_format> | |
| 74 </data> | |
| 75 </xml> | |
| 76 | |
| 77 <token name="@OUTPUT_HELP@"> | |
| 78 <![CDATA[ | |
| 79 Output Type | |
| 80 ----------- | |
| 81 | |
| 82 Output compressed BCF (b), or uncompressed VCF (v). | |
| 83 Use the BCF option when piping between bcftools subcommands to speed up | |
| 84 performance by removing unecessary compression/decompression | |
| 85 and VCF<->BCF conversion. | |
| 86 | |
| 87 This Galaxy tool recommends using the compressed BCF format | |
| 88 as piping is not implemented, and uncompressed data would | |
| 89 use unnecessary amounts of space. | |
| 90 ]]></token> | |
| 91 </macros> | |
| 92 |
