view decoupler_pathway_inference.xml @ 2:82b7cd3e1bbd draft default tip

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit b01245159f9cb67101497bb974b2c13bcee019b7
author ebi-gxa
date Tue, 16 Apr 2024 11:49:19 +0000
parents 77d680b36e23
children
line wrap: on
line source

<tool id="decoupler_pathway_inference" name="Decoupler Pathway Inference" version="1.4.0+galaxy0" profile="20.05" license="MIT">
    <description>
        of functional genesets/pathways for scRNA-seq data.
    </description>
    <requirements>
        <requirement type="package" version="1.4.0">decoupler</requirement>
    </requirements>
    <command>
        python '$__tool_directory__/decoupler_pathway_inference.py'
            -i '$input_anndata'
            -n '$input_network_file'
            --min_n "$min_n"
            --method '$method'
            $use_raw
            --source $source
            --target $target
            --weight $weight
            --output "inference"
            $write_activities_path
    </command>
    <inputs>
        <param name="input_anndata" type="data" format="h5ad" label="Input AnnData file" />
        <param name="input_network_file" type="data" format="tabular" label="Input Network file" help="Tabular file with columns Source, Target and Weight. A source gene/pathway regulates/contains a target gene, weights can be either positive or negative. The source element needs to be part of the network, the target is a gene in the network and in the dataset" />
        <param name="min_n" type="integer" min="0" value="5" label="Minimum targets per source." help="If targets are less than minimum, sources are removed" />
        <param name="method" type="select" label="Activity inference method">
            <option value="mlm" selected="true">Multivariate linear model (MLM)</option>
            <option value="ulm">Univariate linear model (ULM)</option>
        </param>
        <param name="use_raw" type="boolean" truevalue="--use_raw" falsevalue="" checked="false" label="Use the raw part of the AnnData object" />
        <param name="write_activities_path" type="boolean" truevalue="--activities_path anndata_activities_path.h5ad" falsevalue="" checked="true" label="Write the activities AnnData object (contains the MLM/ULM activity results for each pathway and each cell in the main matrix, it is not a replacement of the original AnnData provided as input)." />
        <param name="source" type="text" value='source' label="Column name in network with source nodes." help="If empty then default is 'source' is used." />
        <param name="target" type="text" value='target' label="Column name in network with target nodes." help="If empty then default is 'target' is used." />
        <param name="weight" type="text" value='weight' label="Column name in network with weight." help="If empty then default is 'weight' is used." />
    </inputs>
    <outputs>
        <data name="output_ad" format="h5ad" from_work_dir="anndata_activities_path.h5ad" label="${tool.name} on ${on_string}: Regulators/Pathways activity AnnData file">
            <filter>write_activities_path</filter>
        </data>
        <data name="output_table" format="tabular" from_work_dir="inference.tsv" label="${tool.name} on ${on_string}: Output estimate table" />
    </outputs>
    <tests>
        <!-- Hint: You can use [ctrl+alt+t] after defining the inputs/outputs to auto-scaffold some basic test cases. -->

    <test expect_num_outputs="2">
        <param name="input_anndata" value="pbmc3k_processed.h5ad"/>
        <param name="input_network_file" value="progeny_test.tsv"/>
        <param name="min_n" value="0"/>
        <param name="method" value="mlm"/>
        <param name="use_raw" value="false"/>
        <param name="write_activities_path" value="true"/>
        <param name="source" value="source"/>
        <param name="target" value="target"/>
        <param name="weight" value="weight"/>
        <output name="output_ad">
            <assert_contents>
                <has_h5_keys keys="obsm/mlm_estimate"/>
            </assert_contents>
        </output>
        <output name="output_table">
            <assert_contents>
                <has_n_columns n="5"/>
            </assert_contents>
        </output>
    </test>
    <test>
        <param name="input_anndata" value="pbmc3k_processed.h5ad"/>
        <param name="input_network_file" value="progeny_test_2.tsv"/>
        <param name="min_n" value="0"/>
        <param name="method" value="ulm"/>
        <param name="use_raw" value="false"/>
        <param name="write_activities_path" value="true"/>
        <param name="source" value="source"/>
        <param name="target" value="target"/>
        <param name="weight" value="weight"/>
        <output name="output_ad">
            <assert_contents>
                <has_h5_keys keys="obsm/ulm_estimate"/>
            </assert_contents>
        </output>
        <output name="output_table">
            <assert_contents>
                <has_n_columns n="5"/>
            </assert_contents>
        </output>
    </test>
    </tests>
    <help>
**What it does**

Usage
.....


**Description**

This tool extracts pathway activity inference using decoupler.

**Input** 

The input file should be an AnnData object in H5AD format. The tool accepts an H5AD file containing raw or normalized data.

The tool also takes network file containing a collection of pathways and their target genes, with weights for each interaction.
        Example:
        ```
                source    target    weight
            0    T1    G01    1.0
            1    T1    G02    1.0
            2    T1    G03    0.7
            3    T2    G04    1.0
            4    T2    G06    -0.5
        ```

You can also specify whether to use the raw data in the AnnData object instead of the X matrix using the "use_raw" parameter and Minimum of targets per source using "min_n".


**Output**

The tool outputs an AnnData object containing the scores in the "obs" field, and tab-separated text files containing the scores for each cell.

If the "write_activities_path" parameter is set to "true", the tool will write the modified AnnData object to an H5AD file. 
If the "write_inference" parameter is set to "true", the tool will output a tab-separated text file containing the scores for each cell.



    </help>
    <citations>
        <citation type="doi">10.1093/bioadv/vbac016 </citation>
    </citations>
</tool>