diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/samtools_fastx.xml	Mon Mar 12 12:53:10 2018 -0400
@@ -0,0 +1,104 @@
+<?xml version="1.0"?>
+<tool id="samtools_fastx" name="Samtools extract" version="@TOOL_VERSION@">
+    <description>FASTA or FASTQ from a SAM file</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <expand macro="version_command" />
+    <command detect_errors="exit_code">
+    <![CDATA[
+        samtools $output.output_format
+            #if $output.output_format == 'fastq':
+                -v $output.default_quality $output.output_quality
+            #end if
+            #if $reference:
+                --reference '$reference'
+            #end if
+            $copy_flags $omit_read_number
+            -0 '$nonspecific'
+            -1 '$forward'
+            -2 '$reverse'
+            #if str($inclusive_filter) != 'None':
+                #set $filter = $inclusive_filter
+                @FLAGS@
+                -f $flags
+            #end if
+            #if str($exclusive_filter) != 'None':
+                #set $filter = $exclusive_filter
+                @FLAGS@
+                -F $flags
+            #end if
+            '$input'
+    ]]>
+    </command>
+    <inputs>
+        <param name="input" type="data" format="bam,sam" label="BAM or SAM file to convert" />
+        <param argument="--reference" type="data" format="fasta" optional="True" label="Reference FASTA" />
+        <param name="copy_flags" argument="-t" type="boolean" truevalue="-t" falsevalue="" label="Copy RG/BC/QT flags to output header" />
+        <param name="omit_read_number" argument="-n" type="boolean" truevalue="-n" falsevalue="" label="Do not append /1 and /2 to read names" />
+        <param name="inclusive_filter" argument="-f" type="select" multiple="True" label="Require that these flags be set">
+            <expand macro="filter_options" />
+        </param>
+        <param name="exclusive_filter" argument="-F" type="select" multiple="True" label="Exclude reads with the following flags set">
+            <expand macro="filter_options" />
+        </param>
+        <conditional name="output">
+            <param name="output_format" type="select" label="Output format">
+                <option value="fasta">FASTA</option>
+                <option value="fastq">FASTQ</option>
+            </param>
+            <when value="fastq">
+                <param name="default_quality" argument="-v" type="integer" value="1" label="Default quality if none is given" />
+                <param name="output_quality" argument="-O" type="boolean" truevalue="-O" falsevalue="" label="Output quality in the OQ tag if available" />
+            </when>
+            <when value="fasta" />
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="nonspecific" format="fasta" label="${on_string} converted to ${output.output_format} (Neither or both)">
+            <change_format>
+                <when input="output_format" value="fastq" format="fastq" />
+            </change_format>
+        </data>
+        <data name="forward" format="fasta" label="${on_string} converted to ${output.output_format} (READ1)">
+            <change_format>
+                <when input="output_format" value="fastq" format="fastq" />
+            </change_format>
+        </data>
+        <data name="reverse" format="fasta" label="${on_string} converted to ${output.output_format} (READ2)">
+            <change_format>
+                <when input="output_format" value="fastq" format="fastq" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="samtools_fastx-in1.bam" ftype="bam" />
+            <param name="output_format" value="fasta" />
+            <output name="nonspecific" file="samtools_fastx-out1-1.fasta" />
+            <output name="forward" file="samtools_fastx-out1-2.fasta" />
+            <output name="reverse" file="samtools_fastx-out1-3.fasta" />
+        </test>
+        <test>
+            <param name="input" value="samtools_fastx-in2.bam" ftype="bam" />
+            <param name="output_format" value="fastq" />
+            <output name="nonspecific" file="samtools_fastx-out2-1.fastq" />
+            <output name="forward" file="samtools_fastx-out2-2.fastq" />
+            <output name="reverse" file="samtools_fastx-out2-3.fastq" />
+        </test>
+        <test>
+            <param name="input" value="samtools_fastx-in3.sam" ftype="sam" />
+            <param name="output_format" value="fasta" />
+            <output name="nonspecific" file="samtools_fastx-out3-1.fasta" />
+            <output name="forward" file="samtools_fastx-out3-2.fasta" />
+            <output name="reverse" file="samtools_fastx-out3-3.fasta" />
+        </test>
+    </tests>
+    <help>
+        <![CDATA[
+        This tool uses `Samtools <http://www.htslib.org/>`_ to extract sequences from a SAM or BAM file in FASTA or FASTQ format.
+        ]]>
+    </help>
+    <expand macro="citations" />
+</tool>