Source code

Download source archive ↓

upstream-extended/iuc/tool_collections/samtools/samtools_collate/samtools_collate.xml

1<tool id="samtools_collate" name="Samtools collate" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2    <description>shuffle and group reads together by their names</description>
3    <macros>
4        <import>macros.xml</import>
5    </macros>
6    <expand macro="requirements"/>
7    <expand macro="stdio"/>
8    <expand macro="version_command"/>
9    <command detect_errors="exit_code"><![CDATA[
10        @ADDTHREADS@
11        samtools collate
12        $no_pg
13        $fast_mode
14        '$input'
15        --output-fmt BAM
16        -o '$output_file'
17    ]]></command>
18    <inputs>
19        <param name="input" type="data" format="sam,bam" label="Input File"/>
20        <param argument="--no-pg" type="boolean" label="Add @PG in Header" checked="true" truevalue="" falsevalue="--no-PG" help="Add a @PG line to the header of the output file. "/>
21        <param name="fast_mode" argument="-f" type="boolean" label="Fast Mode" truevalue="-f" falsevalue="" checked="false" help="Fast mode will output only primary alignments that have either the READ1 or READ2 flags set (but not both). Any other alignment records will be filtered out. The collation will only work correctly if there are no more than two reads for any given QNAME after filtering. "/>
22    </inputs>
23    <outputs>
24        <data name="output_file" format="unsorted.bam"/>
25    </outputs>
26    <tests>
27        <!-- Test 01: Default Test -->
28        <test expect_num_outputs="1">
29            <param name="input" value="fast_collate.sam" ftype="sam"/>
30            <output name="output_file" file="test01.bam" ftype="unsorted.bam" lines_diff="4"/>
31        </test>
32        <!-- Test 02: Testing NO PG -->
33        <test expect_num_outputs="1">
34            <param name="input" value="fast_collate.sam" ftype="sam"/>
35            <param name="no_pg" value="true"/>
36            <output name="output_file" file="test02.bam" ftype="unsorted.bam" lines_diff="4"/>
37        </test>
38        <!-- Test 03: Testing Fast mode-->
39        <test expect_num_outputs="1">
40            <param name="input" value="fast_collate.sam" ftype="sam"/>
41            <param name="no_pg" value="false"/>
42            <param name="fast_mode" value="true"/>
43            <output name="output_file" file="test03.bam" ftype="unsorted.bam" lines_diff="4"/>
44        </test>
45        <!-- Test 04: BAM file as input -->
46        <test expect_num_outputs="1">
47            <param name="input" value="input.bam" ftype="bam"/>
48            <param name="no_pg" value="false"/>
49            <param name="fast_mode" value="true"/>
50            <output name="output_file" file="test04.bam" ftype="unsorted.bam" lines_diff="4"/>
51        </test>
52    </tests>
53    <help><![CDATA[
54**What it does**
55  
56Samtools collate shuffles and groups reads in a BAM file together by their read names (QNAME). 
57This is useful as a preprocessing step for tools that need reads from the same template (pairs or 
58multiple segments) to be grouped together.
59
60Note: The tools makes no guarantees about the order of read names between groups.
61
62**Fast Mode** : Only processes primary alignments, which speeds up collation but may lose secondary/supplementary alignments
63
64**Note**: Unlike 'samtools sort -n', collate does not produce a fully sorted output. Reads with the same 
65name are grouped but groups appear in pseudo-random order. This is sufficient for tools that 
66need paired reads together but is faster than full name sorting.
67
68.. class:: infomark
69
70**More information**
71
72For more details, see the samtools documentation at http://www.htslib.org/doc/samtools-collate.html
73
74    ]]></help>
75    <expand macro="citations"/>
76    <creator>
77        <organization name="Galaxy Europe"/>
78        <person givenName="Ahmad" familyName="Mahagna" url="https://github.com/Smkingsize"/>
79        <person givenName="Saim" familyName="Momin" url="https://github.com/SaimMomin12"/>
80    </creator>
81</tool>