view export_fasta.xml @ 7:5939a607c306 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit d92935972ac18906154fadf42bd0c008e3c437e2
author iuc
date Fri, 25 Oct 2024 14:14:13 +0000
parents 0ddd34d51029
children
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" 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>