23
|
1 <tool id="bamsort" name="Sort BAM file" version="0.1.7.3">
|
0
|
2 <description>Sort a BAM file by coordinates (or names) of the mapped reads</description>
|
2
|
3 <macros>
|
|
4 <import>toolshed_macros.xml</import>
|
|
5 </macros>
|
23
|
6 <expand macro="requirements" />
|
21
|
7 <version_command>python3 -m MiModD version -q</version_command>
|
0
|
8 <command>
|
21
|
9 python3 -m MiModD sort "$input.ifile" -o "$output" --iformat $input.iformat --oformat $oformat $by_name
|
0
|
10 </command>
|
|
11
|
|
12 <inputs>
|
5
|
13 <conditional name="input">
|
23
|
14 <param label="Input data format" name="iformat" type="select">
|
5
|
15 <option value="bam">bam</option>
|
|
16 <option value="sam">sam</option>
|
|
17 </param>
|
|
18 <when value="bam">
|
23
|
19 <param format="bam" label="BAM input file to sort" name="ifile" type="data" />
|
5
|
20 </when>
|
|
21 <when value="sam">
|
23
|
22 <param format="sam" label="SAM input file to sort" name="ifile" type="data" />
|
5
|
23 </when>
|
|
24 </conditional>
|
23
|
25 <param label="Output format for the sorted data" name="oformat" type="select">
|
5
|
26 <option value="bam">bam</option>
|
|
27 <option value="sam">sam</option>
|
|
28 </param>
|
23
|
29 <param checked="false" falsevalue="" help="A less common option, but necessary, e.g., if you want to re-align sorted output from a previous run of the Snap Align Tool." label="Sort by read names instead of coordinates" name="by_name" truevalue="-n" type="boolean" />
|
0
|
30 </inputs>
|
|
31
|
|
32 <outputs>
|
23
|
33 <data format="bam" label="Sorted output from MiModd ${tool.name} on ${on_string}" name="output">
|
0
|
34 <change_format>
|
23
|
35 <when format="sam" input="oformat" value="sam" />
|
0
|
36 </change_format>
|
|
37 </data>
|
|
38 </outputs>
|
|
39
|
|
40 <help>
|
|
41 .. class:: infomark
|
|
42
|
|
43 **What it does**
|
|
44
|
|
45 The tool sorts a BAM file of aligned reads, typically by the reference genome coordinates that the reads have been mapped to.
|
|
46
|
|
47 Coordinate-sorted input files are expected by most downstream MiModD tools, but note that the *SNAP Read Alignment* produces coordinate-sorted output by default and it is only necessary to sort files that come from other sources or from *SNAP Read Alignment* jobs with a custom sort order.
|
|
48
|
|
49 The option *Sort by read names instead of coordinates* is useful if you want to re-align coordinate-sorted paired-end data. In *paired-end mode*, the *SNAP Read Alignment* tool expects the reads in the input file to be arranged in read pairs, i.e., the forward read information of a pair must be followed immediately by its reverse mate information, which is typically not the case in coordinate-sorted files. Resorting such files by read names fixes this problem.
|
|
50
|
|
51 </help>
|
23
|
52 </tool> |