comparison bamtools_split.xml @ 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
children 0a7b0989fa09
comparison
equal deleted inserted replaced
2:e2c1b62e1db1 3:9676127a1ed2
1 <tool id="bamtools_split" name="Split" version="2.4.0">
2 <description>BAM datasets on variety of attributes</description>
3 <requirements>
4 <requirement type="package" version="2.4.0">bamtools</requirement>
5 </requirements>
6 <command>
7 <![CDATA[
8 echo "BAM" > $report &&
9 #for $bam_count, $input_bam in enumerate( $input_bams ):
10 ln -s "${input_bam}" "localbam_${bam_count}.bam" &&
11 ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" &&
12 #end for
13 bamtools
14 split
15 #if str ( $analysis_type.analysis_type_selector ) == "-tag" :
16 ${analysis_type.analysis_type_selector} "${analysis_type.tag_name}"
17 #else
18 ${analysis_type.analysis_type_selector}
19 #end if
20 -stub split_bam
21 #for $bam_count, $input_bam in enumerate( $input_bams ):
22 -in "localbam_${bam_count}.bam"
23 #end for
24 ]]>
25 </command>
26 <inputs>
27 <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/>
28 <conditional name="analysis_type">
29 <param name="analysis_type_selector" type="select" label="Split BAM dataset(s) by" help="See help below for explanation of each option">
30 <option value="-mapped">Mapping status (-mapped)</option>
31 <option value="-paired">Pairing status (-paired)</option>
32 <option value="-reference">Reference name (-reference)</option>
33 <option value="-tag">Specific tag (-tag)</option>
34 </param>
35 <when value="-mapped" />
36 <when value="-paired" />
37 <when value="-reference" />
38 <when value="-tag">
39 <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;"/>
40 </when>
41 </conditional>
42 </inputs>
43 <outputs>
44 <data format="txt" name="report" label="BAMSplitter Run" hidden="true">
45 <discover_datasets pattern="split_bam\.(?P&lt;designation&gt;.+)\.bam" ext="bam" visible="true"/>
46 </data>
47 </outputs>
48 <tests>
49 <test>
50 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/>
51 <param name="analysis_type_selector" value="-mapped"/>
52 <output name="report">
53 <assert_contents>
54 <has_line line="BAM" />
55 </assert_contents>
56 <discovered_dataset designation="MAPPED" file="bamtools-split-test1.bam" ftype="bam"/>
57 </output>
58 </test>
59 <test>
60 <param name="input_bams" ftype="bam" value="bamtools-input2.bam"/>
61 <param name="analysis_type_selector" value="-reference"/>
62 <param name="output_type" value="dataset_collection"/>
63 <output name="report">
64 <assert_contents>
65 <has_line line="BAM" />
66 </assert_contents>
67 <discovered_dataset designation="REF_chr1" file="bamtools_input2.chr1" ftype="bam"/>
68 </output>
69 </test>
70 </tests>
71 <help>
72 **What is does**
73
74 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).
75
76 -----
77
78 .. class:: warningmark
79
80 **DANGER: Multiple Outputs**
81
82 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.
83
84 -----
85
86 **How it works**
87
88 The following options can be specified via "**Split BAM dataset(s) by**" dropdown::
89
90 Mapping status (-mapped) split mapped/unmapped and generate two output files
91 named (MAPPED) and (UNMAPPED) containing mapped and unmapped
92 reads, respectively.
93
94 Pairing status (-paired) split single-end/paired-end alignments and generate two output files
95 named (SINGLE_END) and (PAIRED_END) containing paired and unpaired
96 reads, respectively.
97
98 Reference name (-reference) split alignments by reference name. In cases of unfinished genomes with
99 very large number of reference sequences (scaffolds) it can generate
100 thousands (if not millions) of output datasets.
101
102 Specific tag (-tag) split alignments based on all values of TAG encountered. Choosing this
103 option from the menu will allow you to enter the tag name. As was the
104 case with the reference splitting above, this option can produce very
105 large number of outputs if a tag has a large number of unique values.
106
107 -----
108
109 .. class:: infomark
110
111 **More information**
112
113 Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
114
115 </help>
116 <citations>
117 <citation type="doi">10.1093/bioinformatics/btr174</citation>
118 </citations>
119 </tool>