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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
14
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
19 ${ ' '.join( map( lambda x:'"%s"' % ( x ), str( $slice_method.refs ).split(",") ) ) } &&
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
22
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
23 #for $region in $slice_method.regions:
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
24 "${region.chrom}:${region.start}-${region.end}"
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
25 #end for
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
26 &&
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
27 #end if
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
38 <conditional name="slice_method">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
39 <param name="slice_method_selector" type="select" label="How do you want to slice your dataset?">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
40 <option value="bed">using a list of intervals from a BED dataset</option>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
41 <option value="chr">by chromosomes/contigs present in the BAM dataset</option>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
42 <option value="man">by chromosomes/contigs and coordinates</option>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
43 </param>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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 &quot;Get Data -> UCSC Main&quot; datasource" />
2
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
46 </when>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
47 <when value="chr">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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 &quot;No options available&quot; is displayed, you need to re-detect metadata on the input dataset. See help section below.">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
49
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
50 <!-- The options tagset below extracts reference names from bam file metadata -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
51 <!-- This will not work with bed files with old style metadata. However this -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
52 <!-- Can be easily fixed by re-deceting metadata on a bam dataset by clicking -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
53 <!-- The pencil icon and settind datatype to "bam" -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
54 <!-- This change has been commited in the following pull request: -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
55 <!-- https://github.com/galaxyproject/galaxy/pull/107 -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
56
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
57 <options>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
58 <filter type="data_meta" ref="input_bam" key="reference_names" />
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
59 </options>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
60 </param>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
61 </when>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
62 <when value="man">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
63 <repeat name="regions" title="Regions" min="1">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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 &quot;No options available&quot; is displayed, you need to re-detect metadata on the input dataset. See help section below.">
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
65
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
66 <!-- See comments above -->
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
67
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
68 <options>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
69 <filter type="data_meta" ref="input_bam" key="reference_names" />
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
70 </options>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
71 </param>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
72 <param name="start" type="integer" min="1" value="0" label="Enter START coordinate (1-based)"/>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
73 <param name="end" type="integer" min="1" value="100" label="Enter END coordinate"/>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
74 </repeat>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
75 </when>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
76 </conditional>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
77 </inputs>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
80 </outputs>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
81 <tests>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
87 </test>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
90 <param name="slice_method_selector" value="chr"/>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
93 </test>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
96 <param name="slice_method_selector" value="man"/>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
97 <param name="chrom" value="chrM" />
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
98 <param name="start" value="1" />
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
101 </test>
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
68ba55e96489 Uploaded tool tarball.
devteam
parents:
diff changeset
104 **What it does**
68ba55e96489 Uploaded tool tarball.
devteam
parents:
diff changeset
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
68ba55e96489 Uploaded tool tarball.
devteam
parents:
diff changeset
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
68ba55e96489 Uploaded tool tarball.
devteam
parents:
diff changeset
110
2
2b474ebbfc7d Uploaded
devteam
parents: 1
diff changeset
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
68ba55e96489 Uploaded tool tarball.
devteam
parents:
diff changeset
114 </tool>