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