changeset 3:9676127a1ed2 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/bamtools/bamtools_split commit 5ecb0de2196e69548d74a88a4e3c1095ca9bfd16"
author iuc
date Wed, 04 Dec 2019 07:47:03 -0500
parents e2c1b62e1db1
children 0a7b0989fa09
files bamtools-split.xml bamtools_split.xml macros.xml test-data/bamtools-input-paired.bam test-data/bamtools-input-tags.bam test-data/bamtools-input2.bam test-data/bamtools_input2.chr1 test-data/bamtools_input_tags.TAG_XG_N.bam test-data/bamtools_input_tags.TAG_XG_V.bam test-data/split_bam.MAPPED.bam test-data/split_bam.PAIRED_END.bam test-data/split_bam.SINGLE_END.bam test-data/split_bam.UNMAPPED.bam
diffstat 13 files changed, 134 insertions(+), 108 deletions(-) [+]
line wrap: on
line diff
--- a/bamtools-split.xml	Wed Jan 18 11:44:47 2017 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-<tool id="bamSplit" name="Split" version="2.4.0">
-    <description>BAM datasets on variety of attributes</description>
-    <requirements>
-        <requirement type="package" version="2.4.0">bamtools</requirement>
-    </requirements>
-    <command>
-        <![CDATA[
-            echo "BAM" > $report &&
-            #for $bam_count, $input_bam in enumerate( $input_bams ):
-                ln -s "${input_bam}" "localbam_${bam_count}.bam" &&
-                ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &&
-            #end for
-            bamtools
-            split
-            #if str ( $analysis_type.analysis_type_selector ) == "-tag" :
-                ${analysis_type.analysis_type_selector} "${analysis_type.tag_name}"
-            #else
-                ${analysis_type.analysis_type_selector}
-            #end if
-            -stub split_bam
-            #for $bam_count, $input_bam in enumerate( $input_bams ):
-                -in "localbam_${bam_count}.bam"
-            #end for
-        ]]>
-    </command>
-    <inputs>
-        <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/>
-        <conditional name="analysis_type">
-            <param name="analysis_type_selector" type="select" label="Split BAM dataset(s) by" help="See help below for explanation of each option">
-                <option value="-mapped">Mapping status (-mapped)</option>
-                <option value="-paired">Pairing status (-paired)</option>
-                <option value="-reference">Reference name (-reference)</option>
-                <option value="-tag">Specific tag (-tag)</option>
-            </param>
-            <when value="-mapped" />
-            <when value="-paired" />
-            <when value="-reference" />
-            <when value="-tag">
-                <param name="tag_name" type="text" value="NM" label="Enter tag name here" help="For example, to split on NM tag enter &quot;NM&quot;"/>
-            </when>
-        </conditional>
-    </inputs>
-    <outputs>
-        <data format="txt" name="report" label="BAMSplitter Run" hidden="true">
-            <discover_datasets pattern="split_bam\.(?P&lt;designation&gt;.+)\.bam" ext="bam" visible="true"/>
-        </data>
-    </outputs>
-    <tests>
-        <test>
-            <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
-            <param name="analysis_type_selector" value="-mapped"/>
-            <output name="report">
-                <assert_contents>
-                    <has_line line="BAM" />
-                </assert_contents>
-                <discovered_dataset designation="MAPPED" file="bamtools-split-test1.bam" ftype="bam"/>
-            </output>
-        </test>
-    </tests>
-    <help>
-**What is does**
-
-BAMTools split is a utility for splitting BAM files. It is based on BAMtools suite of tools by Derek Barnett (https://github.com/pezmaster31/bamtools).
-
------
-
-.. class:: warningmark
-
-**DANGER: Multiple Outputs**
-
-As described below, splitting a BAM dataset(s) on reference name or a tag value can produce very large numbers of outputs. Read below and know what you are doing.
-
------
-
-**How it works**
-
-The following options can be specified via "**Split BAM dataset(s) by**" dropdown::
-
-  Mapping status (-mapped)          split mapped/unmapped and generate two output files
-                                    named (MAPPED) and (UNMAPPED) containing mapped and unmapped
-                                    reads, respectively.
-
-  Pairing status (-paired)          split single-end/paired-end alignments and generate two output files
-                                    named (SINGLE_END) and (PAIRED_END) containing paired and unpaired
-                                    reads, respectively.
-
-  Reference name (-reference)       split alignments by reference name. In cases of unfinished genomes with
-                                    very large number of reference sequences (scaffolds) it can generate
-                                    thousands (if not millions) of output datasets.
-
-  Specific tag (-tag)               split alignments based on all values of TAG encountered. Choosing this
-                                    option from the menu will allow you to enter the tag name. As was the
-                                    case with the reference splitting above, this option can produce very
-                                    large number of outputs if a tag has a large number of unique values.
-
------
-
-.. class:: infomark
-
-**More information**
-
-Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
-
-    </help>
-    <citations>
-        <citation type="doi">10.1093/bioinformatics/btr174</citation>
-    </citations>
-</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamtools_split.xml	Wed Dec 04 07:47:03 2019 -0500
@@ -0,0 +1,119 @@
+<tool id="bamtools_split" name="Split" version="2.4.0">
+    <description>BAM datasets on variety of attributes</description>
+    <requirements>
+        <requirement type="package" version="2.4.0">bamtools</requirement>
+    </requirements>
+    <command>
+        <![CDATA[
+            echo "BAM" > $report &&
+            #for $bam_count, $input_bam in enumerate( $input_bams ):
+                ln -s "${input_bam}" "localbam_${bam_count}.bam" &&
+                ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &&
+            #end for
+            bamtools
+            split
+            #if str ( $analysis_type.analysis_type_selector ) == "-tag" :
+                ${analysis_type.analysis_type_selector} "${analysis_type.tag_name}"
+            #else
+                ${analysis_type.analysis_type_selector}
+            #end if
+            -stub split_bam
+            #for $bam_count, $input_bam in enumerate( $input_bams ):
+                -in "localbam_${bam_count}.bam"
+            #end for
+        ]]>
+    </command>
+    <inputs>
+        <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/>
+        <conditional name="analysis_type">
+            <param name="analysis_type_selector" type="select" label="Split BAM dataset(s) by" help="See help below for explanation of each option">
+                <option value="-mapped">Mapping status (-mapped)</option>
+                <option value="-paired">Pairing status (-paired)</option>
+                <option value="-reference">Reference name (-reference)</option>
+                <option value="-tag">Specific tag (-tag)</option>
+            </param>
+            <when value="-mapped" />
+            <when value="-paired" />
+            <when value="-reference" />
+            <when value="-tag">
+                <param name="tag_name" type="text" value="NM" label="Enter tag name here" help="For example, to split on NM tag enter &quot;NM&quot;"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="txt" name="report" label="BAMSplitter Run" hidden="true">
+            <discover_datasets pattern="split_bam\.(?P&lt;designation&gt;.+)\.bam" ext="bam" visible="true"/>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
+            <param name="analysis_type_selector" value="-mapped"/>
+            <output name="report">
+                <assert_contents>
+                    <has_line line="BAM" />
+                </assert_contents>
+                <discovered_dataset designation="MAPPED" file="bamtools-split-test1.bam" ftype="bam"/>
+            </output>
+        </test>
+        <test>
+            <param name="input_bams" ftype="bam" value="bamtools-input2.bam"/>
+            <param name="analysis_type_selector" value="-reference"/>
+            <param name="output_type" value="dataset_collection"/>
+            <output name="report">
+                <assert_contents>
+                    <has_line line="BAM" />
+                </assert_contents>
+                <discovered_dataset designation="REF_chr1" file="bamtools_input2.chr1" ftype="bam"/>
+            </output>
+        </test>
+    </tests>
+    <help>
+**What is does**
+
+BAMTools split is a utility for splitting BAM files. It is based on BAMtools suite of tools by Derek Barnett (https://github.com/pezmaster31/bamtools).
+
+-----
+
+.. class:: warningmark
+
+**DANGER: Multiple Outputs**
+
+As described below, splitting a BAM dataset(s) on reference name or a tag value can produce very large numbers of outputs. Read below and know what you are doing.
+
+-----
+
+**How it works**
+
+The following options can be specified via "**Split BAM dataset(s) by**" dropdown::
+
+  Mapping status (-mapped)          split mapped/unmapped and generate two output files
+                                    named (MAPPED) and (UNMAPPED) containing mapped and unmapped
+                                    reads, respectively.
+
+  Pairing status (-paired)          split single-end/paired-end alignments and generate two output files
+                                    named (SINGLE_END) and (PAIRED_END) containing paired and unpaired
+                                    reads, respectively.
+
+  Reference name (-reference)       split alignments by reference name. In cases of unfinished genomes with
+                                    very large number of reference sequences (scaffolds) it can generate
+                                    thousands (if not millions) of output datasets.
+
+  Specific tag (-tag)               split alignments based on all values of TAG encountered. Choosing this
+                                    option from the menu will allow you to enter the tag name. As was the
+                                    case with the reference splitting above, this option can produce very
+                                    large number of outputs if a tag has a large number of unique values.
+
+-----
+
+.. class:: infomark
+
+**More information**
+
+Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
+
+    </help>
+    <citations>
+        <citation type="doi">10.1093/bioinformatics/btr174</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Dec 04 07:47:03 2019 -0500
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@VERSION@">2.4.0</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">bamtools</requirement>
+            <requirement type="package" version="1.4.1">samtools</requirement>
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/bioinformatics/btr174</citation>
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file
Binary file test-data/bamtools-input-paired.bam has changed
Binary file test-data/bamtools-input-tags.bam has changed
Binary file test-data/bamtools-input2.bam has changed
Binary file test-data/bamtools_input2.chr1 has changed
Binary file test-data/bamtools_input_tags.TAG_XG_N.bam has changed
Binary file test-data/bamtools_input_tags.TAG_XG_V.bam has changed
Binary file test-data/split_bam.MAPPED.bam has changed
Binary file test-data/split_bam.PAIRED_END.bam has changed
Binary file test-data/split_bam.SINGLE_END.bam has changed
Binary file test-data/split_bam.UNMAPPED.bam has changed