view RBGOA.xml @ 1:f7287f82602f draft

"planemo upload commit 486235d6560c9e95bd42152ad19bf7c3941cdc1b"
author cristian
date Tue, 19 Apr 2022 08:28:43 +0000
parents
children 5acf9dfdfa27
line wrap: on
line source

<tool id="RBGOA" name="RBGOA" version="0.2.0" python_template_version="3.5">
  <description>"Rank Based Gene Ontology Analysis"</description>
    <requirements>
        <requirement type="package" version="5.6">r-ape</requirement>
        <requirement type="package" version="1.20.3">r-getopt</requirement>
    </requirements>
    <version_command>Rscript GO_MWU.R -v</version_command>
    <command detect_errors="exit_code"><![CDATA[
        ln -s '${input1}' samples.tsv &&
        ln -s '${input2}' annotation.tsv &&
        Rscript $__tool_directory__/GO_MWU.R -s $__tool_directory__ -i samples.tsv -a annotation.tsv -g $__tool_directory__/go.obo -d '$input3' -c '$input_filter.cluster' -o '$input_filter.over' -m '$input_filter.min' -p '$grouping.pcut' -t '$grouping.hcut' &&
        mv samples_${input3}.tsv div_input.tsv &&
        mv dissim_${input3}_samples_annotation.tsv dissim.tsv &&
        mv MWU_${input3}_samples.tsv mwu_file.tsv
    ]]></command>
    <inputs>
        <param type="data" name="input1" format="tabular" label="Genes of interest with associated value" />
        <param type="data" name="input2" format="tabular" label="Gene GO annotation file" />
        <param type="select" name="input3" label="GO division" >
            <option value="BP" selected="true">BP</option>
            <option value="MF">MF</option>
            <option value="CC">CC</option>
        </param>
        <section name="input_filter" title="Input Filtering" expanded="true">
            <param type="float" name="over" value="0.1" label="Filter out GO categories that have more than this fraction of total number of genes" />
            <param type="integer" name="min" value="5" label="Consider GO categories that have at least this many genes" />
            <param type="float" name="cluster" value="0.25" label="Threshold for merging similar (gene-sharing) terms" />
        </section>
        <section name="grouping" title="Significance and Grouping">
            <param type="float" name="pcut" value="1e-2" label="Adjusted p-value cutoff for representative GO" />
            <param type="float" name="hcut" value="0.9" label="Height at which to cut the GO terms tree to get 'independent groups'" />
        </section>
    </inputs>
    <outputs>
        <data name="graph" format="pdf" from_work_dir="Rplots.pdf" label="Tree output" />
        <data name="div_input" format="tabular" from_work_dir="div_input.tsv" label="GO Division ${input3}" />
        <data name="dissim" format="tabular" from_work_dir="dissim.tsv" label="Dissimilarity table" />
        <data name="mwu" format="tabular" from_work_dir="mwu_file.tsv" label="Delta rank for GO (${input3})" />
        <data name="results" format="tabular" from_work_dir="results.tsv" label="Raw data for graph" />
        <data name="best_go" format="tabular" from_work_dir="best_go.tsv" label="Best GO terms" />
    </outputs>
    <tests>
        <test>
            <param name="input1" value="heats.csv"/>
            <param name="input2" value="amil_defog_iso2go.tab"/>
            <param name="input3" value="BP"/>
            <output name="graph">
                <assert_contents>
                    <has_size value="7043" delta="50"/>
                </assert_contents>
            </output>
            <output name="div_input">
                <assert_contents>
                    <has_n_lines n="25114"/>
                </assert_contents>
            </output>
            <output name="dissim">
                <assert_contents>
                    <has_n_lines n="266"/>
                </assert_contents>
            </output>
            <output name="mwu">
                <assert_contents>
                    <has_n_lines n="266"/>
                </assert_contents>
            </output>
            <output name="results">
                <assert_contents>
                    <has_n_lines n="51"/>
                </assert_contents>
            </output>
            <output name="best_go">
                <assert_contents>
                    <has_n_lines n="8"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
==========================================================
Rank-based Gene Ontology Analysis with Adaptive Clustering
==========================================================

        Usage: GO_MWU.R [

        -[-help|h]] 

        --scriptdir | -s       <character>

        --input | -i         <character>
                
        --goAnnotations | -a <character>

        --goDatabase | -g    <character>

        --goDivision | -d    <character>

        --threads | -t         <integer>

        --pcut | -p          <double>

        --hcut | -c          <double>

    ]]></help>
    <citations>
        <citation type="bibtex">
@misc{githubGO_MWU,
  author = {LastTODO, FirstTODO},
  year = {TODO},
  title = {GO_MWU},
  publisher = {GitHub},
  journal = {GitHub repository},
  url = {https://github.com/z0on/GO_MWU},
}</citation>
    </citations>
</tool>