annotate sam_to_bam.xml @ 6:d04d9f1c6791 draft

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