matchCellMarker2: Match Markers with cellMarker2 Dataset

matchCellMarker2R Documentation

Match Markers with cellMarker2 Dataset

Description

This function matches markers from the FindAllMarkers output with the cellMarker2 dataset, filtering by species and selecting the top genes based on their average log2 fold change and adjusted p-values.

Usage

matchCellMarker2(marker, n, spc)

Arguments

marker

A data frame of markers obtained from the FindAllMarkers function, expected to contain columns such as avg_log2FC, p_val_adj, and gene.

n

An integer specifying the top number of genes to match from the input markers.

spc

A character string specifying the species, which can be either 'Human' or 'Mouse'.

Value

A data frame containing matched markers from the cellMarker2 dataset, with additional columns indicating the number of matches and ordered symbols.

Examples

# Example usage:
# Match the top 50 markers from the pbmc.markers dataset with the Human
# species in the cellMarker2 dataset.
library(easybio)
data(pbmc.markers)
matched_markers <- matchCellMarker2(pbmc.markers, n = 50, spc = "Human")
print(matched_markers)

easybio documentation built on Sept. 17, 2024, 1:08 a.m.