view export_fasta.xml @ 4:c1fcdec30d69 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ampvis2 commit ab75ba7665d7fb5c18ad08dfbba92b273f991dfc
author iuc
date Sat, 16 Mar 2024 11:33:51 +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>