view export_fasta.xml @ 0:3c3c359d9b85 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit 7c0ecbffdb5e993f5af7e3b52c424c2761fb91d3"
author iuc
date Mon, 04 Apr 2022 10:22:24 +0000
parents
children e10b5eebd415
line wrap: on
line source

<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" help="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 size="106282"/>
                </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://madsalbertsen.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>