Mercurial > repos > devteam > samtools_slice_bam
annotate samtools_slice_bam.xml @ 6:b8beef827165 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 9c5a35ce695c3d134e41d8695487edd5f71ea33c
author | iuc |
---|---|
date | Sun, 08 Sep 2024 03:26:35 +0000 |
parents | b5c88b7b153e |
children |
rev | line source |
---|---|
5
b5c88b7b153e
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit cd62639660bef041ba14ecff337fb98e84e75d8a
iuc
parents:
4
diff
changeset
|
1 <tool id="samtools_slice_bam" name="Slice" version="2.0.3" profile="@PROFILE@"> |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
2 <description>BAM by genomic regions</description> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
3 <macros> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
4 <import>macros.xml</import> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
5 </macros> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
6 |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
7 <expand macro="requirements"/> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
8 <expand macro="stdio"/> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
9 <expand macro="version_command"/> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
10 |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
11 <command><![CDATA[ |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
12 ln -s '${input_bam}' temp_input.bam && |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
13 ln -s '${input_bam.metadata.bam_index}' temp_input.bam.bai && |
2 | 14 |
15 #if str($slice_method.slice_method_selector) == "bed": | |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
16 samtools view -@ \${GALAXY_SLOTS:-1} -b -L "${input_interval}" -o unsorted_output.bam temp_input.bam && |
2 | 17 #elif str($slice_method.slice_method_selector) == "chr": |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
18 samtools view -@ \${GALAXY_SLOTS:-1} -b -o unsorted_output.bam temp_input.bam |
2 | 19 ${ ' '.join( map( lambda x:'"%s"' % ( x ), str( $slice_method.refs ).split(",") ) ) } && |
20 #elif str($slice_method.slice_method_selector) == "man": | |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
21 samtools view -@ \${GALAXY_SLOTS:-1} -b -o unsorted_output.bam temp_input.bam |
2 | 22 |
23 #for $region in $slice_method.regions: | |
24 "${region.chrom}:${region.start}-${region.end}" | |
25 #end for | |
26 && | |
27 #end if | |
28 | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
29 samtools sort |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
30 -O bam |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
31 -T "\${TMPDIR:-.}" |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
32 -@ \${GALAXY_SLOTS:-1} |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
33 -o '${output_bam}' |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
34 unsorted_output.bam |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
35 ]]></command> |
2 | 36 <inputs> |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
37 <param name="input_bam" type="data" format="bam" label="Select BAM dataset to slice" /> |
2 | 38 <conditional name="slice_method"> |
39 <param name="slice_method_selector" type="select" label="How do you want to slice your dataset?"> | |
40 <option value="bed">using a list of intervals from a BED dataset</option> | |
41 <option value="chr">by chromosomes/contigs present in the BAM dataset</option> | |
42 <option value="man">by chromosomes/contigs and coordinates</option> | |
43 </param> | |
44 <when value="bed"> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
45 <param name="input_interval" type="data" format="bed" label="BED file" help="BED datasets can be obtained using "Get Data -> UCSC Main" datasource" /> |
2 | 46 </when> |
47 <when value="chr"> | |
48 <param name="refs" type="select" optional="False" multiple="True" label="Select references (chromosomes and contigs) you would like to restrict bam to" help="Click and type in the box above to see options. You can select multiple entries. If "No options available" is displayed, you need to re-detect metadata on the input dataset. See help section below."> | |
49 | |
50 <!-- The options tagset below extracts reference names from bam file metadata --> | |
51 <!-- This will not work with bed files with old style metadata. However this --> | |
52 <!-- Can be easily fixed by re-deceting metadata on a bam dataset by clicking --> | |
53 <!-- The pencil icon and settind datatype to "bam" --> | |
54 <!-- This change has been commited in the following pull request: --> | |
55 <!-- https://github.com/galaxyproject/galaxy/pull/107 --> | |
56 | |
57 <options> | |
58 <filter type="data_meta" ref="input_bam" key="reference_names" /> | |
59 </options> | |
60 </param> | |
61 </when> | |
62 <when value="man"> | |
63 <repeat name="regions" title="Regions" min="1"> | |
64 <param name="chrom" type="select" optional="False" label="Select references (chromosomes and contigs) you would like to restrict bam to" help="Select chromosome/contig from the list. If "No options available" is displayed, you need to re-detect metadata on the input dataset. See help section below."> | |
65 | |
66 <!-- See comments above --> | |
67 | |
68 <options> | |
69 <filter type="data_meta" ref="input_bam" key="reference_names" /> | |
70 </options> | |
71 </param> | |
72 <param name="start" type="integer" min="1" value="0" label="Enter START coordinate (1-based)"/> | |
73 <param name="end" type="integer" min="1" value="100" label="Enter END coordinate"/> | |
74 </repeat> | |
75 </when> | |
76 </conditional> | |
77 </inputs> | |
78 <outputs> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
79 <data name="output_bam" format="bam" /> |
2 | 80 </outputs> |
81 <tests> | |
82 <test> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
83 <param name="input_bam" ftype="bam" value="bam-slice-input.bam" /> |
2 | 84 <param name="slice_method_selector" value="bed"/> |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
85 <param name="input_interval" ftype="bed" value="bam-slice.bed" /> |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
86 <output name="output_bam" file="bam-slice-test1.bam" ftype="bam" lines_diff="4" /> |
2 | 87 </test> |
88 <test> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
89 <param name="input_bam" ftype="bam" value="bam-slice-input.bam" /> |
2 | 90 <param name="slice_method_selector" value="chr"/> |
91 <param name="refs" value="chrM" /> | |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
92 <output name="output_bam" file="bam-slice-test2.bam" ftype="bam" lines_diff="4" /> |
2 | 93 </test> |
94 <test> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
95 <param name="input_bam" ftype="bam" value="bam-slice-input.bam" /> |
2 | 96 <param name="slice_method_selector" value="man"/> |
97 <param name="chrom" value="chrM" /> | |
98 <param name="start" value="1" /> | |
99 <param name="end" value="1000" /> | |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
100 <output name="output_bam" file="bam-slice-test3.bam" ftype="bam" lines_diff="4"/> |
2 | 101 </test> |
102 </tests> | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
103 <help><![CDATA[ |
0 | 104 **What it does** |
105 | |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
106 Allows to restrict (slice) input BAM dataset to a list of intervals defined in a BED file, individual chromosomes, or manually set list of coordinates. |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
107 BED datasets can be obtained from **Get Data -> UCSC Main**. |
0 | 108 |
4
344fc91e1bfd
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
iuc
parents:
3
diff
changeset
|
109 This tool is based on ``samtools view`` command. |
0 | 110 |
2 | 111 @no-chrom-options@ |
3
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
112 ]]></help> |
a4a10c7924d1
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit 411130b45dc30f7f24f41cdeec5e148c5d8faf40
iuc
parents:
2
diff
changeset
|
113 <expand macro="citations"/> |
0 | 114 </tool> |