Mercurial > repos > devteam > samtools_sort
comparison samtools_sort.xml @ 13:cf4d627c5cc0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_sort commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author | iuc |
---|---|
date | Tue, 28 Sep 2021 16:07:07 +0000 |
parents | 0149126ce6af |
children | 43f90a79608d |
comparison
equal
deleted
inserted
replaced
12:0149126ce6af | 13:cf4d627c5cc0 |
---|---|
1 <tool id="samtools_sort" name="Samtools sort" profile="18.01" version="2.0.3"> | 1 <tool id="samtools_sort" name="Samtools sort" version="2.0.4" profile="@PROFILE@"> |
2 <description>order of storing aligned sequences</description> | 2 <description>order of storing aligned sequences</description> |
3 <macros> | 3 <macros> |
4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
5 </macros> | 5 </macros> |
6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
18 $prim_key_cond.prim_key_select | 18 $prim_key_cond.prim_key_select |
19 #if $prim_key_cond.prim_key_select == '-t': | 19 #if $prim_key_cond.prim_key_select == '-t': |
20 $prim_key_cond.tag | 20 $prim_key_cond.tag |
21 $prim_key_cond.sec_key_select | 21 $prim_key_cond.sec_key_select |
22 #end if | 22 #end if |
23 $minhash | |
23 -O bam | 24 -O bam |
24 -T "\${TMPDIR:-.}" | 25 -T "\${TMPDIR:-.}" |
25 '${input1}' | 26 '${input1}' |
26 > '${output1}' | 27 > '${output1}' |
27 ]]></command> | 28 ]]></command> |
41 <option value="">coordinate</option> | 42 <option value="">coordinate</option> |
42 <option value="-n">name (-n)</option> | 43 <option value="-n">name (-n)</option> |
43 </param> | 44 </param> |
44 </when> | 45 </when> |
45 </conditional> | 46 </conditional> |
47 <param name="minhash" type="boolean" argument="-M" truevalue="-M" falsevalue="" checked="false" label="Minhash collation" help="Use minimiser for clustering unaligned/unplaced reads."/> | |
46 <!--<param name="compression" type="integer" argument="-l" optional="True" min="0" max="9" label="compression level" help="0 (uncompressed) to 9 (best)"/>--> | 48 <!--<param name="compression" type="integer" argument="-l" optional="True" min="0" max="9" label="compression level" help="0 (uncompressed) to 9 (best)"/>--> |
47 </inputs> | 49 </inputs> |
48 <outputs> | 50 <outputs> |
49 <data name="output1" format="bam"> | 51 <data name="output1" format="bam"> |
50 <change_format> | 52 <change_format> |
54 </change_format> | 56 </change_format> |
55 </data> | 57 </data> |
56 </outputs> | 58 </outputs> |
57 <tests> | 59 <tests> |
58 <!-- tests from https://github.com/samtools/samtools/blob/9ce8c64493f7ea3fa69bc5c1ac980b1a8e3dcf1f/test/test.pl#L2464 --> | 60 <!-- tests from https://github.com/samtools/samtools/blob/9ce8c64493f7ea3fa69bc5c1ac980b1a8e3dcf1f/test/test.pl#L2464 --> |
59 <!-- # Pos sort --> | 61 <!-- 1) # Pos sort --> |
60 <test> | 62 <test> |
61 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 63 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
62 <output name="output1" file="pos.sort.expected.bam" ftype="bam"/> | 64 <output name="output1" file="pos.sort.expected.bam" ftype="bam" lines_diff="4" /> |
63 </test> | 65 </test> |
64 <!-- test_cmd($opts, out=>"sort/pos.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} $$opts{path}/dat/test_input_1_a.bam -O SAM -o -"); --> | 66 <!-- test_cmd($opts, out=>"sort/pos.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} $$opts{path}/dat/test_input_1_a.bam -O SAM -o -"); --> |
65 | 67 <!-- 2) # Name sort --> |
66 <!-- # Name sort --> | |
67 <test> | 68 <test> |
68 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 69 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
69 <conditional name="prim_key_cond"> | 70 <conditional name="prim_key_cond"> |
70 <param name="prim_key_select" value="-n"/> | 71 <param name="prim_key_select" value="-n"/> |
71 </conditional> | 72 </conditional> |
72 <output name="output1" file="name.sort.expected.bam" ftype="qname_sorted.bam"/> | 73 <output name="output1" file="name.sort.expected.bam" ftype="qname_sorted.bam" lines_diff="4"/> |
73 </test> | 74 </test> |
74 <!-- test_cmd($opts, out=>"sort/name.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -n $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> | 75 <!-- test_cmd($opts, out=>"sort/name.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -n $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> |
75 | 76 <!-- 3) # Tag sort (RG) (considers output and name sorted) --> |
76 <!-- # Tag sort (RG) (considers output and name sorted) --> | |
77 <test> | 77 <test> |
78 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 78 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
79 <conditional name="prim_key_cond"> | 79 <conditional name="prim_key_cond"> |
80 <param name="prim_key_select" value="-t"/> | 80 <param name="prim_key_select" value="-t"/> |
81 <param name="tag" value="RG"/> | 81 <param name="tag" value="RG"/> |
82 </conditional> | 82 </conditional> |
83 <output name="output1" file="tag.rg.sort.expected.bam" ftype="unsorted.bam"/> | 83 <output name="output1" file="tag.rg.sort.expected.bam" ftype="unsorted.bam" lines_diff="4"/> |
84 </test> | 84 </test> |
85 <!--test_cmd($opts, out=>"sort/tag.rg.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t RG $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> | 85 <!--test_cmd($opts, out=>"sort/tag.rg.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t RG $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> |
86 | 86 <!-- 4) # Tag sort (RG); secondary by name --> |
87 <!-- # Tag sort (RG); secondary by name --> | |
88 <test> | 87 <test> |
89 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 88 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
90 <conditional name="prim_key_cond"> | 89 <conditional name="prim_key_cond"> |
91 <param name="prim_key_select" value="-t"/> | 90 <param name="prim_key_select" value="-t"/> |
92 <param name="tag" value="RG"/> | 91 <param name="tag" value="RG"/> |
93 <param name="sec_key_select" value="-n"/> | 92 <param name="sec_key_select" value="-n"/> |
94 </conditional> | 93 </conditional> |
95 <output name="output1" file="tag.rg.n.sort.expected.bam" ftype="unsorted.bam"/> | 94 <output name="output1" file="tag.rg.n.sort.expected.bam" ftype="unsorted.bam" lines_diff="4"/> |
96 </test> | 95 </test> |
97 <!--test_cmd($opts, out=>"sort/tag.rg.n.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -n -t RG $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> | 96 <!--test_cmd($opts, out=>"sort/tag.rg.n.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -n -t RG $$opts{path}/dat/test_input_1_a.bam -O SAM -o -");--> |
98 | 97 <!-- 5) # Tag sort (AS) --> |
99 <!-- # Tag sort (AS) --> | |
100 <test> | 98 <test> |
101 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 99 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
102 <conditional name="prim_key_cond"> | 100 <conditional name="prim_key_cond"> |
103 <param name="prim_key_select" value="-t"/> | 101 <param name="prim_key_select" value="-t"/> |
104 <param name="tag" value="AS"/> | 102 <param name="tag" value="AS"/> |
105 <param name="sec_key_select" value=""/> | 103 <param name="sec_key_select" value=""/> |
106 </conditional> | 104 </conditional> |
107 <output name="output1" file="tag.as.sort.expected.bam" ftype="unsorted.bam"/> | 105 <output name="output1" file="tag.as.sort.expected.bam" ftype="unsorted.bam" lines_diff="4"/> |
108 </test> | 106 </test> |
109 <!--test_cmd($opts, out=>"sort/tag.as.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t AS $$opts{path}/dat/test_input_1_d.sam -O SAM -o -");--> | 107 <!--test_cmd($opts, out=>"sort/tag.as.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t AS $$opts{path}/dat/test_input_1_d.sam -O SAM -o -");--> |
110 | 108 <!-- 6) # Tag sort (FI) --> |
111 <!-- # Tag sort (FI) --> | |
112 <test> | 109 <test> |
113 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | 110 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> |
114 <conditional name="prim_key_cond"> | 111 <conditional name="prim_key_cond"> |
115 <param name="prim_key_select" value="-t"/> | 112 <param name="prim_key_select" value="-t"/> |
116 <param name="tag" value="FI"/> | 113 <param name="tag" value="FI"/> |
117 </conditional> | 114 </conditional> |
118 <output name="output1" file="tag.fi.sort.expected.bam" ftype="unsorted.bam"/> | 115 <output name="output1" file="tag.fi.sort.expected.bam" ftype="unsorted.bam" lines_diff="4"/> |
119 </test> | 116 </test> |
120 <!--test_cmd($opts, out=>"sort/tag.fi.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t FI $$opts{path}/dat/test_input_1_d.sam -O SAM -o -");--> | 117 <!--test_cmd($opts, out=>"sort/tag.fi.sort.expected.sam", cmd=>"$$opts{bin}/samtools sort${threads} -t FI $$opts{path}/dat/test_input_1_d.sam -O SAM -o -");--> |
121 | 118 <!-- 7) tests from old version --> |
122 <!-- tests from old version --> | |
123 <test> | 119 <test> |
124 <param name="input1" value="1.bam" ftype="bam" /> | 120 <param name="input1" value="1.bam" ftype="bam" /> |
125 <output name="output1" file="1_sort.bam" ftype="bam" sort="True"/> | 121 <output name="output1" file="1_sort.bam" ftype="bam" sort="True" lines_diff="4"/> |
126 </test> | 122 </test> |
127 <test> | 123 <test> |
128 <param name="input1" value="1.bam" ftype="bam" /> | 124 <param name="input1" value="1.bam" ftype="bam" /> |
129 <conditional name="prim_key_cond"> | 125 <conditional name="prim_key_cond"> |
130 <param name="prim_key_select" value="-n"/> | 126 <param name="prim_key_select" value="-n"/> |
131 </conditional> | 127 </conditional> |
132 <output name="output1" file="1_sort_read_names.bam" ftype="qname_sorted.bam"/> | 128 <output name="output1" file="1_sort_read_names.bam" ftype="qname_sorted.bam" lines_diff="4"/> |
129 </test> | |
130 <!-- 8) test minhash sorting --> | |
131 <test> | |
132 <param name="input1" value="test_input_1_a.bam" ftype="bam" /> | |
133 <param name="minhash" value="true" /> | |
134 <output name="output1" file="minhash.expected.bam" ftype="bam" lines_diff="4" /> | |
133 </test> | 135 </test> |
134 </tests> | 136 </tests> |
135 <help> | 137 <help> |
136 **What it does** | 138 **What it does** |
137 | 139 |
138 Sort alignments by leftmost coordinates, or by read name when -n is used. | 140 Sort alignments by leftmost coordinates, or by read name when -n is used. |
139 An appropriate @HD-SO sort order header tag will be added or an existing | 141 An appropriate @HD-SO sort order header tag will be added or an existing |
140 one updated if necessary. | 142 one updated if necessary. |
141 | 143 |
142 **Ordering Rules** | 144 **Ordering Rules** |
143 | 145 |
144 The following rules are used for ordering records. | 146 The following rules are used for ordering records. |
145 | 147 |
154 - Numeric tags (types f and i) are compared by value. Note that comparisons of | 156 - Numeric tags (types f and i) are compared by value. Note that comparisons of |
155 floating-point values are subject to issues of rounding and precision. | 157 floating-point values are subject to issues of rounding and precision. |
156 - String tags (types H and Z) are compared based on the binary contents of the | 158 - String tags (types H and Z) are compared based on the binary contents of the |
157 tag using the C strcmp(3) function. | 159 tag using the C strcmp(3) function. |
158 - Character tags (type A) are compared by binary character value. | 160 - Character tags (type A) are compared by binary character value. |
159 - No attempt is made to compare tags of other types — notably type B array values will not be compared. | 161 - No attempt is made to compare tags of other types — notably type B array values will not be compared. |
160 | 162 |
161 When the -n option is present, records are sorted by name. Names are compared so as to give a “natural” ordering — i.e. sections consisting of digits are compared numerically while all other sections are compared based on their binary representation. This means “a1” will come before “b1” and “a9” will come before “a10”. Records with the same name will be ordered according to the values of the READ1 and READ2 flags (see flags). | 163 When the -n option is present, records are sorted by name. Names are compared so as to give a “natural” ordering — i.e. sections consisting of digits are compared numerically while all other sections are compared based on their binary representation. This means “a1” will come before “b1” and “a9” will come before “a10”. Records with the same name will be ordered according to the values of the READ1 and READ2 flags (see flags). |
162 | 164 |
163 When the -n option is not present, reads are sorted by reference (according to the order of the @SQ header records), then by position in the reference, and then by the REVERSE flag. | 165 When the -n option is not present, reads are sorted by reference (according to the order of the @SQ header records), then by position in the reference, and then by the REVERSE flag. |
164 | 166 |
165 This has now been removed. The previous out.prefix argument (and -f option, if any) should be changed to an appropriate combination of -T PREFIX and -o FILE. The previous -o option should be removed, as output defaults to standard output. | 167 This has now been removed. The previous out.prefix argument (and -f option, if any) should be changed to an appropriate combination of -T PREFIX and -o FILE. The previous -o option should be removed, as output defaults to standard output. |
168 | |
169 When the -M (minash collation) option is present, then samtools sort groups unmapped reads with similar sequence together. This can sometimes significantly reduce the file size. | |
166 | 170 |
167 </help> | 171 </help> |
168 <expand macro="citations"/> | 172 <expand macro="citations"/> |
169 </tool> | 173 </tool> |