# HG changeset patch # User greg # Date 1545227907 18000 # Node ID 1d4c51dcbbbe8ff46d4e278f5fc9572a9d103cc5 Uploaded diff -r 000000000000 -r 1d4c51dcbbbe .shed.yml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.shed.yml Wed Dec 19 08:58:27 2018 -0500 @@ -0,0 +1,11 @@ +name: bcftools_sort +owner: greg +description: | + Contains a tool that sorts VCF/BCF files +homepage_url: https://samtools.github.io/bcftools/bcftools.html +long_description: | + Contains a tool that sorts VCF/BCF files +remote_repository_url: https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/corals/bcftools_sort +type: unrestricted +categories: + - Sequence Analysis diff -r 000000000000 -r 1d4c51dcbbbe bcftools_sort.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bcftools_sort.xml Wed Dec 19 08:58:27 2018 -0500 @@ -0,0 +1,47 @@ + + + sort VCF/BCF files + + sort + macros.xml + + + + + + + + + + + + + + + + + + + + + + diff -r 000000000000 -r 1d4c51dcbbbe macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Dec 19 08:58:27 2018 -0500 @@ -0,0 +1,92 @@ + + 1.4.0 + + + bcftools + htslib + + + + + + 10.1093/bioinformatics/btp352 + + + + + --threads \${GALAXY_SLOTS:-4} + + + + + + + + + $input_vcf && + bcftools index $input_vcf && +#elif $input_file.is_of_type('vcf_bgzip') + ln -s '$input_file' $input_vcf && +#elif $input_file.is_of_type('bcf') + #set $input_vcf = 'input.bcf' + ln -s '$input_file' $input_vcf && + #if $input_file.metadata.bcf_index: + ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi && + #else + bcftools index $input_vcf && + #end if +#elif $input_file.is_of_type('bcf_bgzip') + ln -s '$input_file' $input_vcf && +#end if +]]> + + +$input_vcf + + + + + + + + + + +#if str($output_type) != "__none__": + --output-type '${output_type}' +#end if + + + + + + + + + + + + + + + BCF conversion. + +This Galaxy tool recommends using the compressed BCF format +as piping is not implemented, and uncompressed data would +use unnecessary amounts of space. + ]]> + + diff -r 000000000000 -r 1d4c51dcbbbe test-data/sorted.vcf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sorted.vcf Wed Dec 19 08:58:27 2018 -0500 @@ -0,0 +1,16 @@ +##fileformat=VCFv4.0 +##FILTER= +##INFO= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FILTER= +##contig= +##contig= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A +1 110 . C T,G 1792 Fail XX=11;DP=32 GT:GQ:DP 0/1:245:32 +1 130 . G T 1016 PASS DP=22 GT:GQ:DP 0/1:212:22 +1 130 . GAA GG 1016 PASS DP=22 GT:GQ:DP 0/1:212:22 +2 140 . A G 727 PASS DP=30 GT:GQ:DP 0/1:150:30 +2 160 . TAAAA TA,TC,T 246 PASS DP=10 GT:GQ:DP 0/2:12:10 diff -r 000000000000 -r 1d4c51dcbbbe test-data/unsorted.vcf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/unsorted.vcf Wed Dec 19 08:58:27 2018 -0500 @@ -0,0 +1,15 @@ +##fileformat=VCFv4.0 +##INFO= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FILTER= +##contig= +##contig= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A +2 140 . A G 727 PASS DP=30 GT:GQ:DP 0/1:150:30 +2 160 . TAAAA TA,TC,T 246 PASS DP=10 GT:GQ:DP 0/2:12:10 +1 110 . C T,G 1792 Fail XX=11;DP=32 GT:GQ:DP 0/1:245:32 +1 130 . GAA GG 1016 PASS DP=22 GT:GQ:DP 0/1:212:22 +1 130 . G T 1016 PASS DP=22 GT:GQ:DP 0/1:212:22