Next changeset 1:6bccf5f85f92 (2024-11-05) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seurat_v5 commit a9214c07b0cc929a51fd92a369bb89c675b6c88d |
added:
macros.xml normalize_select_features_scale.xml |
b |
diff -r 000000000000 -r c3170652bd98 macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Sep 11 10:20:38 2024 +0000 |
[ |
b'@@ -0,0 +1,437 @@\n+<macros>\n+ <token name="@TOOL_VERSION@">5.0</token>\n+ <token name="@VERSION_SUFFIX@">0</token>\n+ <token name="@PROFILE@">23.0</token>\n+ <xml name="requirements">\n+ <requirements>\n+ <requirement type="package" version="@TOOL_VERSION@">r-seurat</requirement>\n+ <requirement type="package" version="1.2.1">fit-sne</requirement>\n+ <requirement type="package" version="3.58.1">bioconductor-limma</requirement>\n+ <requirement type="package" version="1.28.0">bioconductor-mast</requirement>\n+ <requirement type="package" version="1.42.0">bioconductor-deseq2</requirement>\n+ <requirement type="package" version="2.1.3">r-svglite</requirement>\n+ <requirement type="package" version="1.1">r-metap</requirement>\n+ <requirement type="package" version="1.14.0">bioconductor-glmGamPoi</requirement>\n+ <requirement type="package" version="0.5.3">umap-learn</requirement> <!-- https://github.com/satijalab/seurat/issues/8283 -->\n+ <requirement type="package" version="0.10.2">leidenalg</requirement>\n+ <requirement type="package" version="1.2.0">r-harmony</requirement>\n+ <requirement type="package" version="1.18.0">bioconductor-batchelor</requirement>\n+ <requirement type="package" version="2.0.0">numpy</requirement>\n+ <requirement type="package" version="2.2.2">pandas</requirement>\n+ </requirements>\n+ </xml>\n+ <xml name="citations">\n+ <citations>\n+ <citation type="doi">10.1038/s41587-023-01767-y</citation>\n+ </citations>\n+ </xml>\n+ <xml name="sanitize_query" token_validinitial="string.printable">\n+ <sanitizer>\n+ <valid initial="@VALIDINITIAL@">\n+ <remove value="'" />\n+ </valid>\n+ </sanitizer>\n+ </xml>\n+ <xml name="sanitize_vectors" token_validinitial="string.digits">\n+ <sanitizer>\n+ <valid initial="@VALIDINITIAL@">\n+ <add value=","/>\n+ </valid>\n+ </sanitizer>\n+ </xml>\n+ <xml name="version_command">\n+ <version_command><![CDATA[\n+echo $(R --version | grep version | grep -v GNU)", Seurat version" $(R --vanilla --slave -e "library(Seurat); cat(sessionInfo()\\$otherPkgs\\$DESeq2\\$Version)" 2> /dev/null | grep -v -i "WARNING: ")\n+ ]]></version_command>\n+ </xml>\n+\n+ <token name="@CMD_imports@"><![CDATA[\n+library(Seurat)\n+ ]]>\n+ </token>\n+ <token name="@reticulate_hack@"><![CDATA[\n+library(reticulate)\n+## HACK: CI biocontainers do not contain a useable conda binary, just the env.\n+## see: https://github.com/galaxyproject/tools-iuc/issues/5585#issuecomment-1803773923\n+is_biocontainer = grepl("^# cmd: /opt/conda/bin/",\n+ paste0(reticulate:::python_info_condaenv_find("/usr/local/"),\n+ "-none"))\n+if (is_biocontainer) {\n+ ## conda detection false positive\n+ assignInNamespace("is_conda_python", function(x) FALSE, ns="reticulate")\n+ use_python("/usr/local/bin/python")\n+} else {\n+ conda_path = Sys.getenv("CONDA_PREFIX")\n+ if (conda_path != "") {\n+ ## Active conda env found\n+ use_python(file.path(conda_path, "bin", "python3"))\n+ } else {\n+ ## Not biocontainer or conda, assume system python\n+ use_python("/usr/bin/python3")\n+ }\n+}]]>\n+ </token>\n+ <xml name="input_rds">\n+ <param name="seurat_rds" type="data" format="rds" label="Input file with the Seurat object"/>\n+ </xml>\n+ <token name="@CMD_read_inputs@"><![CDATA[\n+seurat_obj = readRDS(\'seurat.rds\')\n+ ]]>\n+ </token>\n+ <token name="@CMD_read_expression_matrix@"><![CDATA[\n+counts<-read.table("matrix.tab", header=TRUE, row.names=1, sep="\\t")\n+ ]]>]\n+ </token>\n+ <token name="@CMD@"><![CDATA[\n+cp \'$seurat_rds\' seurat.rds &&\n+cat \'$script_file\' > $hidden_output &&\n+Rscript \'$script_file\' >> $hidden_output\n+ ]]>\n+ </token>\n+ '..b'le"/>\n+ </xml>\n+ <xml name="plot_2_dims">\n+ <param name="dims_1" type="integer" value="1" label="Dimension to plot on x axis"/>\n+ <param name="dims_2" type="integer" value="2" label="Dimension to plot on y axis"/>\n+ </xml>\n+ <xml name="plot_projected_and_balanced">\n+ <param argument="projected" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Use reduction values for full dataset" help="i.e. projected dimensional reduction values"/>\n+ <param argument="balanced" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Return an equal number of genes with + and - scores"/>\n+ </xml>\n+ <xml name="plot_disp_min_max">\n+ <param name="disp_min" type="float" optional="true" value="-2.5" label="Minimum display value" help="all values below are clipped (disp.min)"/>\n+ <param name="disp_max" type="float" optional="true" value="" label="Maximum display value" help="all values above are clipped. Defaults to 2.5 if slot is scale.data, otherwise defaults to 6 (disp.max)"/>\n+ </xml>\n+ <xml name="plot_shuffle_and_seed">\n+ <conditional name="shuffle">\n+ <param argument="shuffle" type="select" label="Randomly shuffle order of points" help="can help with crowded plots if points of interest are hidden">\n+ <option value="TRUE">Yes</option>\n+ <option value="FALSE" selected="true">No</option>\n+ </param>\n+ <when value="TRUE">\n+ <param argument="seed" type="integer" value="1" label="Set random seed for shuffling"/>\n+ </when>\n+ <when value="FALSE"></when>\n+ </conditional>\n+ </xml>\n+ <xml name="plot_order">\n+ <param argument="order" type="text" optional="true" value="" label="Specify the order of plotting for the idents" help="a full comma-separated list or the ident to be plotted last on the top">\n+ <expand macro="valid_list"/>\n+ </param>\n+ </xml>\n+ <xml name="plot_group_by">\n+ <param name="group_by" type="text" optional="true" value="" label="Factor to group cells by" help="(group.by)"/>\n+ </xml>\n+ <xml name="plot_split_by">\n+ <param name="split_by" type="text" optional="true" value="" label="Factor or identity to split the plot by" help="(split.by)"/>\n+ </xml>\n+ <xml name="plot_alpha">\n+ <param argument="alpha" type="integer" value="1" label="Alpha value for points"/>\n+ </xml>\n+ <xml name="plot_pt_size">\n+ <param name="pt_size" type="float" optional="true" value="" label="Point size for plot" help="(pt.size)"/>\n+ </xml>\n+ <xml name="plot_smooth">\n+ <param argument="smooth" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Smooth the graph"/>\n+ </xml>\n+ <xml name="plot_ncol">\n+ <param argument="ncol" type="integer" optional="true" value="" label="Number of columns to display"/>\n+ </xml>\n+ <xml name="raster_select">\n+ <conditional name="raster">\n+ <param argument="raster" type="select" label="Convert points to raster format" help="NULL will automatically use raster if more than 100,000 points plotted">\n+ <option value="NULL" selected="true">NULL</option>\n+ <option value="TRUE">TRUE</option>\n+ <option value="FALSE">FALSE</option>\n+ </param>\n+ <when value="NULL"></when>\n+ <when value="TRUE">\n+ <param name="raster_x" type="integer" value="512" label="Horizontal length of raster plot (pixels)"/>\n+ <param name="raster_y" type="integer" value="512" label="Vertical height of raster plot (pixels)"/>\n+ </when>\n+ <when value="FALSE"></when>\n+ </conditional>\n+ </xml>\n+ <xml name="raster_boolean">\n+ <param argument="raster" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Convert to raster format"/>\n+ </xml>\n+</macros>\n' |
b |
diff -r 000000000000 -r c3170652bd98 normalize_select_features_scale.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/normalize_select_features_scale.xml Wed Sep 11 10:20:38 2024 +0000 |
[ |
b'@@ -0,0 +1,466 @@\n+<tool id="seurat_preprocessing" name="Seurat Preprocessing" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n+ <description>- Normalize, Find Variable Features, Scale and Regress</description>\n+ <macros>\n+ <import>macros.xml</import>\n+ </macros>\n+ <expand macro="requirements"/>\n+ <expand macro="version_command"/>\n+ <command detect_errors="exit_code"><![CDATA[\n+@CMD@\n+ ]]></command>\n+ <configfiles>\n+ <configfile name="script_file"><![CDATA[\n+@CMD_imports@\n+@CMD_read_inputs@\n+\n+#if $method.method == \'NormalizeData\'\n+seurat_obj<-NormalizeData(\n+ seurat_obj,\n+ #if $method.assay != \'\'\n+ assay = \'$method.assay\',\n+ #end if\n+ normalization.method = \'$method.normalization_method.normalization_method\',\n+ #if $method.normalization_method.normalization_method == \'CLR\'\n+ margin = $method.normalization_method.margin,\n+ #end if\n+ scale.factor = $method.scale_factor,\n+ #if $method.block_size\n+ block.size = $method.block_size\n+ #end if\n+)\n+\n+#else if $method.method == \'FindVariableFeatures\'\n+seurat_obj<-FindVariableFeatures(\n+ seurat_obj,\n+ #if $method.assay != \'\'\n+ assay = \'$method.assay\',\n+ #end if\n+ selection.method = \'$method.selection_method.selection_method\',\n+ #if $method.selection_method.selection_method == \'vst\'\n+ loess.span = $method.selection_method.loess_span,\n+ #if $method.selection_method.clip_max\n+ clip.max = $method.selection_method.clip_max,\n+ #end if\n+ #if $method.selection_method.nfeatures\n+ nfeatures = $method.selection_method.nfeatures,\n+ #end if\n+ #else if $method.selection_method.selection_method == \'dispersion\'\n+ #if $method.selection_method.nfeatures\n+ nfeatures = $method.selection_method.nfeatures,\n+ #end if\n+ #end if\n+ num.bin = $method.num_bin,\n+ binning.method = \'$method.binning_method\'\n+)\n+\n+ #if $method.output_topN.output_topN == \'true\'\n+ N = $method.output_topN.topN\n+ top_N<-head(VariableFeatures(seurat_obj), N)\n+ @CMD_write_variable_tab@\n+ #end if\n+\n+#else if $method.method == \'ScaleData\'\n+\n+ #if $method.scale_features.scale_features == \'list_genes\'\n+ features_list<-paste(readLines(\'$method.scale_features.features_to_scale\'), collapse=",")\n+ #else if $method.scale_features.scale_features == \'all_genes\'\n+ all.genes<-rownames(seurat_obj)\n+ #end if\n+\n+seurat_obj<-ScaleData(\n+ seurat_obj,\n+ #if $method.scale_features.scale_features == \'all_genes\'\n+ features = all.genes,\n+ #else if $method.scale_features.scale_features == \'list_genes\'\n+ features = c(unlist(strsplit(features_list, ","))),\n+ #end if\n+ #if $method.assay != \'\'\n+ assay = \'$method.assay\',\n+ #end if\n+ #if $method.regress.regress == \'true\'\n+ vars.to.regress = c(unlist(strsplit(gsub(" ", "", \'$method.regress.vars_to_regress\'), ","))),\n+ model.use = \'$method.regress.model_use\',\n+ use.umi = $method.regress.use_umi,\n+ #end if\n+ #if $method.split_by != \'\'\n+ split.by = \'$method.split_by\',\n+ #end if\n+ do.scale = $method.do_scale,\n+ do.center = $method.do_center,\n+ #if $method.do_scale == \'true\'\n+ scale.max = $method.scale_max,\n+ block.size = $method.block_size,\n+ min.cells.to.block = $method.min_cells_to_block\n+ #end if\n+)\n+\n+#else if $method.method == \'SCTransform\'\n+\n+ #if $method.residual_features.residual_features_options == \'selected_features\'\n+ features_list<-paste(readLines(\'$method.residual_features.residual_features\'), collapse=",")\n+ #end if\n+\n+seurat_obj<-SCTransform(\n+ seurat_obj,\n+ #if $method.assay != \'\'\n+ assay = \'$method.assay\',\n+ #end if\n+ new.assay.name = \'$method.new_assay_name\',\n+ #if $method.residual_features.residual_features_options == \'NULL\'\n+ #if $method.residual_features.variable_features.variable_features == \'set_number\'\n+ variable.features.n = $method.residual_features.variable_features.vari'..b'/>\n+ <param name="vars_to_regress" value="percent.mt"/>\n+ <conditional name="residual_features">\n+ <param name="residual_features_options" value="selected_features"/>\n+ <param name="residual_features" location="https://zenodo.org/records/13741333/files/residual_features.txt"/>\n+ </conditional>\n+ </conditional>\n+ <section name="advanced_common">\n+ <param name="show_log" value="true"/>\n+ </section>\n+ <output name="hidden_output">\n+ <assert_contents>\n+ <has_text_matching expression="SCTransform"/>\n+ </assert_contents>\n+ </output>\n+ <output name="rds_out" location="https://zenodo.org/records/13732784/files/SCTransformed.rds" ftype="rds" compare="sim_size"/>\n+ </test>\n+ </tests>\n+ <help><![CDATA[\n+Seurat\n+======\n+\n+Seurat is an R package designed for QC, analysis, and exploration of single-cell RNA-seq data. \n+\n+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.\n+\n+NormalizeData\n+=============\n+\n+Normalize the count data present in a given assay.\n+\n+Methods:\n+\n+\xe2\x80\x9cLogNormalize\xe2\x80\x9d: Feature counts for each cell are divided by the total counts for that cell and multiplied by the scale.factor. This is then natural-log transformed using log1p\n+\n+\xe2\x80\x9cCLR\xe2\x80\x9d: Applies a centered log ratio transformation\n+\n+\xe2\x80\x9cRC\xe2\x80\x9d: Relative counts. Feature counts for each cell are divided by the total counts for that cell and multiplied by the scale.factor. No log-transformation is applied. For counts per million (CPM) set scale.factor = 1e6\n+\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/normalizedata>`__\n+\n+FindVariableFeatures\n+====================\n+\n+Identify features that are outliers on a \'mean variability plot\'.\n+\n+Methods:\n+\n+\xe2\x80\x9cvst\xe2\x80\x9d: First, fits a line to the relationship of log(variance) and log(mean) using local polynomial regression (loess). Then standardizes the feature values using the observed mean and expected variance (given by the fitted line). Feature variance is then calculated on the standardized values after clipping to a maximum (see clip.max parameter).\n+\n+\xe2\x80\x9cmean.var.plot\xe2\x80\x9d (mvp): First, uses a function to calculate average expression (mean.function, using FastExpMean) and dispersion (dispersion.function, using FastLogVMR) for each feature. Next, divides features into num.bin (deafult 20) bins based on their average expression, and calculates z-scores for dispersion within each bin. The purpose of this is to identify variable features while controlling for the strong relationship between variability and average expression\n+\n+\xe2\x80\x9cdispersion\xe2\x80\x9d (disp): selects the genes with the highest dispersion values\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/findvariablefeatures>`__\n+\n+Scale and regress the data with ScaleData\n+=========================================\n+\n+Scale and center features in the dataset. \n+\n+If variables are provided in vars.to.regress, they are individually regressed against each feature, and the resulting residuals are then scaled and centered.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/scaledata>`__\n+\n+SCTransform\n+===========\n+\n+Use this function as an alternative to the NormalizeData, FindVariableFeatures, ScaleData workflow. \n+\n+Results are saved in a new assay (named SCT by default) with counts being (corrected) counts, data being log1p(counts), scale.data being pearson residuals; sctransform::vst intermediate results are saved in misc slot of new assay.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/sctransform>`__\n+\n+ ]]></help>\n+ <expand macro="citations"/>\n+</tool>\n\\ No newline at end of file\n' |