comparison sam_to_bam.xml @ 11:1e69848b596f draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/sam_to_bam commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:11:24 +0000
parents cf1ffd88f895
children 9bd1568619cd
comparison
equal deleted inserted replaced
10:cf1ffd88f895 11:1e69848b596f
1 <tool id="sam_to_bam" name="SAM-to-BAM" version="2.1.1"> 1 <tool id="sam_to_bam" name="SAM-to-BAM" version="2.1.2" profile="@PROFILE@">
2 <description>convert SAM to BAM</description> 2 <description>convert SAM to BAM</description>
3 3
4 <macros> 4 <macros>
5 <import>macros.xml</import> 5 <import>macros.xml</import>
6 </macros> 6 </macros>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <expand macro="stdio"/> 8 <expand macro="stdio"/>
9 <expand macro="version_command"/> 9 <expand macro="version_command"/>
10 10
11 <command><![CDATA[ 11 <command><![CDATA[
12 #if $source.index_source == "history": 12 @ADDTHREADS@
13 ln -s '${source.ref_file}' input.fa && 13 @ADDMEMORY@
14 samtools faidx input.fa && 14 @PREPARE_FASTA_IDX@
15 #else
16 ln -s '${source.index.fields.path}' input.fa &&
17 ln -s '${source.index.fields.path}.fai' input.fa.fai &&
18 #end if
19 15
20 samtools view 16 samtools view
21 -b 17 -b
22 -@ \${GALAXY_SLOTS:-1} 18 -@ \$addthreads
23 -t input.fa.fai '$input1' | 19 -t '$reffai'
20 '$input' |
24 21
25 samtools sort 22 samtools sort
26 -O bam 23 -O bam
27 -@ \${GALAXY_SLOTS:-1} 24 -@ \$addthreads -m \$addmemory"M"
28 -o '$output1' 25 -o '$output1'
29 -T "\${TMPDIR:-.}" 26 -T "\${TMPDIR:-.}"
30 ]]></command> 27 ]]></command>
31 28
32 <inputs> 29 <inputs>
33 <conditional name="source"> 30 <param name="input" type="data" format="sam" label="SAM file to convert"/>
34 <param label="Choose the source for the reference genome" name="index_source" type="select"> 31 <expand macro="mandatory_reference" argument="-t"/>
35 <option value="cached">Use a built-in genome</option>
36 <option value="history">Use a genome from the history</option>
37 </param>
38 <when value="cached">
39 <param name="input1" type="data" format="sam" label="SAM file to convert">
40 <validator type="unspecified_build" />
41 <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" />
42 </param>
43 <param name="index" type="select" label="Using reference genome">
44 <options from_data_table="fasta_indexes">
45 <filter column="dbkey" key="dbkey" ref="input1" type="data_meta" />
46 <validator message="No reference genome is available for the build associated with the selected input dataset" type="no_options" />
47 </options>
48 </param>
49 </when>
50 <when value="history">
51 <param name="input1" type="data" format="sam" label="SAM file to convert" />
52 <param name="ref_file" type="data" format="fasta" label="Using reference file" />
53 </when>
54 </conditional>
55 </inputs> 32 </inputs>
56 <outputs> 33 <outputs>
57 <data name="output1" format="bam" label="${tool.name} on ${on_string}: converted BAM"> 34 <data name="output1" format="bam" label="${tool.name} on ${on_string}: converted BAM">
58 <actions> 35 <actions>
59 <conditional name="source.index_source"> 36 <conditional name="addref_cond.addref_select">
60 <when value="cached"> 37 <when value="cached">
61 <action name="dbkey" type="metadata"> 38 <action name="dbkey" type="metadata">
62 <option name="source.input1" param_attribute="dbkey" type="from_param" /> 39 <option name="input" param_attribute="dbkey" type="from_param" />
63 </action> 40 </action>
64 </when> 41 </when>
65 <when value="history"> 42 <when value="history">
66 <action name="dbkey" type="metadata"> 43 <action name="dbkey" type="metadata">
67 <option name="source.ref_file" param_attribute="dbkey" type="from_param" /> 44 <option name="addref_cond.ref" param_attribute="dbkey" type="from_param" />
68 </action> 45 </action>
69 </when> 46 </when>
70 </conditional> 47 </conditional>
71 </actions> 48 </actions>
72 </data> 49 </data>
73 </outputs> 50 </outputs>
74 <tests> 51 <tests>
75 <test> 52 <test>
76 <param name="index_source" value="history" /> 53 <param name="addref_select" value="history" />
77 <param name="input1" ftype="sam" value="sam_to_bam_in1.sam" /> 54 <param name="ref" ftype="fasta" dbkey="equCab2" value="chr_m.fasta" />
78 <param name="ref_file" ftype="fasta" dbkey="equCab2" value="chr_m.fasta" /> 55 <param name="input" ftype="sam" value="sam_to_bam_in1.sam" />
79 <output name="output1" ftype="bam" file="sam_to_bam_out1.bam" /> 56 <output name="output1" ftype="bam" file="sam_to_bam_out1.bam" lines_diff="4"/>
80 </test> 57 </test>
81 <test> 58 <test>
82 <param name="index_source" value="cached" /> 59 <param name="addref_select" value="cached" />
83 <param name="input1" ftype="sam" dbkey="equCab2" value="sam_to_bam_in1.sam" /> 60 <param name="ref" value="equCab2chrM" />
84 <param name="index" value="equCab2chrM" /> 61 <param name="input" ftype="sam" dbkey="equCab2" value="sam_to_bam_in1.sam" />
85 <output name="output1" ftype="bam" file="sam_to_bam_out2.bam" /> 62 <output name="output1" ftype="bam" file="sam_to_bam_out2.bam" lines_diff="4"/>
86 </test> 63 </test>
87 <test> 64 <test>
88 <param name="index_source" value="history" /> 65 <param name="addref_select" value="history" />
89 <param name="input1" ftype="sam" value="sam_to_bam_noheader_in2.sam" /> 66 <param name="ref" ftype="fasta" dbkey="equCab2" value="chr_m.fasta" />
90 <param name="ref_file" ftype="fasta" dbkey="equCab2" value="chr_m.fasta" /> 67 <param name="input" ftype="sam" value="sam_to_bam_noheader_in2.sam" />
91 <output name="output1" ftype="bam" file="sam_to_bam_out3.bam" /> 68 <output name="output1" ftype="bam" file="sam_to_bam_out3.bam" lines_diff="4"/>
92 </test> 69 </test>
93 </tests> 70 </tests>
94 <help><![CDATA[ 71 <help><![CDATA[
95 **What it does** 72 **What it does**
96 73