Mercurial > repos > devteam > samtools_slice_bam
annotate samtools_slice_bam.xml @ 7:fea1a167b822 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
| author | iuc |
|---|---|
| date | Thu, 19 Jun 2025 13:01:04 +0000 |
| parents | b5c88b7b153e |
| children | adc4ed59d82b |
| rev | line source |
|---|---|
|
7
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
1 <tool id="samtools_slice_bam" name="Slice" version="2.0.4" 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" /> |
|
7
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
84 <conditional name="slice_method"> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
85 <param name="slice_method_selector" value="bed"/> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
86 <param name="input_interval" ftype="bed" value="bam-slice.bed" /> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
87 </conditional> |
|
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
|
88 <output name="output_bam" file="bam-slice-test1.bam" ftype="bam" lines_diff="4" /> |
| 2 | 89 </test> |
| 90 <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
|
91 <param name="input_bam" ftype="bam" value="bam-slice-input.bam" /> |
|
7
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
92 <conditional name="slice_method"> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
93 <param name="slice_method_selector" value="chr"/> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
94 <param name="refs" value="chrM" /> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
95 </conditional> |
|
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
|
96 <output name="output_bam" file="bam-slice-test2.bam" ftype="bam" lines_diff="4" /> |
| 2 | 97 </test> |
| 98 <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
|
99 <param name="input_bam" ftype="bam" value="bam-slice-input.bam" /> |
|
7
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
100 <conditional name="slice_method"> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
101 <param name="slice_method_selector" value="man"/> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
102 <repeat name="regions"> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
103 <param name="chrom" value="chrM" /> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
104 <param name="start" value="1" /> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
105 <param name="end" value="1000" /> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
106 </repeat> |
|
fea1a167b822
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_slice_bam commit c508c3af0f4121dcc38e0be63db00a604e997b8a
iuc
parents:
5
diff
changeset
|
107 </conditional> |
|
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
|
108 <output name="output_bam" file="bam-slice-test3.bam" ftype="bam" lines_diff="4"/> |
| 2 | 109 </test> |
| 110 </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
|
111 <help><![CDATA[ |
| 0 | 112 **What it does** |
| 113 | |
|
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
|
114 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
|
115 BED datasets can be obtained from **Get Data -> UCSC Main**. |
| 0 | 116 |
|
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
|
117 This tool is based on ``samtools view`` command. |
| 0 | 118 |
| 2 | 119 @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
|
120 ]]></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
|
121 <expand macro="citations"/> |
| 0 | 122 </tool> |
