diff export_fasta.xml @ 0:073d32dd1e02 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 9ed0c3078be166bd22136771f517ae91a5198ecf
author iuc
date Fri, 16 Aug 2024 08:50:38 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/export_fasta.xml	Fri Aug 16 08:50:38 2024 +0000
@@ -0,0 +1,66 @@
+<tool id="ampvis2_export_fasta" name="ampvis2 export fasta" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="header"/>
+    <command detect_errors="exit_code"><![CDATA[
+        Rscript '$rscript'
+    ]]></command>
+    <configfiles>
+        <configfile name="rscript"><![CDATA[
+            library(ampvis2, quietly = TRUE)
+            data <- readRDS("$data")
+            amp_export_fasta(data, filename = "$output", tax = $tax)
+        ]]></configfile>
+    </configfiles>
+    <inputs>
+        <expand macro="rds_input_macro"/>
+        <param argument="tax" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Add taxonomic strings to the output"/>
+    </inputs>
+    <outputs>
+        <data name="output" format="fasta"/>
+    </outputs>
+    <tests>
+        <!-- defaults -->
+        <test expect_num_outputs="1">
+            <param name="data" value="AalborgWWTPs-complete.rds" ftype="ampvis2"/> 
+            <output name="output" value="AalborgWWTPs.fa" ftype="fasta"/>
+        </test>
+        <!-- tax -->
+        <test expect_num_outputs="1">
+            <param name="data" value="AalborgWWTPs-complete.rds" ftype="ampvis2"/> 
+            <param name="tax" value="true"/> 
+            <output name="output" ftype="fasta">
+                <assert_contents>
+                    <has_text text=">OTU_2397; k__Bacteria; p__Chloroflexi; c__Anaerolineae; o__Anaerolineales; f__Anaerolineaceae; g__uncultured; s__"/>
+                    <has_size value="125478"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+What it does
+============
+
+Export sequences from an ampvis2 object and optionally add taxonomy to the fasta header lines.
+
+The Galaxy tool calls the `amp_export_fasta
+<https://kasperskytte.github.io/ampvis2/reference/amp_export_fasta.html>`_ function
+of the ampvis2 package.
+
+Input
+=====
+
+@HELP_RDS_INPUT@
+
+In order to work the ampvis2 rds data set needs to contain sequence information.
+
+Output
+======
+
+The sequences contained in the input as fasta.
+
+    ]]></help>
+    <expand macro="citations"/>
+</tool>
\ No newline at end of file