Mercurial > repos > iuc > samtools_merge
annotate samtools_merge.xml @ 5:84f122ab14d6 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
author | iuc |
---|---|
date | Sun, 08 Sep 2024 03:23:00 +0000 |
parents | 95fd8bf80632 |
children |
rev | line source |
---|---|
5
84f122ab14d6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
iuc
parents:
4
diff
changeset
|
1 <tool id="samtools_merge" name="Samtools merge" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
2 <description>merge multiple sorted alignment files</description> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
3 <macros> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
4 <import>macros.xml</import> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
5 </macros> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
6 <expand macro="requirements"/> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
7 <expand macro="stdio"/> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
8 <expand macro="version_command"/> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
9 <command><![CDATA[ |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
10 @ADDTHREADS@ |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
11 ## prepare input (sort sam, link other), determine input ordering |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
12 ## and check for consistent input ordering |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
13 #set sortby='' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
14 #for $i, $bam in enumerate( $bamfiles ): |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
15 #if $bam.is_of_type('sam', 'cram', ): |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
16 samtools sort |
1
a27cd1e0d9a5
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit e2a10eeee8765ba6cf03847562e56cdaeaf4ba5c"
iuc
parents:
0
diff
changeset
|
17 -@ \$addthreads -m \${GALAXY_MEMORY_MB:-768}M -T "\${TMPDIR:-.}" |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
18 -O sam |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
19 -o ${i}.sam |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
20 '$bam' && |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
21 #else: |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
22 ln -s '$bam' ${i}.sam && |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
23 #end if |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
24 #if ($sortby=='coord' or $sortby=='') and $bam.is_of_type('sam','bam','cram'): |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
25 #set sortby='coord' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
26 #else if ($sortby=='name' or $sortby=='') and $bam.is_of_type('qname_sorted.bam', 'qname_input_sorted.bam'): |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
27 #set $sortby='name' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
28 #else: |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
29 >&2 echo "inconsistently sorted input" && |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
30 exit 1 && |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
31 #end if |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
32 #end for |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
33 #if $bed_file |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
34 #for $i, $bam in enumerate( $bamfiles ): |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
35 samtools index ${i}.sam && |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
36 #end for |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
37 #end if |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
38 samtools merge |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
39 -@ \$addthreads |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
40 -s $seed |
5
84f122ab14d6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
iuc
parents:
4
diff
changeset
|
41 ## force overwrite seems necessay (but I do not understand why ...) |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
42 -f |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
43 ## Galaxy provides only default compression |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
44 ## #if $compression == 'levelone' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
45 ## -1 |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
46 ## #else if $compression == 'uncompressed' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
47 ## -u |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
48 ## #end if |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
49 #if str($headerbam) != 'None' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
50 -h '$headerbam' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
51 #end if |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
52 #if $sortby=='name' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
53 -n |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
54 #end if |
5
84f122ab14d6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
iuc
parents:
4
diff
changeset
|
55 ## since galaxy can't represent this as data type at the moment this option is unsupported |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
56 ## -t TAG The input alignments have been sorted by the value of TAG, then by either position or name (if -n is given). |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
57 #if str($region) != '' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
58 -R '$region' |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
59 #end if |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
60 ## Attach an RG tag to each alignment. The tag value is inferred from file names. |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
61 ## -r |
5
84f122ab14d6
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
iuc
parents:
4
diff
changeset
|
62 ## -r makes no sense with the link names, is there some data set metadata (tags,...) that could be used? |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
63 #if $bed_file: |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
64 -L '$bed_file' |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
65 #end if |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
66 $idrg |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
67 $idpg |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
68 $output |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
69 #for $i, $bam in enumerate( $bamfiles ): |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
70 ${i}.sam |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
71 #end for |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
72 ]]></command> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
73 <inputs> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
74 <param name="bamfiles" type="data" format="sam,bam,cram" multiple="true" optional="false" label="Alignments in BAM format" help="Sets of aligned reads." /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
75 <param name="bed_file" type="data" optional="true" format="bed" label="Merge only reads overlapping the specified regions in the BED file" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
76 <param name="region" type="text" optional="true" argument="-n" label="Merge files in a region" help="Merge files in the specified region indicated by a string" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
77 <param name="headerbam" type="data" format="sam,bam" argument="-h" multiple="false" optional="true" label="File to take @headers from" help="Use the lines of FILE as `@' headers to be copied to out.bam, replacing any header lines that would otherwise be copied from in1.bam. (FILE is actually in SAM format, though any alignment records it may contain are ignored.)" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
78 <param name="idrg" type="boolean" argument="-c" truevalue="-c" falsevalue="" checked="false" label="Make @RG headers unique" help="When several input files contain @RG headers with the same ID, emit only one of them (namely, the header line from the first file we find that ID in) to the merged output file. Combining these similar headers is usually the right thing to do when the files being merged originated from the same file. Without -c, all @RG headers appear in the output file, with random suffices added to their IDs where necessary to differentiate them." /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
79 <param name="idpg" type="boolean" argument="-p" truevalue="-p" falsevalue="" checked="false" label="Make @PG headers unique" help="Similarly, for each @PG ID in the set of files to merge, use the @PG line of the first file we find that ID in rather than adding a suffix to differentiate similar IDs." /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
80 <param name="seed" type="integer" argument="-s" value="1" label="random seed" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
81 <!-- compression options are not accessible in galaxy |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
82 <param name="compression" type="select" label="Advanced compression options" help="Select advanced compression options"> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
83 <option value="default" selected="true">default</option> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
84 <option value="levelone">Use zlib compression level 1</option> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
85 <option value="uncompressed">Uncompressed output</option> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
86 </param>--> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
87 </inputs> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
88 <outputs> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
89 <data name="output" format="bam" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
90 </outputs> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
91 <tests> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
92 <!--tests and data extracted from |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
93 https://github.com/samtools/samtools/blob/9ce8c64493f7ea3fa69bc5c1ac980b1a8e3dcf1f/test/test.pl |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
94 https://github.com/samtools/samtools/tree/develop/test/merge --> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
95 <!-- Merge 1 - Standard 3 file SAM merge all presented on the command line (only checks for similar size, because generated header info differs) --> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
96 <test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
97 <param name="bamfiles" value="test_input_1_a.sam,test_input_1_b.sam,test_input_1_c.sam" /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
98 <output name="output" file="1.merge.expected.bam" ftype="bam" lines_diff="16" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
99 </test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
100 <!-- Merge 2 - Standard 3 file BAM merge all files presented on the command line --> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
101 <test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
102 <param name="bamfiles" value="test_input_1_a.bam,test_input_1_b.bam,test_input_1_c.bam" /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
103 <output name="output" file="2.merge.expected.bam" ftype="bam" lines_diff="16" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
104 </test> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
105 <!-- Merge 3 - 1 file BAM merge with file presented on the command line --> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
106 <test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
107 <param name="bamfiles" value="test_input_1_b.bam" /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
108 <output name="output" file="3.merge.expected.bam" ftype="bam" lines_diff="16" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
109 </test> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
110 <!--Merge 4 - merge all presented on the command line, combine PG and RG rather than dedup --> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
111 <test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
112 <param name="bamfiles" value="test_input_1_a.bam,test_input_1_b.bam" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
113 <param name="idrg" value="-c" /> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
114 <param name="idpg" value="-p" /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
115 <output name="output" file="4.merge.expected.bam" ftype="bam" lines_diff="16" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
116 </test> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
117 <!-- Merge 5 - ID and SN with regex in them (probably not necessary for the galaxy tool because just different input) --> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
118 <test> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
119 <param name="bamfiles" value="test_input_1_a_regex.sam,test_input_1_b_regex.sam" /> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
120 <output name="output" file="5.merge.expected.bam" ftype="bam" lines_diff="16" /> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
121 </test> |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
122 <!-- Merge 6 - Merging with bedfile --> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
123 <test> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
124 <param name="bamfiles" value="test_input_1_a.bam,test_input_1_b.bam,test_input_1_c.bam" /> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
125 <param name="bed_file" value="test_input_1_a.bed" /> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
126 <output name="output" file="6.merge.expected.bam" ftype="bam" lines_diff="16" /> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
127 </test> |
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
128 <!--Merge - 3 file SAM merge all presented on the command line override IDs to file names (not implemented in tool) --> |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
129 <!-- Sort inputs by PG, then merge (not implemented, since -t not supported in the tool) --> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
130 <!-- Sort inputs by PG, then merge (name sorted) (not implemented, since -t not supported in the tool) --> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
131 </tests> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
132 <help> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
133 **What it does** |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
134 Merge multiple sorted alignment files, producing a single sorted output file that contains all the input records and maintains the existing sort order. |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
135 |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
136 If a file to take @headers from is specified the @SQ headers of input files will be merged into the specified header, otherwise they will be merged into a composite header created from the input headers. If in the process of merging @SQ lines for coordinate sorted input files, a conflict arises as to the order (for example input1.bam has @SQ for a,b,c and input2.bam has b,a,c) then the resulting output file will need to be re-sorted back into coordinate order. |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
137 |
2
09015d802fdf
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
1
diff
changeset
|
138 Unless the @PG/@RG headers are made unique when merging @RG and @PG records into the output header then any IDs found to be duplicates of existing IDs in the output header will have a suffix appended to them to differentiate them from similar header records from other files and the read records will be updated to reflect this. |
0
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
139 </help> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
140 <expand macro="citations"/> |
ce3f4ecc9258
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_merge commit 322cbb9a3bb01f858068bda319e72b0a3ff4251b
iuc
parents:
diff
changeset
|
141 </tool> |