This method provides visualization of coexpression of 2 genes (or proteins) and additional methods for filtering for cells with gene expression values that are above or below thresholds set for one or both markers. The method allows for filtering (optional) of the Seurat object using manually set expression thresholds.

dualLabeling(
  object,
  samples,
  marker.1,
  marker.2,
  marker.1.type = "SCT",
  marker.2.type = "SCT",
  data.reduction = "umap",
  point.size = 0.5,
  point.shape = 16,
  point.transparency = 0.5,
  add.marker.thresholds = FALSE,
  marker.1.threshold = 0.5,
  marker.2.threshold = 0.5,
  filter.data = FALSE,
  M1.filter.direction = "greater than",
  M2.filter.direction = "greater than",
  apply.filter.1 = TRUE,
  apply.filter.2 = TRUE,
  filter.condition = TRUE,
  parameter.name = "Marker",
  trim.marker.1 = TRUE,
  trim.marker.2 = TRUE,
  pre.scale.trim = 0.99,
  density.heatmap = FALSE,
  display.unscaled.values = FALSE
)

Arguments

object

Seurat-class object

samples

Samples to be included in the analysis

marker.1

First gene/marker for coexpression analysis

marker.2

Second gene/marker for coexpression analysis

marker.1.type

Slot to use for first marker. Choices are "SCT", "protein","HTO" (default is "SCT")

marker.2.type

Slot to use for second marker. Choices are "SCT", "protein","HTO" (default is "SCT")

data.reduction

Dimension Reduction method to use for image. Options are "umap" or "tsne" (default is "umap")

point.size

Point size for image (default is 0.5)

point.shape

Point shape for image (default is 16)

point.transparency

Point transparency for image (default is 0.5)

add.marker.thresholds

Add marker thresholds on plot (default is FALSE)

marker.1.threshold

Threshold set for first marker (default is 0.5)

marker.2.threshold

Threshold set for second marker (default is 0.5)

filter.data

Add new parameter column to metadata annotating where marker thresholds are applied (default is TRUE)

M1.filter.direction

Annotate cells that have gene expression levels for marker 1 using the marker 1 threshold. Choices are "greater than" or "less than" (default is "greater than")

M2.filter.direction

Annotate cells that have gene expression levels for marker 2 using the marker 2 threshold. Choices are "greater than" or "less than" (default is "greater than")

apply.filter.1

If TRUE, apply the first filter (default is TRUE)

apply.filter.2

If TRUE, apply the second filter (default is TRUE)

filter.condition

If TRUE, apply both filters 1 and 2 and take intersection. If FALSE, apply both filters and take the union.

parameter.name

Name for metadata column for new marker filters (Default is "Marker")

trim.marker.1

Trim top and bottom percentile of marker 1 signal to pre-scale trim values (below) to remove extremely low and high values (Default is TRUE)

trim.marker.2

Trim top and bottom percentile of marker 2 signal to pre-scale trim values (below) to remove extremely low and high values (Default is TRUE)

pre.scale.trim

Set trimming percentile values (Defalut is 0.99)

density.heatmap

Creates a additional heatmap showing the density distribution of cells. (Default is FALSE)

display.unscaled.values

Set to TRUE if you want to view the unscaled gene/protein expression values (Default is FALSE)

Value

a seurat object with optional additional metadata for cells that are positive or negative for gene markers, a coexpression plot and contingency table showing sum of cells filtered.