annotate bamtools-split.xml @ 1:2ec7f09c813f draft default tip

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