view inspect_and_manipulate.xml @ 1:4ec52a83ec82 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seurat_v5 commit 566984b588e88225f0b3f2dae88c6fd084315e7c
author iuc
date Tue, 05 Nov 2024 11:55:01 +0000
parents 50c5abeb08ba
children
line wrap: on
line source

<tool id="seurat_data" name="Seurat Data Management" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>- Inspect and Manipulate </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="version_command"/>
    <command detect_errors="exit_code"><![CDATA[
@CMD@
    ]]></command>
    <configfiles>
        <configfile name="script_file"><![CDATA[
@CMD_imports@
@CMD_read_inputs@

#if $method.method == 'Inspect'
    #if $method.inspect.inspect == 'General'
        sink('inspect.txt')
        seurat_obj
        sink()

    #else if $method.inspect.inspect == 'Features'
        inspect<-Features(seurat_obj[['$method.inspect.assay']])
        row.names = FALSE
        col.names = FALSE
        @CMD_inspect_rds_outputs@

    #else if $method.inspect.inspect == 'Cells'
        inspect<-Cells(
            seurat_obj,
            #if $method.layer != ''
            layer = $method.layer
            #end if
        )
        row.names = FALSE
        col.names = FALSE
        @CMD_inspect_rds_outputs@

    #else if $method.inspect.inspect == 'Idents'
        inspect<-Idents(seurat_obj)
        row.names = TRUE
        col.names = FALSE
        @CMD_inspect_rds_outputs@

    #else if $method.inspect.inspect == 'Metadata'
        #if $method.inspect.view_metadata != ''
        inspect<-seurat_obj[['$method.inspect.view_metadata']]
        #else
        inspect<-seurat_obj[[]]
        #end if
        row.names = TRUE
        col.names = TRUE
        @CMD_inspect_rds_outputs@

    #else if $method.inspect.inspect == 'Matrix'
        inspect<-LayerData(
            seurat_obj,
            assay='$method.inspect.assay',
            layer='$method.inspect.layer'
            )
        row.names = TRUE
        col.names = TRUE
        @CMD_inspect_rds_outputs@

    #end if

#else if $method.method == 'Manipulate'
    #if $method.manipulate.manipulate == 'Change_Idents'
        Idents(seurat_obj)<- '$method.manipulate.change'

    #else if $method.manipulate.manipulate == 'Rename_Idents'
        #if $method.manipulate.stash_idents.stash_idents == 'true'
            seurat_obj[['$method.manipulate.stash_idents.old_ident']]<-Idents(seurat_obj)
        #end if
        #if $method.manipulate.rename.rename_all == 'true'
            new_names = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.rename.new_names'), ",")))
            names(new_names)<-levels(seurat_obj)
            seurat_obj<-RenameIdents(
                seurat_obj,
                new_names
            )
        #else if $method.manipulate.rename.rename_all == 'false'
            seurat_obj<-RenameIdents(
                seurat_obj,
                '$method.manipulate.rename.old_name' = '$method.manipulate.rename.new_name'
            )
        #end if

    #else if $method.manipulate.manipulate == 'Add_Metadata'
        meta_data<-read.table(
            "$method.manipulate.metadata",
            header = TRUE,
            row.names = 1,
            sep = "\t"
        )
        seurat_obj<-AddMetaData(
            seurat_obj,
            metadata = meta_data,
        )

    #else if $method.manipulate.manipulate == 'Merge'
        y = list()
        #for $file in $method.manipulate.add_seurat
            y<-append(y, readRDS('${file}'))
        #end for
        seurat_obj<-merge(x = seurat_obj, y)

        #if $method.manipulate.join.join == 'true'
            seurat_obj[['$method.manipulate.join.assay']]<-JoinLayers(
                seurat_obj[['$method.manipulate.join.assay']]
            )
        #end if

    #else if $method.manipulate.manipulate == 'Subset_Ident'
        seurat_obj<-subset(
            seurat_obj,
            idents = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.idents'), ","))),
         )

    #else if $method.manipulate.manipulate == 'Subset_Group'
        seurat_obj<-subset(
            seurat_obj,
            subset = $method.manipulate.grouping == '$method.manipulate.groups',
        )

    #else if $method.manipulate.manipulate == 'DietSeurat'

        #if $method.manipulate.features
        features_list<-paste(readLines('$method.manipulate.features'), collapse=",")
        #end if

        seurat_obj<-DietSeurat(
            seurat_obj,
            #if $method.manipulate.layers != ''
            layers = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.layers'), ","))),
            #else if $method.manipulate.features
            features = c(unlist(strsplit(features_list, ","))),
            #else if $method.manipulate.assays != ''
            assays = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.assays'), ","))),
            #else if $method.manipulate.dimreducs != ''
            dimreducs = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.dimreducs'), ","))),
            #else if $method.manipulate.graphs != ''
            graphs = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.graphs'), ","))),
            #else if $method.manipulate.features != ''
            misc = $method.manipulate.misc
            #end if
        )

    #else if $method.manipulate.manipulate == 'AggregateExpression'

        #if $method.manipulate.features
        features_list<-paste(readLines('$method.manipulate.features'), collapse=",")
        #end if

        seurat_obj<-AggregateExpression(
            seurat_obj,
            group.by = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.group_by'), ","))),
            #if $method.assays != ''
            assays = c(unlist(strsplit(gsub(" ", "", '$method.manipulate.assays'), ","))),
            #end if
            #if $method.manipulate.features
            features = c(unlist(strsplit(features_list, ","))),
            #end if
            normalization.method = '$method.manipulate.normalization_method.normalization_method',
            #if $method.manipulate.normalization_method.normalization_method == 'CLR'
            margin = $method.manipulate.normalization_method.margin,
            #end if
            scale.factor = $method.manipulate.scale_factor,
            #if $method.manipulate.block_size
            block.size = $method.manipulate.block_size,
            #end if
            return.seurat = TRUE
        )

    #else if $method.manipulate.manipulate == 'DefaultAssay'
        DefaultAssay(object = seurat_obj)<-'$method.manipulate.default_assay'

    #end if

#end if

@CMD_rds_write_outputs@

]]></configfile>
    </configfiles>
    <inputs>
        <expand macro="input_rds"/>
        <conditional name="method">
            <param name="method" type="select" label="Method used">
                <option value="Inspect">Inspect Seurat Object</option>
                <option value="Manipulate">Manipulate Seurat Object</option>
            </param>
            <when value="Inspect">
                <conditional name="inspect">
                    <param name="inspect" type="select" label="Display information about">
                        <option value="General">General</option>
                        <option value="Features">Features</option>
                        <option value="Cells">Cells</option>
                        <option value="Idents">Cell Identities</option>
                        <option value="Metadata">Cell Metadata</option>
                        <option value="Matrix">Matrix</option>
                    </param>
                    <when value="General">
                    </when>
                    <when value="Features">
                        <param name="assay" type="text" value="RNA" label="Assay to display features for">
                            <expand macro="valid_name"/>
                        </param>
                    </when>
                    <when value="Cells">
                        <expand macro="select_layer"/>
                    </when>
                    <when value="Idents">
                    </when>
                    <when value="Metadata">
                        <param name="view_metadata" type="text" optional="true" value="" label="Metadata to view" help="leave blank to view all metadata"/>
                    </when>
                    <when value="Matrix">
                        <param name="assay" type="text" value="RNA" label="Assay to display matrix for">
                            <expand macro="valid_name"/>
                        </param>
                        <param name="layer" type="text" value="data" label="Layer to display matrix for">
                            <expand macro="valid_name"/>
                        </param>
                    </when>
                </conditional>
            </when>
            <when value="Manipulate">
                <conditional name="manipulate">
                    <param name="manipulate" type="select" label="Manipulation to perform">
                        <option value="Change_Idents">Change annotation used as idents</option>
                        <option value="Rename_Idents">Rename idents</option>
                        <option value="Add_Metadata">Add metadata</option>
                        <option value="Merge">Merge Seurat Objects</option>
                        <option value="Subset_Ident">Subset by Ident</option>
                        <option value="Subset_Group">Subset by Group</option>
                        <option value="DietSeurat">Choose elements to keep with 'DietSeurat'</option>
                        <option value="AggregateExpression">Pseudobulk cells with 'AggregateExpression'</option>
                        <option value="DefaultAssay">Set default assay</option>
                    </param>
                    <when value="Change_Idents">
                        <param name="change" type="text" value="" label="New annotation to use as ident"/>
                    </when>
                    <when value="Rename_Idents">
                        <conditional name="rename">
                            <param name="rename_all" type="select" label="Rename all idents">
                                <option value="true" selected="true">Yes</option>
                                <option value="false">No - just rename one ident</option>
                            </param>
                            <when value="true">
                                <param name="new_names" type="text" value="" label="New names" help="comma-separated list, must be same as number of idents">
                                    <expand macro="valid_list"/>
                                </param>
                            </when>
                            <when value="false">
                                <param name="old_name" type="text" value="" label="Name of ident to change"/>
                                <param name="new_name" type="text" value="" label="New name for ident">
                                    <expand macro="valid_name"/>
                                </param>
                            </when>
                        </conditional>
                        <conditional name="stash_idents">
                            <param name="stash_idents" type="select" label="Save copy of old idents first">
                                <option value="false" selected="true">No</option>
                                <option value="true">Yes</option>
                            </param>
                            <when value="false">
                            </when>
                            <when value="true">
                                <param name="old_ident" type="text" value="old.ident" label="Name to store old idents under"/>
                            </when>
                        </conditional>
                    </when>
                    <when value="Add_Metadata">
                        <param name="metadata" type="data" format="tabular,tsv" label="Cell metadata to add" help="table with cell names in first column"/>
                    </when>
                    <when value="Merge">
                        <param name="add_seurat" type="data" format="rds" multiple="true" label="Seurat object to merge"/>
                        <conditional name="join">
                            <param name="join" type="select" label="Join layers after merging">
                                <option value="false" selected="true">No</option>
                                <option value="true">Yes</option>
                            </param>
                            <when value="false">
                            </when>
                            <when value="true">
                                <param argument="assay" type="text" value="RNA" label="Name of assay to join">
                                    <expand macro="valid_name"/>
                                </param>
                            </when>
                        </conditional>
                    </when>
                    <when value="Subset_Ident">
                        <param name="idents" type="text" value="" label="Idents to keep" help="comma-separated list of clusters or idents">
                            <expand macro="valid_list"/>
                        </param>
                    </when>
                    <when value="Subset_Group">
                        <param name="grouping" type="text" value="" label="Grouping to use to select cells" help="from the object metadata e.g. batch, donor"/>
                        <param name="groups" type="text" value="" label="Group to keep" help="enter a single category from the grouping"/>
                    </when>
                    <when value="DietSeurat">
                        <param argument="layers" type="text" value="counts" label="Layers to keep" help="comma-separated list">
                            <expand macro="valid_list"/>
                        </param>
                        <param argument="assays" type="text" value="RNA" label="Assays to keep" help="comma-separated list">
                            <expand macro="valid_list"/>
                        </param>
                        <param argument="features" type="data" format="txt,tabular" optional="true" label="List of features to keep" help="text file with one feature on each line, leave blank to keep all"/>
                        <param argument="dimreducs" type="text" optional="true" value="" label="Dimensional Reductions to keep" help="comma-separated list, leave blank to remove all">
                            <expand macro="valid_list"/>
                        </param>
                        <param argument="graphs" type="text" optional="true" value="" label="Graphs to keep" help="comma-separated list, leave blank to remove all">
                            <expand macro="valid_list"/>
                        </param>
                        <param argument="misc" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Keep misc slot"/>
                    </when>
                    <when value="AggregateExpression">
                        <param name="group_by" type="text" value="ident" label="Aggregate expression for these categories" help="comma-separated list of group/condition names (group.by)"/>
                        <param argument="assays" type="text" optional="true" value="" label="Assays to use" help="comma-separated list, leave blank to use all assays">
                            <expand macro="valid_list"/>
                        </param>
                        <param argument="features" type="data" format="txt,tabular" optional="true" label="Features to use" help="text file with one feature on each line, leave blank to use all features"/>
                        <expand macro="normalize"/>
                    </when>
                    <when value="DefaultAssay">
                        <param name="default_assay" type="text" value="RNA" label="Assay to use as default">
                            <expand macro="valid_name"/>
                        </param>
                    </when>
                </conditional>
            </when>
        </conditional>
        <expand macro="inputs_common_advanced"/>
    </inputs>
    <outputs>
        <expand macro="seurat_outputs"/>
        <expand macro="inspect_out"/>
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <!-- test1:  Inspect General-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/integrated_umap.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="General"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="seurat_obj"/>
                </assert_contents>
            </output>
            <output name="inspect_general" location="https://zenodo.org/records/13732784/files/inspect.txt" ftype="txt">
                <assert_contents>
                    <has_text_matching expression="An object of class Seurat"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test2:  Inspect Cells-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/rawdata.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="Cells"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="Cells"/>
                </assert_contents>
            </output>
            <output name="inspect_tabular" location="https://zenodo.org/records/13732784/files/inspect_cells.tabular" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="1"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test3:  Inspect Features-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/citeseq.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="Features"/>
                    <param name="assay" value="ADT"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="Features"/>
                </assert_contents>
            </output>
            <output name="inspect_tabular" location="https://zenodo.org/records/13732784/files/inspect_features.tabular" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="1"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test4:  Inspect Metadata-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/added_metadata.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="Metadata"/>
                    <param name="view_metadata" value="Group"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="seurat_obj"/>
                </assert_contents>
            </output>
            <output name="inspect_tabular" location="https://zenodo.org/records/13732784/files/inspect_metadata_group.tabular" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="1"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test5:  Inspect Idents-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/renamed_clusters.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="Idents"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="Idents"/>
                </assert_contents>
            </output>
            <output name="inspect_tabular" location="https://zenodo.org/records/13732784/files/inspect_idents.tabular" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="2"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test6:  Inspect Matrix-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
            <conditional name="method">
                <param name="method" value="Inspect"/>
                <conditional name="inspect">
                    <param name="inspect" value="Matrix"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="seurat_obj"/>
                </assert_contents>
            </output>
            <output name="inspect_tabular" location="https://zenodo.org/records/13732784/files/inspect_matrix.tabular" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="249"/>
                </assert_contents>
            </output>
        </test>
        <test expect_num_outputs="2">
            <!-- test7:  Change Idents-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Change_Idents"/>
                    <param name="change" value="orig.idents"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="Idents"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/changed_idents.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test8:  Rename Idents-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Rename_Idents"/>
                    <conditional name="rename">
                        <param name="rename_all" value="true"/>
                        <param name="new_names" value="Cell A, Cell B, Cell C, Cell D"/>
                    </conditional>
                    <conditional name="stash_idents">
                        <param name="stash_idents" value="true"/>
                        <param name="old_ident" value="renamed"/>
                    </conditional>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="Idents"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/renamed_clusters.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test9:  Add Metadata-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/rawdata.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Add_Metadata"/>
                    <param name="metadata" location="https://zenodo.org/records/13732784/files/metadata.tsv"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="AddMetaData"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/added_metadata.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test10:  Merge-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/subset_Group_A.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Merge"/>
                    <param name="add_seurat" location="https://zenodo.org/records/13732784/files/subset_B16.rds,https://zenodo.org/records/13732784/files/subset_B8.rds"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="merge"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13736785/files/merged.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test11:  Subset Ident-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Subset_Ident"/>
                    <param name="idents" value="2, 3"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="subset"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/subset_cluster.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test12:  Subset Group-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/added_metadata.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="Subset_Group"/>
                    <param name="grouping" value="Group"/>
                    <param name="groups" value="Group_A"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="subset"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/subset_Group_A.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test13:  DietSeurat-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/integrated_umap.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="DietSeurat"/>
                    <param name="assays" value="ADT"/>
                    <param name="dimreducs" value="pca, umap"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="DietSeurat"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/diet_seurat.rds" ftype="rds"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test14:  AggregateExpression-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/integrated_umap.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="AggregateExpression"/>
                    <param name="group_by" value="Group"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="AggregateExpression"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/aggregated.rds" ftype="rds" compare="sim_size"/>
        </test>
        <test expect_num_outputs="2">
            <!-- test15:  Default Assay-->
            <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/citeseq.rds"/>
            <conditional name="method">
                <param name="method" value="Manipulate"/>
                <conditional name="manipulate">
                    <param name="manipulate" value="DefaultAssay"/>
                    <param name="default_assay" value="ADT"/>
                </conditional>
            </conditional>
            <section name="advanced_common">
                <param name="show_log" value="true"/>
            </section>
            <output name="hidden_output">
                <assert_contents>
                    <has_text_matching expression="DefaultAssay"/>
                </assert_contents>
            </output>
            <output name="rds_out" location="https://zenodo.org/records/13732784/files/default.rds" ftype="rds"/>
        </test>
    </tests>
    <help><![CDATA[
Seurat
======

Seurat is an R package designed for QC, analysis, and exploration of single-cell RNA-seq data.

Seurat aims to enable users to identify and interpret sources of heterogeneity from single-cell transcriptomic measurements, and to integrate diverse types of single-cell data.

Inspect and Manipulate
======================

A selection of essential functions to display information about a Seurat Object or make basic changes to the object.

More details on these essential commands can be found in the `seurat documentation
<https://satijalab.org/seurat/articles/essential_commands>`__

Inspect
=======

General - basic information about the Seurat Object
Features - list of features, select which assay to display features from if object contains multimodal data
Cells - list of cell barcodes/ids, select layer to display cells for if object contains multiple layers
Idents - list showing Ident for each cell
Metadata - table of cell metadata
Matrix - show the full matrix

Manipulate
==========

Functions to add, change, or remove selected elements of a Seurat Object.

Change Idents
=============

Change which annotation in your cell metadata is used as the Ident column.

Rename Idents
=============

Rename the classes in the Ident column (e.g. to replace cluster numbers with cell types).

You have the option to stash the original idents in a new column called 'old.ident' before renaming the classes in the Ident column.

AddMetaData
===========

Merge
=====

Combine two Seurat Objects into a single Seurat Object.
Each object will be placed in a separate layer, but you can choose to run the JoinLayers function after merging to combine the objects into a single layer.

Subset
======

Subset a group of cells based on their ident or another grouping in your cell metadata.

DietSeurat
==========

Keep only certain aspects of the Seurat object.
Can be useful in functions that utilize merge as it reduces the amount of data in the merge

More details on these essential commands can be found in the `seurat documentation
<https://satijalab.org/seurat/reference/dietseurat>`__

AggregateExpression
===================

Returns summed counts ("pseudobulk") for each identity class.

More details on the `seurat documentation
<https://satijalab.org/seurat/reference/aggregateexpression>`__


DefaultAssay
============

Set the default assay for multimodal data.

You can use the Inspect - General function to check which assay is currently active and which other assays are available.

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