Mercurial > repos > devteam > bamtools_split
comparison bamtools-split.xml @ 0:71dd32fb0b0a draft
Uploaded
| author | devteam |
|---|---|
| date | Fri, 09 Jan 2015 11:50:08 -0500 |
| parents | |
| children | 4555f451dd79 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:71dd32fb0b0a |
|---|---|
| 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> | |
| 47 <when value="-tag"> | |
| 48 <param name="tag_name" type="text" value="NM" label="Enter tag name here" help="For example, to split on NM tag enter "NM""/> | |
| 49 </when> | |
| 50 </conditional> | |
| 51 </inputs> | |
| 52 | |
| 53 <outputs> | |
| 54 <data format="txt" name="report" label="BAMSplitter Run" hidden="true"> | |
| 55 <discover_datasets pattern="split_bam\.(?P<designation>.+)\.bam" ext="bam" visible="true"/> | |
| 56 </data> | |
| 57 </outputs> | |
| 58 <tests> | |
| 59 <test> | |
| 60 <param name="input_bam" ftype="bam" value="bamtools-input1.bam"/> | |
| 61 <param name="analysis_type_selector" value="-mapped"/> | |
| 62 <output name="report"> | |
| 63 <assert_contents> | |
| 64 <has_line line="BAM" /> | |
| 65 </assert_contents> | |
| 66 <discovered_dataset designation="MAPPED" file="bamtools-split-test1.bam" ftype="bam"/> | |
| 67 </output> | |
| 68 | |
| 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> |
