Repository 'seurat_plot'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/seurat_plot

Changeset 0:2622dd85416f (2024-09-11)
Next changeset 1:fee4b4eb0ef5 (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
plot.xml
b
diff -r 000000000000 -r 2622dd85416f macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Wed Sep 11 10:21:18 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="&apos;" />\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 2622dd85416f plot.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plot.xml Wed Sep 11 10:21:18 2024 +0000
[
b'@@ -0,0 +1,1263 @@\n+<tool id="seurat_plot" name="Seurat Visualize" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">\n+    <description>- Plot cells, features and dimensions</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+library(ggplot2)\n+\n+#if $method.method == \'VlnPlot\'\n+\n+plot<-VlnPlot(\n+    seurat_obj,\n+    features = c(unlist(strsplit(gsub(" ", "", \'$method.features\'), ","))),\n+    #if $method.idents != \'\'\n+    idents = \'$method.idents\',\n+    #end if\n+    sort = $method.sort,\n+    #if $method.adv.assay != \'\'\n+    assay = \'$method.adv.assay\',\n+    #end if\n+    #if $method.adv.layer != \'\'\n+    layer = \'$method.adv.layer\',\n+    #end if\n+    #if $method.plot.cols != \'\'\n+    cols = c(unlist(strsplit(gsub(" ", "", \'$method.plot.cols\'), ","))),\n+    #end if\n+    #if $method.plot.pt_size\n+    pt.size = $method.plot.pt_size,\n+    #end if\n+    alpha = $method.plot.alpha,\n+    #if $method.adv.group_by != \'\'\n+    group.by = \'$method.adv.group_by\',\n+    #end if\n+    #if $method.adv.split_by != \'\'\n+    split.by = \'$method.adv.split_by\',\n+    #end if\n+    adjust = $method.plot.adjust,\n+    #if $method.plot.y_max\n+    y.max = $method.plot.y_max,\n+    #end if\n+    same.y.lims = $method.plot.same_y_lims,\n+    log = $method.plot.log,\n+    #if $method.plot.ncol != \'\'\n+    ncol = $method.plot.ncol,\n+    #end if\n+    split.plot = $method.adv.split_plot,\n+    stack = $method.adv.stack,\n+    fill.by = \'$method.plot.fill_by\',\n+    flip = $method.plot.flip,\n+    add.noise = $method.plot.add_noise,\n+    combine = TRUE\n+)\n+\n+#else if $method.method == \'FeatureScatter\'\n+\n+    #if $method.adv.cells\n+    cells_list<-paste(readLines(\'$method.adv.cells\'), collapse=",")\n+    #end if\n+\n+plot<-FeatureScatter(\n+    seurat_obj,\n+    feature1 = \'$method.feature1\',\n+    feature2 = \'$method.feature2\',\n+    #if $method.adv.cells\n+    cells = c(unlist(strsplit(cells_list, ","))),\n+    #end if\n+    shuffle = $method.plot.shuffle.shuffle,\n+    #if $method.plot.shuffle.shuffle == \'TRUE\'\n+    seed = $method.plot.shuffle.seed,\n+    #end if\n+    #if $method.adv.group_by != \'\'\n+    group.by = \'$method.adv.group_by\',\n+    #end if\n+    #if $method.adv.split_by != \'\'\n+    split.by = \'$method.adv.split_by\',\n+    #end if\n+    #if $method.plot.cols != \'\'\n+    cols = c(unlist(strsplit(gsub(" ", "", \'$method.plot.cols\'), ","))),\n+    #end if\n+    #if $method.plot.pt_size\n+    pt.size = $method.plot.pt_size,\n+    #end if\n+    #if $method.adv.span != \'\'\n+    span = \'$method.adv.span\',\n+    #end if\n+    smooth = $method.plot.smooth,\n+    slot = \'$method.adv.slot\',\n+    plot.cor = $method.plot.plot_cor,\n+    log = $method.plot.log,\n+    #if $method.plot.ncol\n+    ncol = $method.plot.ncol,\n+    #end if\n+    raster = $method.plot.raster.raster,\n+    #if $method.plot.raster.raster == \'TRUE\'\n+    raster.dpi = c($method.plot.raster.raster_x, $method.plot.raster.raster_y),\n+    #end if\n+    jitter = $method.plot.jitter,\n+    combine = TRUE\n+)\n+\n+#else if $method.method == \'CellScatter\'\n+\n+    #if $method.features\n+    features_list<-paste(readLines(\'$method.features\'), collapse=",")\n+    #end if\n+\n+plot<-CellScatter(\n+    seurat_obj,\n+    cell1 = \'$method.cell1\',\n+    cell2 = \'$method.cell2\',\n+    #if $method.features\n+    features = c(unlist(strsplit(features_list, ","))),\n+    #end if\n+    #if $method.highlight != \'\'\n+    highlight = c(unlist(strsplit(gsub(" ", "", \'$method.highlight\'), ","))),\n+    #end if\n+    #if $method.plot.cols != \'\'\n+    cols = c(unlist(strsplit(gsub(" ", "", \'$method.plot.cols\'), ","))),\n+    #end if\n+    #if $method.plot.pt_size\n+    pt.size = $method.plot.pt_size,\n+    #end if\n+    smooth = $method.plot.smooth,\n+    raster = $method.plot.raster.raster,\n+    #'..b'        <has_text_matching expression="DotPlot"/>\n+                </assert_contents>\n+            </output>\n+            <output name="plot_out_png" location="https://zenodo.org/records/13732784/files/DotPlot.png" ftype="png" compare="image_diff"/>\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+You can choose which type of file you want to produce, but be aware that some types (e.g. tex) may not be viewable on Galaxy, although you will be able to download them to use elsewhere.\n+\n+VlnPlot\n+=======\n+\n+Draw a violin plot of single cell data (gene expression, metrics, PC scores, etc.)\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/vlnplot>`__\n+\n+FeatureScatter\n+==============\n+\n+Create a scatter plot of two features (typically feature expression), across a set of single cells. Cells are colored by their identity class. \n+Pearson correlation between the two features is displayed above the plot.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/featurescatter>`__\n+\n+CellScatter\n+===========\n+\n+Creates a plot of scatter plot of features across two single cells. Pearson correlation between the two cells is displayed above the plot.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/cellscatter>`__\n+\n+VariableFeaturePlot\n+===================\n+\n+View selected variable features on a plot of variances.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/variablefeatureplot>`__\n+\n+VizDimLoadings\n+==============\n+\n+Visualize top genes associated with reduction components - default reduction is PCA.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/vizdimloadings>`__\n+\n+DimPlot\n+=======\n+\n+Graph the output of a dimensional reduction technique on a 2D scatter plot where each point is a cell and it\'s positioned based on the cell embeddings determined by the reduction technique. \n+By default, cells are colored by their identity class (can be changed with the group.by parameter).\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/dimplot>`__\n+\n+DimHeatmap\n+==========\n+\n+Draw a heatmap focusing on a principal component. Both cells and genes are sorted by their principal component scores. \n+Allows for nice visualization of sources of heterogeneity in the dataset.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/dimheatmap>`__\n+\n+ElbowPlot\n+=========\n+\n+Plot the standard deviations of the principal components for easy identification of an elbow in the graph - plots PCA as default reduction. \n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/elbowplot>`__\n+\n+FeaturePlot\n+===========\n+\n+Color single cells on a dimensional reduction plot according to a \'feature\' (i.e. gene expression, PC scores, number of genes detected, etc.)\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/featureplot>`__\n+\n+DoHeatmap\n+=========\n+\n+Draw a heatmap of single cell feature expression.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/doheatmap>`__\n+\n+DotPlot\n+=======\n+\n+Visualize how feature expression changes across different identity classes (e.g. clusters). \n+The size of the dot encodes the percentage of cells within a class that express the gene, while the color encodes the AverageExpression level across all cells within a class.\n+\n+More details on the `seurat documentation\n+<https://satijalab.org/seurat/reference/dotplot>`__\n+\n+    ]]></help>\n+    <expand macro="citations"/>\n+</tool>\n\\ No newline at end of file\n'