0
|
1 <tool id="samtools_split" name="Split" version="1.0.0">
|
|
2 <description>a BAM file by read group</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.1">samtools</requirement>
|
|
5 </requirements>
|
|
6 <version_command>samtools --version | head -n 1 | awk '{ print $2 }'</version_command>
|
|
7 <command><![CDATA[
|
|
8 samtools split -f 'Read_Group_%!.bam'
|
|
9 #if $header:
|
|
10 -u "${output}":"${header}"
|
|
11 #else:
|
|
12 -u "${output}"
|
|
13 #end if
|
|
14 "${input_bam}"
|
|
15 ]]></command>
|
|
16 <stdio>
|
|
17 <exit_code range="1:" level="fatal" description="Error" />
|
|
18 </stdio>
|
|
19 <inputs>
|
|
20 <param name="input_bam" type="data" format="bam" label="BAM file" multiple="true" />
|
|
21 <param name="header" type="data" format="bam,sam" label="Replace header in output file" optional="True" />
|
|
22 </inputs>
|
|
23 <outputs>
|
|
24 <data format="bam" name="output" label="${tool.name} on ${on_string}">
|
|
25 <discover_datasets pattern="Read_Group_(?P<designation>.+)\.bam" ext="bam" visible="true" directory="" />
|
|
26 </data>
|
|
27 </outputs>
|
|
28 <tests>
|
|
29 <test>
|
|
30 <param name="input_bam" value="phiX.bam" ftype="bam" />
|
|
31 <output name="output" file="samtools_split_out.bam">
|
|
32 <discovered_dataset designation="Mouse" ftype="bam" file="phiX_Mouse.bam" />
|
|
33 <discovered_dataset designation="Elephant" ftype="bam" file="phiX_Elephant.bam" />
|
|
34 <discovered_dataset designation="Human" ftype="bam" file="phiX_Human.bam" />
|
|
35 </output>
|
|
36 </test>
|
|
37 </tests>
|
|
38 <help>
|
|
39 **What it does**
|
|
40
|
|
41 This tool runs the ``samtools split`` command in the SAMtools toolkit.
|
|
42
|
|
43 Split BAM files by read group.
|
|
44
|
|
45 **Citation**
|
|
46
|
|
47 For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_
|
|
48
|
|
49
|
|
50 If you use this tool in Galaxy, please cite Blankenberg D, et al. *In preparation.*
|
|
51 </help>
|
|
52 </tool>
|
|
53
|