Learn R Programming

easybio (version 1.1.0)

get_marker: Retrieve Markers for Specific Cells from cellMarker2

Description

This function extracts a list of markers for one or more cell types from the cellMarker2 dataset. It allows filtering by species, cell type, the number of markers to retrieve, and a minimum count threshold for marker occurrences.

Usage

get_marker(spc, cell = character(), number = 5, min.count = 1)

Value

A named list where each name corresponds to a cell type and each element is a vector of marker names.

Arguments

spc

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

cell

A character vector of cell types for which to retrieve markers.

number

An integer specifying the number of top markers to return for each cell type.

min.count

An integer representing the minimum number of times a marker must have been reported to be included in the results.

Examples

Run this code
# Example usage:
# Retrieve the top 5 markers for 'Macrophage' and 'Monocyte' cell types in humans,
# with a minimum count of 1.
library(easybio)
markers <- get_marker(spc = "Human", cell = c("Macrophage", "Monocyte"))
print(markers)

Run the code above in your browser using DataLab