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