Mercurial > repos > iuc > bamtools_split_ref
comparison bamtools_split.xml @ 1:9dbf707bebb0 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tool_collections/bamtools/bamtools_split_ref commit a14db40361bcb2ee608bccd9222e1654aaea3324-dirty
author | iuc |
---|---|
date | Wed, 11 Jan 2023 12:03:53 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:09470ab960f1 | 1:9dbf707bebb0 |
---|---|
1 <tool id="bamtools_split" name="Split" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | |
2 <description>BAM datasets on variety of attributes</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements"/> | |
7 <command> | |
8 <![CDATA[ | |
9 echo "BAM" > $report && | |
10 #for $bam_count, $input_bam in enumerate( $input_bams ): | |
11 ln -s "${input_bam}" "localbam_${bam_count}.bam" && | |
12 ln -s "${input_bam.metadata.bam_index}" "localbam_${bam_count}.bam.bai" && | |
13 #end for | |
14 bamtools | |
15 split | |
16 #if str ( $analysis_type.analysis_type_selector ) == "-tag" : | |
17 ${analysis_type.analysis_type_selector} "${analysis_type.tag_name}" | |
18 #else | |
19 ${analysis_type.analysis_type_selector} | |
20 #end if | |
21 -stub split_bam | |
22 #for $bam_count, $input_bam in enumerate( $input_bams ): | |
23 -in "localbam_${bam_count}.bam" | |
24 #end for | |
25 ]]> | |
26 </command> | |
27 <inputs> | |
28 <param name="input_bams" type="data" format="bam" label="BAM dataset(s) to filter" min="1" multiple="True"/> | |
29 <conditional name="analysis_type"> | |
30 <param name="analysis_type_selector" type="select" label="Split BAM dataset(s) by" help="See help below for explanation of each option"> | |
31 <option value="-mapped">Mapping status (-mapped)</option> | |
32 <option value="-paired">Pairing status (-paired)</option> | |
33 <option value="-reference">Reference name (-reference)</option> | |
34 <option value="-tag">Specific tag (-tag)</option> | |
35 </param> | |
36 <when value="-mapped" /> | |
37 <when value="-paired" /> | |
38 <when value="-reference" /> | |
39 <when value="-tag"> | |
40 <param name="tag_name" type="text" value="NM" label="Enter tag name here" help="For example, to split on NM tag enter "NM""/> | |
41 </when> | |
42 </conditional> | |
43 </inputs> | |
44 <outputs> | |
45 <data format="txt" name="report" label="BAMSplitter Run" hidden="true"> | |
46 <discover_datasets pattern="split_bam\.(?P<designation>.+)\.bam" ext="bam" visible="true"/> | |
47 </data> | |
48 </outputs> | |
49 <tests> | |
50 <test> | |
51 <param name="input_bams" ftype="bam" value="bamtools-input1.bam"/> | |
52 <param name="analysis_type_selector" value="-mapped"/> | |
53 <output name="report"> | |
54 <assert_contents> | |
55 <has_line line="BAM" /> | |
56 </assert_contents> | |
57 <discovered_dataset designation="MAPPED" file="bamtools-split-test1.bam" ftype="bam"/> | |
58 </output> | |
59 </test> | |
60 <test> | |
61 <param name="input_bams" ftype="bam" value="bamtools-input2.bam"/> | |
62 <param name="analysis_type_selector" value="-reference"/> | |
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> |