annotate sam_to_bam.xml @ 0:d59a7ac34414 draft

Uploaded tool tarball.
author devteam
date Tue, 20 Aug 2013 11:59:47 -0400
parents
children 7095d651c95f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
1 <tool id="sam_to_bam" name="SAM-to-BAM" version="1.1.2">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
2 <description>converts SAM format to BAM format</description>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
3 <requirements>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
4 <requirement type="package" version="0.1.18">samtools</requirement>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
5 </requirements>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
6 <command interpreter="python">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
7 sam_to_bam.py
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
8 --input1=$source.input1
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
9 #if $source.index_source == "history":
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
10 --dbkey=${ref_file.metadata.dbkey}
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
11 --ref_file=$source.ref_file
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
12 #else
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
13 --dbkey=${input1.metadata.dbkey}
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
14 #end if
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
15 --output1=$output1
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
16 --index_dir=${GALAXY_DATA_INDEX_DIR}
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
17 </command>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
18 <inputs>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
19 <conditional name="source">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
20 <param name="index_source" type="select" label="Choose the source for the reference list">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
21 <option value="cached">Locally cached</option>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
22 <option value="history">History</option>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
23 </param>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
24 <when value="cached">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
25 <param name="input1" type="data" format="sam" metadata_name="dbkey" label="SAM File to Convert">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
26 <validator type="unspecified_build" />
d59a7ac34414 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" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
28 </param>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
29 </when>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
30 <when value="history">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
31 <param name="input1" type="data" format="sam" label="Convert SAM file" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
32 <param name="ref_file" type="data" format="fasta" metadata_name="dbkey" label="Using reference file" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
33 </when>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
34 </conditional>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
35 </inputs>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
36 <outputs>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
37 <data format="bam" name="output1" label="${tool.name} on ${on_string}: converted BAM">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
38 <actions>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
39 <conditional name="source.index_source">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
40 <when value="cached">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
41 <action type="metadata" name="dbkey">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
42 <option type="from_param" name="source.input1" param_attribute="dbkey" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
43 </action>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
44 </when>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
45 <when value="history">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
46 <action type="metadata" name="dbkey">
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
47 <option type="from_param" name="source.ref_file" param_attribute="dbkey" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
48 </action>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
49 </when>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
50 </conditional>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
51 </actions>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
52 </data>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
53 </outputs>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
54 <tests>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
55 <test>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
56 <!--
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
57 Sam-to-Bam command:
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
58 cp test-data/chr_m.fasta .
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
59 samtools faidx chr_m.fasta
d59a7ac34414 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
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
61 samtools sort unsorted.bam sam_to_bam_out1
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
62 chr_m.fasta is the reference file (chrM from equCab2)
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
63 -->
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
64 <param name="index_source" value="history" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
65 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
66 <param name="ref_file" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
67 <output name="output1" file="sam_to_bam_out1.bam" ftype="bam" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
68 </test>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
69 <test>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
70 <!--
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
71 Sam-to-Bam command:
d59a7ac34414 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
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
73 samtools sort unsorted.bam sam_to_bam_out2
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
74 chr_m.fasta is the reference file and the index chr_m.fasta.fai
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
75 these should be in the same directory, and chrM is from equCab2
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
76 -->
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
77 <param name="index_source" value="cached" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
78 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" dbkey="chrM" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
79 <output name="output1" file="sam_to_bam_out2.bam" ftype="bam" />
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
80 </test>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
81 </tests>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
82 <help>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
83
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
84 **What it does**
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
85
d59a7ac34414 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.
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
87
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
88 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
89
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
90 ------
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
91
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
92 **Citation**
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
93
d59a7ac34414 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;`_
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
95
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
96 </help>
d59a7ac34414 Uploaded tool tarball.
devteam
parents:
diff changeset
97 </tool>