annotate sam_to_bam.xml @ 7:881e16ad05c6 draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
author devteam
date Wed, 11 Nov 2015 12:51:52 -0500
parents d04d9f1c6791
children f7a0d41036c7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
1 <tool id="sam_to_bam" name="SAM-to-BAM" version="2.1">
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
2 <description>convert SAM to BAM</description>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
3 <macros>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
4 <import>macros.xml</import>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
5 </macros>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
6 <expand macro="requirements"></expand>
7
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
7 <expand macro="stdio"></expand>
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
8 <expand macro="version_command"></expand>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
9 <command>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
10 <![CDATA[
7
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
11 #if $source.index_source == "history":
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
12 ln -s $source.ref_file input.fa &&
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
13 samtools faidx input.fa &&
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
14 #else
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
15 ln -s ${source.index.fields.path} input.fa &&
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
16 ln -s ${source.index.fields.path}.fai input.fa.fai &&
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
17 #end if
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
18 samtools view -b -@ \${GALAXY_SLOTS:-1} -t input.fa.fai "$input1" | samtools sort -O bam -@ \${GALAXY_SLOTS:-1} -o "$output1" -T temp
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
19 ]]>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
20 </command>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
21 <inputs>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
22 <conditional name="source">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
23 <param label="Choose the source for the reference genome" name="index_source" type="select">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
24 <option value="cached">Use a built-in genome</option>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
25 <option value="history">Use a genome from the history</option>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
26 </param>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
27 <when value="cached">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
28 <param format="sam" label="SAM file to convert" metadata_name="dbkey" name="input1" type="data">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
29 <validator type="unspecified_build" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
30 <validator message="Sequences are not currently available for the specified build." metadata_column="1" metadata_name="dbkey" table_name="fasta_indexes" type="dataset_metadata_in_data_table" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
31 </param>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
32 <param label="Using reference genome" name="index" type="select">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
33 <options from_data_table="fasta_indexes">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
34 <filter column="1" key="dbkey" ref="input1" type="data_meta" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
35 <validator message="No reference genome is available for the build associated with the selected input dataset" type="no_options" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
36 </options>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
37 </param>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
38 </when>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
39 <when value="history">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
40 <param format="sam" label="SAM file to convert" name="input1" type="data" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
41 <param format="fasta" label="Using reference file" metadata_name="dbkey" name="ref_file" type="data" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
42 </when>
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
43 </conditional>
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
44 </inputs>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
45 <outputs>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
46 <data format="bam" label="${tool.name} on ${on_string}: converted BAM" name="output1">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
47 <actions>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
48 <conditional name="source.index_source">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
49 <when value="cached">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
50 <action name="dbkey" type="metadata">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
51 <option name="source.input1" param_attribute="dbkey" type="from_param" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
52 </action>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
53 </when>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
54 <when value="history">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
55 <action name="dbkey" type="metadata">
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
56 <option name="source.ref_file" param_attribute="dbkey" type="from_param" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
57 </action>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
58 </when>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
59 </conditional>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
60 </actions>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
61 </data>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
62 </outputs>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
63 <tests>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
64 <test>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
65 <param name="index_source" value="history" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
66 <param name="input1" ftype="sam" value="sam_to_bam_in1.sam" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
67 <param dbkey="equCab2" ftype="fasta" name="ref_file" value="chr_m.fasta" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
68 <output file="sam_to_bam_out1.bam" ftype="bam" name="output1" />
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
69 </test>
7
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
70 <test>
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
71 <param name="index_source" value="history" />
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
72 <param name="input1" ftype="sam" value="sam_to_bam_noheader_in2.sam" />
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
73 <param dbkey="equCab2" ftype="fasta" name="ref_file" value="chr_m.fasta" />
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
74 <output file="sam_to_bam_out3.bam" ftype="bam" name="output1" />
881e16ad05c6 planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/samtools/sam_to_bam commit a1517c9d22029095120643bbe2c8fa53754dd2b7
devteam
parents: 6
diff changeset
75 </test>
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
76 </tests>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
77 <help>
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
78 <![CDATA[
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
79 **What it does**
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
80
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
81 Converts SAM dataset into its binary, BAM, representation using ``samtools sort`` and ``view`` commands::
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
82
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
83 samtools sort -O bam -o sorted_input.bam [INPUT SAM]
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
84 samtools view -b -h -o -T [REFERENCE GENOME] [OUTPUT BAM] sorted_input.bam
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
85
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
86 ]]>
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
87 </help>
6
d04d9f1c6791 Uploaded
devteam
parents: 5
diff changeset
88 <expand macro="citations"></expand>
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
89 </tool>