calculatePercentageMatch: Calculate the Percentage of Matches per Category

View source: R/Seurat.Utils.Metadata.R

calculatePercentageMatchR Documentation

Calculate the Percentage of Matches per Category

Description

This function calculates the percentage of matches for specified metadata features against provided match values within each category of an identifier in a Seurat object.

Usage

calculatePercentageMatch(
  obj,
  ident = GetClusteringRuns()[1],
  meta.features = c("AAV.detected.min2", "AAV.detected"),
  match.values = c(AAV.detected.min2 = "AAV", AAV.detected = "AAV"),
  verbose = TRUE,
  max.categ = 100
)

Arguments

obj

A Seurat object containing the data to be analyzed. Default: combined.obj.

ident

A string specifying the column in the metadata that identifies the categories. Default: first element of GetClusteringRuns().

meta.features

A vector of strings specifying which metadata features to analyze. Default: c("AAV.detected.min2", "AAV.detected").

match.values

A named vector where names correspond to meta.features and values are the strings to match against. Default: c("AAV.detected.min2" = "AAV", "AAV.detected" = "AAV").

verbose

A logical value indicating whether to print detailed output. Default: TRUE.

max.categ

The maximum number of categories allowed before stopping. Default: 30.

Value

A data frame with the category as the first column and the subsequent columns showing the percentage of matches for each metadata feature.

Examples

calculatePercentageMatch(obj = combined.obj, ident = "Simple_Celltypes")

vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.