# HG changeset patch
# User greg
# Date 1541082212 14400
# Node ID 770db64c4cfce0fdf693011ac99471e0c8241f25
Uploaded
diff -r 000000000000 -r 770db64c4cfc .shed.yml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.shed.yml Thu Nov 01 10:23:32 2018 -0400
@@ -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 770db64c4cfc bcftools_sort.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bcftools_sort.xml Thu Nov 01 10:23:32 2018 -0400
@@ -0,0 +1,48 @@
+
+
+ sort VCF/BCF files
+
+ sort
+ macros.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r 770db64c4cfc macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Thu Nov 01 10:23:32 2018 -0400
@@ -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 770db64c4cfc test-data/sorted.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/sorted.vcf Thu Nov 01 10:23:32 2018 -0400
@@ -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 770db64c4cfc test-data/unsorted.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/unsorted.vcf Thu Nov 01 10:23:32 2018 -0400
@@ -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