annotate sam_to_bam.xml @ 0:30fdbaccb96b

Uploaded tool tarball.
author devteam
date Mon, 26 Aug 2013 14:22:00 -0400
parents
children 93f2e3337a33
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
1 <tool id="sam_to_bam" name="SAM-to-BAM" version="1.1.2">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
2 <description>converts SAM format to BAM format</description>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
3 <requirements>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
4 <requirement type="package" version="0.1.18">samtools</requirement>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
5 </requirements>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
6 <command interpreter="python">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
7 sam_to_bam.py
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
8 --input1=$source.input1
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
9 #if $source.index_source == "history":
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
10 --dbkey=${ref_file.metadata.dbkey}
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
11 --ref_file=$source.ref_file
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
12 #else
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
13 --dbkey=${input1.metadata.dbkey}
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
14 #end if
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
15 --output1=$output1
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
16 --index_dir=${GALAXY_DATA_INDEX_DIR}
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
17 </command>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
18 <inputs>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
19 <conditional name="source">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
20 <param name="index_source" type="select" label="Choose the source for the reference list">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
21 <option value="cached">Locally cached</option>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
22 <option value="history">History</option>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
23 </param>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
24 <when value="cached">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
25 <param name="input1" type="data" format="sam" metadata_name="dbkey" label="SAM File to Convert">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
26 <validator type="unspecified_build" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
27 <validator type="dataset_metadata_in_file" filename="sam_fa_indices.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." line_startswith="index" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
28 </param>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
29 </when>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
30 <when value="history">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
31 <param name="input1" type="data" format="sam" label="Convert SAM file" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
32 <param name="ref_file" type="data" format="fasta" metadata_name="dbkey" label="Using reference file" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
33 </when>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
34 </conditional>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
35 </inputs>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
36 <outputs>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
37 <data format="bam" name="output1" label="${tool.name} on ${on_string}: converted BAM">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
38 <actions>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
39 <conditional name="source.index_source">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
40 <when value="cached">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
41 <action type="metadata" name="dbkey">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
42 <option type="from_param" name="source.input1" param_attribute="dbkey" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
43 </action>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
44 </when>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
45 <when value="history">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
46 <action type="metadata" name="dbkey">
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
47 <option type="from_param" name="source.ref_file" param_attribute="dbkey" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
48 </action>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
49 </when>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
50 </conditional>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
51 </actions>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
52 </data>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
53 </outputs>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
54 <tests>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
55 <test>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
56 <!--
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
57 Sam-to-Bam command:
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
58 cp test-data/chr_m.fasta .
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
59 samtools faidx chr_m.fasta
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
60 samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
61 samtools sort unsorted.bam sam_to_bam_out1
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
62 chr_m.fasta is the reference file (chrM from equCab2)
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
63 -->
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
64 <param name="index_source" value="history" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
65 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
66 <param name="ref_file" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
67 <output name="output1" file="sam_to_bam_out1.bam" ftype="bam" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
68 </test>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
69 <test>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
70 <!--
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
71 Sam-to-Bam command:
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
72 samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
73 samtools sort unsorted.bam sam_to_bam_out2
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
74 chr_m.fasta is the reference file and the index chr_m.fasta.fai
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
75 these should be in the same directory, and chrM is from equCab2
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
76 -->
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
77 <param name="index_source" value="cached" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
78 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" dbkey="chrM" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
79 <output name="output1" file="sam_to_bam_out2.bam" ftype="bam" />
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
80 </test>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
81 </tests>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
82 <help>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
83
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
84 **What it does**
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
85
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
86 This tool uses the SAMTools_ toolkit to produce an indexed BAM file based on a sorted input SAM file.
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
87
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
88 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
89
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
90 ------
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
91
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
92 **Citation**
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
93
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
94 For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. &lt;http://www.ncbi.nlm.nih.gov/pubmed/19505943&gt;`_
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
95
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
96 </help>
30fdbaccb96b Uploaded tool tarball.
devteam
parents:
diff changeset
97 </tool>