comparison samtools_fastx.xml @ 0:a0d039fa9771 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_fastx commit 9291a5cc3e04c19cefb28b1431a71a619e5e85b4
author iuc
date Mon, 12 Mar 2018 12:53:10 -0400
parents
children a8d69aee190e
comparison
equal deleted inserted replaced
-1:000000000000 0:a0d039fa9771
1 <?xml version="1.0"?>
2 <tool id="samtools_fastx" name="Samtools extract" version="@TOOL_VERSION@">
3 <description>FASTA or FASTQ from a SAM file</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="requirements" />
8 <expand macro="version_command" />
9 <command detect_errors="exit_code">
10 <![CDATA[
11 samtools $output.output_format
12 #if $output.output_format == 'fastq':
13 -v $output.default_quality $output.output_quality
14 #end if
15 #if $reference:
16 --reference '$reference'
17 #end if
18 $copy_flags $omit_read_number
19 -0 '$nonspecific'
20 -1 '$forward'
21 -2 '$reverse'
22 #if str($inclusive_filter) != 'None':
23 #set $filter = $inclusive_filter
24 @FLAGS@
25 -f $flags
26 #end if
27 #if str($exclusive_filter) != 'None':
28 #set $filter = $exclusive_filter
29 @FLAGS@
30 -F $flags
31 #end if
32 '$input'
33 ]]>
34 </command>
35 <inputs>
36 <param name="input" type="data" format="bam,sam" label="BAM or SAM file to convert" />
37 <param argument="--reference" type="data" format="fasta" optional="True" label="Reference FASTA" />
38 <param name="copy_flags" argument="-t" type="boolean" truevalue="-t" falsevalue="" label="Copy RG/BC/QT flags to output header" />
39 <param name="omit_read_number" argument="-n" type="boolean" truevalue="-n" falsevalue="" label="Do not append /1 and /2 to read names" />
40 <param name="inclusive_filter" argument="-f" type="select" multiple="True" label="Require that these flags be set">
41 <expand macro="filter_options" />
42 </param>
43 <param name="exclusive_filter" argument="-F" type="select" multiple="True" label="Exclude reads with the following flags set">
44 <expand macro="filter_options" />
45 </param>
46 <conditional name="output">
47 <param name="output_format" type="select" label="Output format">
48 <option value="fasta">FASTA</option>
49 <option value="fastq">FASTQ</option>
50 </param>
51 <when value="fastq">
52 <param name="default_quality" argument="-v" type="integer" value="1" label="Default quality if none is given" />
53 <param name="output_quality" argument="-O" type="boolean" truevalue="-O" falsevalue="" label="Output quality in the OQ tag if available" />
54 </when>
55 <when value="fasta" />
56 </conditional>
57 </inputs>
58 <outputs>
59 <data name="nonspecific" format="fasta" label="${on_string} converted to ${output.output_format} (Neither or both)">
60 <change_format>
61 <when input="output_format" value="fastq" format="fastq" />
62 </change_format>
63 </data>
64 <data name="forward" format="fasta" label="${on_string} converted to ${output.output_format} (READ1)">
65 <change_format>
66 <when input="output_format" value="fastq" format="fastq" />
67 </change_format>
68 </data>
69 <data name="reverse" format="fasta" label="${on_string} converted to ${output.output_format} (READ2)">
70 <change_format>
71 <when input="output_format" value="fastq" format="fastq" />
72 </change_format>
73 </data>
74 </outputs>
75 <tests>
76 <test>
77 <param name="input" value="samtools_fastx-in1.bam" ftype="bam" />
78 <param name="output_format" value="fasta" />
79 <output name="nonspecific" file="samtools_fastx-out1-1.fasta" />
80 <output name="forward" file="samtools_fastx-out1-2.fasta" />
81 <output name="reverse" file="samtools_fastx-out1-3.fasta" />
82 </test>
83 <test>
84 <param name="input" value="samtools_fastx-in2.bam" ftype="bam" />
85 <param name="output_format" value="fastq" />
86 <output name="nonspecific" file="samtools_fastx-out2-1.fastq" />
87 <output name="forward" file="samtools_fastx-out2-2.fastq" />
88 <output name="reverse" file="samtools_fastx-out2-3.fastq" />
89 </test>
90 <test>
91 <param name="input" value="samtools_fastx-in3.sam" ftype="sam" />
92 <param name="output_format" value="fasta" />
93 <output name="nonspecific" file="samtools_fastx-out3-1.fasta" />
94 <output name="forward" file="samtools_fastx-out3-2.fasta" />
95 <output name="reverse" file="samtools_fastx-out3-3.fasta" />
96 </test>
97 </tests>
98 <help>
99 <![CDATA[
100 This tool uses `Samtools <http://www.htslib.org/>`_ to extract sequences from a SAM or BAM file in FASTA or FASTQ format.
101 ]]>
102 </help>
103 <expand macro="citations" />
104 </tool>