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