mapCellsToSamples: Map cells to samples

View source: R/mapCellsToSamples.R

mapCellsToSamplesR Documentation

Map cells to samples

Description

This function extracts sampleId from the cellId column using grep matching.

Usage

mapCellsToSamples(cells, samples)

Arguments

cells

character. Cell identifiers.

samples

character. Sample identifiers.

Value

factor. Cells as the names and samples as the levels.

Note

Updated 2022-05-04.

Examples

samples <- paste0("sample", seq_len(2L))
print(samples)
cells <- paste(samples, c("AAAAAAAA", "CCCCCCCC"), sep = "_")
print(cells)
mapCellsToSamples(cells, samples)

acidgenomics/r-acidsinglecell documentation built on March 30, 2024, 5:39 a.m.