Mercurial > repos > iuc > seurat_integrate
view integrate.xml @ 0:4341b8ff2a46 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seurat_v5 commit a9214c07b0cc929a51fd92a369bb89c675b6c88d
author | iuc |
---|---|
date | Wed, 11 Sep 2024 10:20:51 +0000 |
parents | |
children |
line wrap: on
line source
<tool id="seurat_integrate" name="Seurat Integrate" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description> and manipulate layers </description> <macros> <import>macros.xml</import> </macros> <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 == 'SplitLayers' seurat_obj[['$method.assay']]<-split( seurat_obj[['$method.assay']], f = seurat_obj[['$method.factor', drop = TRUE]] ) #else if $method.method == 'IntegrateLayers' #if $method.features features_list<-paste(readLines('$method.features'), collapse=",") #end if seurat_obj<-IntegrateLayers( seurat_obj, method = $method.integration.integration_method, #if $method.integration.integration_method == 'CCAIntegration' #if $method.integration.adv.k_filter k.filter = $method.integration.adv.k_filter, #else k.filter = NA, #end if dims = 1:$method.integration.adv.dims, #if $method.integration.adv.dims_to_integrate dims.to.integrate = $method.integration.adv.dims_to_integrate, #end if k.weight = $method.integration.adv.k_weight, #if $method.integration.adv.weight_reduction != '' weight.reduction = c(unlist(strsplit(gsub(" ", "", '$method.integration.adv.weight_reduction'), ","))), #end if sd.weight = $method.integration.adv.sd_weight, preserve.order = $method.integration.adv.preserve_order, #else if $method.integration.integration_method == 'HarmonyIntegration' npcs = $method.integration.adv.npcs, key = '$method.integration.adv.key', #if $method.integration.adv.theta theta = $method.integration.adv.theta, #end if #if $method.integration.adv.lambda lambda = $method.integration.adv.lambda, #end if sigma = $method.integration.adv.sigma, #if $method.integration.adv.nclust nclust = $method.integration.adv.nclust, #end if max_iter = $method.integration.adv.max_iter, #else if $method.integration.integration_method == 'JointPCAIntegration' k.anchor = $method.integration.adv.k_anchor, dims = 1:$method.integration.adv.dims, #if $method.integration.adv.dims_to_integrate dims.to.integrate = $method.integration.adv.dims_to_integrate, #end if k.weight = $method.integration.adv.k_weight, #if $method.integration.adv.weight_reduction != '' weight.reduction = c(unlist(strsplit(gsub(" ", "", '$method.integration.adv.weight_reduction'), ","))), #end if sd.weight = $method.integration.adv.sd_weight, preserve.order = $method.integration.adv.preserve_order, #else if $method.integration.integration_method == 'RPCAIntegration' #if $method.integration.adv.k_filter k.filter = $method.integration.adv.k_filter, #else k.filter = NA, #end if dims = 1:$method.integration.adv.dims, #if $method.integration.adv.dims_to_integrate dims.to.integrate = $method.integration.adv.dims_to_integrate, #end if k.weight = $method.integration.adv.k_weight, #if $method.integration.adv.weight_reduction != '' weight.reduction = c(unlist(strsplit(gsub(" ", "", '$method.integration.adv.weight_reduction'), ","))), #end if sd.weight = $method.integration.adv.sd_weight, preserve.order = $method.integration.adv.preserve_order, #end if orig.reduction = '$method.orig_reduction', new.reduction = '$method.new_reduction', #if $method.assay != '' assay = '$method.assay', #end if #if $method.features features = c(unlist(strsplit(features_list, ","))), #end if #if $method.layers != '' layers = c(unlist(strsplit(gsub(" ", "", '$method.layers'), ","))), #end if #if $method.scale_layers != '' scale_layers = c(unlist(strsplit(gsub(" ", "", '$method.scale_layers'), ","))), #end if #if $method.normalization_method == 'true' normalization.method = 'SCT' #end if ) #else if $method.method == 'JoinLayers' seurat_obj[['$method.assay']]<-JoinLayers( seurat_obj[['$method.assay']] ) #else if $method.method == 'PrepSCTFindMarkers' seurat_obj<-PrepSCTFindMarkers( seurat_obj, assay = '$method.assay' ) #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="SplitLayers">Split data into layers using 'split'</option> <option value="IntegrateLayers" selected="true">Apply integration methods with 'IntegrateLayers'</option> <option value="JoinLayers">Join layers with 'JoinLayers'</option> <option value="PrepSCTFindMarkers">Prepare to run DE on SCT Assay with 'PrepSCTFindMarkers'</option> </param> <when value="SplitLayers"> <param argument="assay" type="text" value="RNA" label="Name of assay to use"> <expand macro="valid_name"/> </param> <param name="factor" type="text" value="" label="Factor or group to use to split data" help="(f)"> <expand macro="valid_name"/> </param> </when> <when value="IntegrateLayers"> <conditional name="integration"> <param name="integration_method" type="select" label="Integration method to use" help="(method)"> <option value="CCAIntegration">CCA Integration</option> <option value="HarmonyIntegration">Harmony Integration</option> <option value="JointPCAIntegration">Joint PCA Integration</option> <option value="RPCAIntegration">RPCA Integration</option> </param> <when value="CCAIntegration"> <section name="adv" title="Advanced Options"> <param name="k_filter" type="integer" optional="true" value="" label="Number of anchors to filter" help="leave blank to use all (k.filter)"/> <expand macro="integration_inputs"/> </section> </when> <when value="HarmonyIntegration"> <section name="adv" title="Advanced Options"> <param argument="npcs" type="integer" optional="true" value="50" label="Number of PCs to compute if doing PCA on input matrix"/> <param argument="key" type="text" value="harmony_" label="Dimensional reduction key" help="specifies the string before the number for the dimension names (reduction.key)"> <expand macro="valid_reduction_key"/> </param> <param argument="theta" type="float" optional="true" value="" label="Diversity clustering penalty parameter"/> <param argument="lambda" type="float" optional="true" value="" label="Ridge regression penalty parameter"/> <param argument="sigma" type="float" value="0.1" label="Width of soft kmeans clusters"/> <param argument="nclust" type="integer" optional="true" value="" label="Number of clusters in model"/> <param argument="max_iter" type="integer" value="10" label="Maximum number of rounds to run Harmony"/> </section> </when> <when value="JointPCAIntegration"> <section name="adv" title="Advanced Options"> <param name="k_anchor" type="integer" value="20" label="How many neighbors (k) to use when picking anchors"/> <expand macro="integration_inputs"/> </section> </when> <when value="RPCAIntegration"> <section name="adv" title="Advanced Options"> <param name="k_filter" type="integer" optional="true" value="" label="Number of anchors to filter" help="leave blank to use all (k.filter)"/> <expand macro="integration_inputs"/> </section> </when> </conditional> <param name="orig_reduction" type="text" value="pca" label="Dimensional reduction to use for correction" help="(orig.reduction)"> <expand macro="valid_name"/> </param> <param name="new_reduction" type="text" value="integrated.dr" label="Name for new dimensional reduction" help="(new.reduction)"> <expand macro="valid_name"/> </param> <expand macro="select_assay"/> <param argument="features" type="data" format="txt,tabular" optional="true" label="List of features to use for integration" help="text file with one feature on each line"/> <param argument="layers" type="text" optional="true" value="" label="Names of normalized layer(s) in assay"> <expand macro="valid_list"/> </param> <param name="scale_layers" type="text" optional="true" value="" label="Names of scaled layer(s) in assay" help="(scale.layer)"> <expand macro="valid_list"/> </param> <param name="normalization_method" type="boolean" truevalue="true" falsevalue="false" label="Use SCT as Normalization Method" help="after using SCTransform (normalization.method)"/> </when> <when value="JoinLayers"> <param argument="assay" type="text" value="RNA" label="Name of assay to join"> <expand macro="valid_name"/> </param> </when> <when value="PrepSCTFindMarkers"> <param argument="assay" type="text" value="SCT" label="Name of Assay where SCT objects are stored"> <expand macro="valid_name"/> </param> </when> </conditional> <expand macro="inputs_common_advanced"/> </inputs> <outputs> <expand macro="seurat_outputs"/> </outputs> <tests> <test expect_num_outputs="2"> <!-- test1: SplitLayers --> <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/added_metadata.rds"/> <conditional name="method"> <param name="method" value="SplitLayers"/> <param name="assay" value="RNA"/> <param name="factor" value="Group"/> </conditional> <section name="advanced_common"> <param name="show_log" value="true"/> </section> <output name="hidden_output"> <assert_contents> <has_text_matching expression="split"/> </assert_contents> </output> <output name="rds_out" location="https://zenodo.org/records/13732784/files/splitdata.rds" ftype="rds"/> </test> <test expect_num_outputs="2"> <!-- test2: IntegrateLayers--> <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/unintegrated_umap.rds"/> <conditional name="method"> <param name="method" value="IntegrateLayers"/> <conditional name="integration"> <param name="integration_method" value="CCAIntegration"/> </conditional> <param name="orig_reduction" value="pca"/> <param name="new_reduction" value="integrated.cca"/> </conditional> <section name="advanced_common"> <param name="show_log" value="true"/> </section> <output name="hidden_output"> <assert_contents> <has_text_matching expression="IntegrateLayers"/> </assert_contents> </output> <output name="rds_out" location="https://zenodo.org/records/13732784/files/cca_integrated.rds" ftype="rds"/> </test> <test expect_num_outputs="2"> <!-- test3: IntegrateLayers - Harmony Installed--> <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/unintegrated_umap.rds"/> <conditional name="method"> <param name="method" value="IntegrateLayers"/> <conditional name="integration"> <param name="integration_method" value="HarmonyIntegration"/> </conditional> <param name="orig_reduction" value="pca"/> <param name="new_reduction" value="integrated.harm"/> </conditional> <section name="advanced_common"> <param name="show_log" value="true"/> </section> <output name="hidden_output"> <assert_contents> <has_text_matching expression="IntegrateLayers"/> </assert_contents> </output> <output name="rds_out" location="https://zenodo.org/records/13732784/files/harm_integrated.rds" ftype="rds" compare="sim_size"/> </test> <test expect_num_outputs="2"> <!-- test4: JoinLayers--> <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/integrated_umap.rds"/> <conditional name="method"> <param name="method" value="JoinLayers"/> </conditional> <section name="advanced_common"> <param name="show_log" value="true"/> </section> <output name="hidden_output"> <assert_contents> <has_text_matching expression="JoinLayers"/> </assert_contents> </output> <output name="rds_out" location="https://zenodo.org/records/13732784/files/joined.rds" ftype="rds"/> </test> <test expect_num_outputs="2"> <!-- test5: PrepSCTFindMarkers--> <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/SCT_integrated_umap.rds"/> <conditional name="method"> <param name="method" value="PrepSCTFindMarkers"/> </conditional> <section name="advanced_common"> <param name="show_log" value="true"/> </section> <output name="hidden_output"> <assert_contents> <has_text_matching expression="PrepSCTFindMarkers"/> </assert_contents> </output> <output name="rds_out" location="https://zenodo.org/records/13732784/files/PrepSCTFindMarkers.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. Split ===== The split function is used here to split the data into separate layers based on the groups defined by f. Each group becomes its own layer in the Seurat Object. More details on the `R documentation <https://rdrr.io/r/base/split.html>`__ Integrate ========= Multiple layers are integrated to enable them to be analysed together. Available methods are: CCA, Harmony, JointPCA, RPCA, FastMNN and scVI. More details on the `seurat documentation <https://satijalab.github.io/seurat-object/reference/CreateSeuratObject.html>`__ JoinLayers ========== Multiple layers (e.g. those created using the split function) can be joined together in a single layer. No integration is performed by this function. More details on the `seurat documentation <https://satijalab.github.io/seurat-object/reference/SplitLayers.html>`__ PrepSCTFindMarkers ================== Given a merged object with multiple SCT models, this function uses minimum of the median UMI (calculated using the raw UMI counts) of individual objects to reverse the individual SCT regression model using minimum of median UMI as the sequencing depth covariate. The counts slot of the SCT assay is replaced with recorrected counts and the data slot is replaced with log1p of recorrected counts. More details on the `seurat documentation <https://satijalab.org/seurat/reference/prepsctfindmarkers>`__ ]]></help> <expand macro="citations"/> </tool>