view gprofiler_convert.xml @ 0:e219aca2f9fc draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gprofiler/ commit ed9b518a6aaf6a5aada47e39c039f6936e41b290"
author iuc
date Thu, 14 Nov 2019 05:59:47 -0500
parents
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="gprofiler_convert" name="gProfiler Convert" version="@VERSION@">
    <description>converts between various types of namespaces</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"></expand>
    <expand macro="version_command" />
    <command detect_errors="aggressive">Rscript $script_file</command>
    <configfiles>
        <configfile name="script_file"><![CDATA[

options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")

suppressPackageStartupMessages({
    library("gprofiler2")
})

set_user_agent(paste(get_user_agent(), "galaxy"))
sessionInfo()

#if $tool_settings.base_url
    set_base_url('${tool_settings.base_url}')
#end if

#if $max
    mthreshold <- $max
#else
    mthreshold = Inf
#end if

query <- scan('${input.file_name}', character(), quote = "")

response <- gconvert( query
                    , organism   = '${organism.organism}'
                    , target     = '${target_ns}'
                    , numeric_ns = '${numeric_ns}'
                    , mthreshold = mthreshold
                    , filter_na  = ${filter_na}
                    )

output <- response
output.colnames = colnames(output)
write.table(output, file='${output}', quote=FALSE, sep='\t', row.names = FALSE, col.names = output.colnames)

        ]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="input" />
        <expand macro="organism" />
        <param name="target_ns" type="text" value="ENSG" optional="true" label="Target namespace" help="E.g., ENSG, ENTREZGENE, UNIPROT_GN, REACTOME, WIKIGENE. Check the “Resources” section below for the complete list of supported namespaces." />
        <param name="numeric_ns" type="text" value="" optional="true" label="Numeric IDs treated as" help="The prefix for fully numeric IDs. Check the “Resources” section below for the complete list of supported namespaces (including numeric). E.g., ENTREZGENE_ACC, WIKIGENE_ACC." />
        <param name="max" type="integer" value="" optional="true" label="Maximum number of results per initial identifier to show" help="Shows all by default." />
        <expand macro="filter_na" />
        <expand macro="tool_settings"></expand>
    </inputs>
    <outputs>
        <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <test>
            <param name="input" ftype="txt" value="example_query.txt" />
            <param name="base_url" value="http://biit.cs.ut.ee/gprofiler_archive3/e94_eg41_p11" />
            <output name="output" ftype="tabular" file="example_convert_results.txt" sort="true" />
        </test>
        <test>
            <param name="input" ftype="txt" value="example_query_2.txt" />
            <param name="base_url" value="http://biit.cs.ut.ee/gprofiler_archive3/e94_eg41_p11" />
            <conditional name="organism">
                <param name="organism" value="mmusculus" />
            </conditional>
            <param name="target_ns" value="EMBL" />
            <param name="numeric_ns" value="WIKIGENE_ACC" />
            <param name="max" value="1" />
            <param name="filter_na" value="T" />
            <output name="output" ftype="tabular" file="example_convert_results_2.txt" sort="true" />
        </test>
    </tests>

    <help><![CDATA[

**What it does**
  This tool wraps gprofiler2 R package which performs a request to g:Profiler g:Convert tool through its API.
    g:Profiler g:Convert uses the information in Ensembl databases to handle hundreds of types of identifiers for
    genes, proteins, transcripts, microarray probesets, etc, for many species, experimental platforms and
    biological databases. The input is flexible: it accepts a mixed list of IDs and recognises their types
    automatically. It can also serve as a service to get all genes belonging to a particular functional category.

-----

@REFERENCES@

    ]]></help>
    <expand macro="citations" />
</tool>