Mercurial > repos > devteam > sam_to_bam
annotate sam_to_bam.xml @ 5:c73bf16b45df draft
Uploaded
author | devteam |
---|---|
date | Thu, 05 Mar 2015 21:28:25 -0500 |
parents | 8176b2575aa1 |
children | d04d9f1c6791 |
rev | line source |
---|---|
4
8176b2575aa1
Uploaded tool and dependency definitions that specify samtools version 0.1.19.
devteam
parents:
1
diff
changeset
|
1 <tool id="sam_to_bam" name="SAM-to-BAM" version="1.1.4"> |
0 | 2 <description>converts SAM format to BAM format</description> |
3 <requirements> | |
4
8176b2575aa1
Uploaded tool and dependency definitions that specify samtools version 0.1.19.
devteam
parents:
1
diff
changeset
|
4 <requirement type="package" version="0.1.19">samtools</requirement> |
0 | 5 </requirements> |
6 <command interpreter="python"> | |
7 sam_to_bam.py | |
8 --input1=$source.input1 | |
9 #if $source.index_source == "history": | |
10 --ref_file=$source.ref_file | |
11 #else | |
1
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
12 --index=${source.index.fields.path} |
0 | 13 #end if |
14 --output1=$output1 | |
15 </command> | |
16 <inputs> | |
17 <conditional name="source"> | |
18 <param name="index_source" type="select" label="Choose the source for the reference list"> | |
19 <option value="cached">Locally cached</option> | |
20 <option value="history">History</option> | |
21 </param> | |
22 <when value="cached"> | |
1
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
23 <param name="input1" type="data" format="sam" metadata_name="dbkey" label="SAM file to convert"> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
24 <validator type="unspecified_build" /> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
25 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." /> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
26 </param> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
27 <param name="index" type="select" label="Using reference genome"> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
28 <options from_data_table="fasta_indexes"> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
29 <filter type="data_meta" ref="input1" key="dbkey" column="1" /> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
30 <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" /> |
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
31 </options> |
0 | 32 </param> |
33 </when> | |
34 <when value="history"> | |
1
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
35 <param name="input1" type="data" format="sam" label="SAM file to convert" /> |
0 | 36 <param name="ref_file" type="data" format="fasta" metadata_name="dbkey" label="Using reference file" /> |
37 </when> | |
38 </conditional> | |
39 </inputs> | |
40 <outputs> | |
41 <data format="bam" name="output1" label="${tool.name} on ${on_string}: converted BAM"> | |
42 <actions> | |
43 <conditional name="source.index_source"> | |
44 <when value="cached"> | |
45 <action type="metadata" name="dbkey"> | |
46 <option type="from_param" name="source.input1" param_attribute="dbkey" /> | |
47 </action> | |
48 </when> | |
49 <when value="history"> | |
50 <action type="metadata" name="dbkey"> | |
51 <option type="from_param" name="source.ref_file" param_attribute="dbkey" /> | |
52 </action> | |
53 </when> | |
54 </conditional> | |
55 </actions> | |
56 </data> | |
57 </outputs> | |
58 <tests> | |
59 <test> | |
60 <!-- | |
61 Sam-to-Bam command: | |
62 cp test-data/chr_m.fasta . | |
63 samtools faidx chr_m.fasta | |
64 samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam | |
65 samtools sort unsorted.bam sam_to_bam_out1 | |
66 chr_m.fasta is the reference file (chrM from equCab2) | |
67 --> | |
68 <param name="index_source" value="history" /> | |
69 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" /> | |
70 <param name="ref_file" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" /> | |
71 <output name="output1" file="sam_to_bam_out1.bam" ftype="bam" /> | |
72 </test> | |
73 <test> | |
74 <!-- | |
75 Sam-to-Bam command: | |
76 samtools view -hbt chr_m.fasta.fai -o unsorted.bam test-data/sam_to_bam_in1.sam | |
77 samtools sort unsorted.bam sam_to_bam_out2 | |
78 chr_m.fasta is the reference file and the index chr_m.fasta.fai | |
79 these should be in the same directory, and chrM is from equCab2 | |
80 --> | |
81 <param name="index_source" value="cached" /> | |
82 <param name="input1" value="sam_to_bam_in1.sam" ftype="sam" dbkey="chrM" /> | |
1
93f2e3337a33
Update sam_to_bam to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
83 <param name="index" value="chr_m" /> |
0 | 84 <output name="output1" file="sam_to_bam_out2.bam" ftype="bam" /> |
85 </test> | |
86 </tests> | |
87 <help> | |
88 | |
89 **What it does** | |
90 | |
91 This tool uses the SAMTools_ toolkit to produce an indexed BAM file based on a sorted input SAM file. | |
92 | |
93 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml | |
94 | |
95 </help> | |
5 | 96 <citations> |
97 <citation type="doi">10.1093/bioinformatics/btp352</citation> | |
98 </citations> | |
0 | 99 </tool> |