# HG changeset patch
# User jjohnson
# Date 1490217755 14400
# Node ID 6fb39843d37da5ef6d276e89377d2effe1d177d8
# Parent a30dd3c77b309e9fad5900b35ad629d22ebc9c13
planemo upload commit f3f0bef4a450aafab3c6b05a27647471f93b22f3
diff -r a30dd3c77b30 -r 6fb39843d37d samtools_split_by_chrom.xml
--- a/samtools_split_by_chrom.xml Wed Nov 30 16:46:40 2016 -0500
+++ b/samtools_split_by_chrom.xml Wed Mar 22 17:22:35 2017 -0400
@@ -9,39 +9,65 @@
= 0 else n for n in str($input_bam.metadata.reference_names).split(',')]
+ #end if
mkdir -p outputs &&
ln -s "${input_bam}" temp_input.bam &&
ln -s "${input_bam.metadata.bam_index}" temp_input.bam.bai
- #for $ref in str( $refs ).split(","):
- && samtools view -@ \${GALAXY_SLOTS:-1} -bh inputs/temp_input.bam ${ref} |
- samtools sort -O bam -T sorted -@ \${GALAXY_SLOTS:-1} -o "outputs/${input_bam.name}.${ref}.bam" -
+ #for $i,$ref in enumerate($ref_list):
+ #set $idx = "%04d" % $i
+ && samtools view -@ \${GALAXY_SLOTS:-1} -bh temp_input.bam ${ref} |
+ samtools sort -O bam -T sorted -@ \${GALAXY_SLOTS:-1} -o "outputs/${idx}-${name}.${ref}.bam" -
#end for
+ && ls -l outputs | awk '/bam/{fname = substr(\$NF,6); printf("%s\t%d\n", fname, \$5)}' > "ls_split_files"
]]>
-
-
-
-
-
-
-
+
+
-
-
+
+ show_listing
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
@@ -49,12 +75,17 @@
**What it does**
-Creates a dataset collection of BAM files, one per selected chromosome.
+Splits an input BAM dataset to a dataset collection of individual chromosome bam files.
+
+This dataset collection can be passed to a galaxy tool that takes a single bam input
+in order to split the bam processing across multiple jobs.
+
+A suggested use case:
+
+hisat -> samtools_split_by_chrom => bcftools_mpileup => bcftools_call => bcftools_merge -> snpEff
This tool is based on ``samtools view`` command.
-@no-chrom-options@
-
]]>
diff -r a30dd3c77b30 -r 6fb39843d37d test-data/test.bam
Binary file test-data/test.bam has changed