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