annotate bamtools-split-tag.xml @ 1:59f09c61031c draft default tip

Deleted selected files
author jjohnson
date Mon, 15 May 2017 16:44:31 -0400
parents 8c17ddca0eee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
1 <tool id="bamSplitTag" name="Split BAM by Tag" version="2.4.0">
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
2 <description>into dataset list collection</description>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
3 <requirements>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
4 <requirement type="package" version="2.4.0">bamtools</requirement>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
5 </requirements>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
6 <command>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
7 <![CDATA[
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
8 #import re
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
9 #set $name = 'split_bam' + $re.sub('\W','_',$re.sub('\.bam$','',$input_bam.name))
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
10 ln -s '${input_bam}' 'localbam.bam' &&
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
11 ln -s '${input_bam.metadata.bam_index}' 'localbam.bam.bai' &&
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
12 bamtools split -tag $tag_name
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
13 -in 'localbam.bam'
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
14 -stub '$name'
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
15 ]]>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
16 </command>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
17 <inputs>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
18 <param name="input_bam" type="data" format="bam" label="BAM dataset to split by tag value"/>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
19 <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;"/>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
20 </inputs>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
21 <outputs>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
22 <collection name="output_bams" type="list" label="${input_bam.name} Split List">
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
23 <discover_datasets pattern="split_bam(?P&lt;designation&gt;.+)\.bam" ext="bam" visible="false"/>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
24 </collection>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
25 </outputs>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
26 <tests>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
27 <test>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
28 <param name="input_bam" ftype="bam" value="bamtools-input-tags.bam"/>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
29 <param name="tag_name" value="XG"/>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
30 <output_collection name="output_bams" type="list">
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
31 <element name="bamtools_input_tags.TAG_XG_V.bam" file="bamtools_input_tags.TAG_XG_V.bam" compare="sim_size" delta="500" />
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
32 </output_collection>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
33 </test>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
34
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
35 </tests>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
36 <help>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
37 **What is does**
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
38
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
39 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).
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
40
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
41 -----
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
42
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
43 .. class:: warningmark
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
44
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
45 **DANGER: Multiple Outputs**
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
46
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
47 As described below, splitting a BAM dataset(s) on tag value can produce very large numbers of outputs. Read below and know what you are doing.
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
48
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
49 -----
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
50
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
51 **How it works**
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
52
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
53 Split alignments by tag name into a dataset list collection.
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
54
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
55 This can generate a huge number of output datasets depending on the number of distinct values of the TAG.
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
56
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
57
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
58 -----
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
59
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
60 .. class:: infomark
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
61
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
62 **More information**
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
63
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
64 Additional information about BAMtools can be found at https://github.com/pezmaster31/bamtools/wiki
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
65
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
66 </help>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
67 <citations>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
68 <citation type="doi">10.1093/bioinformatics/btr174</citation>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
69 </citations>
8c17ddca0eee Uploaded
jjohnson
parents:
diff changeset
70 </tool>