From 144e2727c5dfc248a6205dd0ee6da2d651025745 Mon Sep 17 00:00:00 2001 From: MicTott <32395683+MicTott@users.noreply.github.com> Date: Fri, 8 Nov 2024 20:50:45 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20MicTott/?= =?UTF-8?q?SpotSweeper@c8b76bcb108b910417f3150e3dc85529c0efda87=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 +- CODE_OF_CONDUCT.html | 4 +- CONTRIBUTING.html | 4 +- LICENSE-text.html | 4 +- LICENSE.html | 4 +- SUPPORT.html | 4 +- articles/getting_started.html | 135 +++++++++++-------------- articles/index.html | 4 +- authors.html | 4 +- index.html | 4 +- news/index.html | 9 +- pkgdown.js | 8 ++ pkgdown.yml | 4 +- reference/DLPFC_artifact.html | 4 +- reference/findArtifacts.html | 23 +++-- reference/index.html | 6 +- reference/localOutliers.html | 23 +++-- reference/localVariance.html | 22 ++-- reference/plotQCmetrics-1.png | Bin 0 -> 559774 bytes reference/plotQCmetrics.html | 183 ++++++++++++++++++++++++++++++++++ reference/plotQCpdf.html | 11 +- search.json | 2 +- sitemap.xml | 2 +- 23 files changed, 332 insertions(+), 136 deletions(-) create mode 100644 reference/plotQCmetrics-1.png create mode 100644 reference/plotQCmetrics.html diff --git a/404.html b/404.html index 3a278aa..78c18de 100644 --- a/404.html +++ b/404.html @@ -20,7 +20,7 @@ SpotSweeper - 1.1.2 + 1.3.1 + + + + + +
+
+
+ +
+

This function generates a plot for a specified sample within a +SpatialExperiment object, highlighting outliers based on a specified +metric. The plot visualizes the metric of interest and indicates outliers +with a distinct color.

+
+ +
+

Usage

+
plotQCmetrics(
+  spe,
+  sample_id = "sample_id",
+  sample = unique(spe$sample_id)[1],
+  metric = "detected",
+  outliers = NULL,
+  point_size = 2,
+  colors = c("white", "black"),
+  stroke = 1
+)
+
+ +
+

Arguments

+ + +
spe
+

A SpatialExperiment object containing the data to be plotted.

+ + +
sample_id
+

A character string specifying the column name in +colData(spe) that contains unique sample identifiers. +Default is "sample_id".

+ + +
sample
+

A character string or numeric value specifying the sample to be +plotted. By default, it plots the first unique sample found in +spe$sample_id.

+ + +
metric
+

A character string specifying the metric to be visualized +in the plot. This metric should be a column name in colData(spe).

+ + +
outliers
+

A character string specifying the column name in +colData(spe) that indicates whether a data point is considered an +outlier. Default is NULL.

+ + +
point_size
+

A numeric value specifying the size of the points in the +plot. Default is 2.

+ + +
colors
+

A character vector specifying the colors to be used for the +gradient scale. If length is 2, the gradient will be a single color +gradient.

+ + +
stroke
+

A numeric value specifying the border thickness for outlier +points. Default is 1.

+ +
+
+

Value

+

The function returns a plot object created by make_escheR and +modified with additional layers for visualizing the specified metric and +outliers. The plot is not explicitly printed by the function and should be +printed by the caller.

+
+ +
+

Examples

+
library(SpotSweeper)
+library(SpatialExperiment)
+library(escheR)
+
+# load example data
+spe <- STexampleData::Visium_humanDLPFC()
+#> see ?STexampleData and browseVignettes('STexampleData') for documentation
+#> loading from cache
+
+# change from gene id to gene names
+rownames(spe) <- rowData(spe)$gene_name
+
+# drop out-of-tissue spots
+spe <- spe[, spe$in_tissue == 1]
+spe <- spe[, !is.na(spe$ground_truth)]
+
+# Identifying the mitochondrial transcripts in our SpatialExperiment.
+is.mito <- rownames(spe)[grepl("^MT-", rownames(spe))]
+
+# Calculating QC metrics for each spot using scuttle
+spe <- scuttle::addPerCellQCMetrics(spe, subsets = list(Mito = is.mito))
+colnames(colData(spe))
+#>  [1] "barcode_id"            "sample_id"             "in_tissue"            
+#>  [4] "array_row"             "array_col"             "ground_truth"         
+#>  [7] "reference"             "cell_count"            "sum"                  
+#> [10] "detected"              "subsets_Mito_sum"      "subsets_Mito_detected"
+#> [13] "subsets_Mito_percent"  "total"                
+
+# Identifying local outliers using SpotSweeper
+spe <- localOutliers(spe,
+                     metric = "sum",
+                     direction = "lower",
+                     log = TRUE
+)
+
+plotQCmetrics(spe, metric="sum", outliers="sum_outliers")
+
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/plotQCpdf.html b/reference/plotQCpdf.html index 1d1eba3..9ab24e6 100644 --- a/reference/plotQCpdf.html +++ b/reference/plotQCpdf.html @@ -13,7 +13,7 @@ SpotSweeper - 1.1.2 + 1.3.1