Skip to contents

Cell-type markers

Usage

CellTypeMarkers(object, geneToSymbol)

importCellTypeMarkers(file, organism, release, ignoreVersion = TRUE)

Arguments

object

Object.

geneToSymbol

GeneToSymbol. Gene-to-symbol mappings. Must contain geneId and geneName columns. See GeneToSymbol for more information.

file

character(1). File path.

organism

character(1). Full Latin organism name (e.g. "Homo sapiens").

release

integer(1). Ensembl release version (e.g. 100). We recommend setting this value if possible, for improved reproducibility. When left unset, the latest release available via AnnotationHub/ensembldb is used. Note that the latest version available can vary, depending on the versions of AnnotationHub and ensembldb in use.

ignoreVersion

logical(1). Ignore identifier (e.g. transcript, gene) versions. When applicable, the identifier containing version numbers will be stored in txIdVersion and geneIdVersion, and the variants without versions will be stored in txId, txIdNoVersion, geneId, and geneIdNoVersion.

Value

CellTypeMarkers.

Note

Updated 2024-03-27.

Examples

markersDir <- system.file(
    "extdata", "markers",
    package = "AcidSingleCell"
)
cellTypeDir <- file.path(markersDir, "cell-type")
files <- sort(list.files(
    path = cellTypeDir,
    pattern = "*.csv",
    full.names = TRUE
))
file <- files[[1L]]
organism <- syntactic::sentenceCase(
    gsub(
        pattern = "-",
        replacement = " ",
        x = AcidBase::basenameSansExt(file)
    )
)
releaseFile <- file.path(markersDir, "ensembl-release.txt")
release <- as.integer(readLines(releaseFile))
object <- importCellTypeMarkers(
    file = file,
    organism = organism,
    release = release
)
#> → Importing /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpJ7yUtj/temp_libpath2a0db37ca07/AcidSingleCell/extdata/markers/cell-type/drosophila-melanogaster.csv using base::`read.table()`.
#> → Making <GRanges> from Ensembl.
#> → Getting <EnsDb> from AnnotationHub 3.10.0 (2023-10-23).
#>  "AH83185": Ensembl 101 EnsDb for Drosophila melanogaster.
#> → Making <GRanges> from <EnsDb>.
#> Organism: Drosophila melanogaster
#> Genome build: BDGP6.28
#> Release: 101
#> Level: genes
#> → Defining names by `geneId` column in `mcols()`.
#> ! Dropping 1 identifier without defined gene symbol.
print(object)
#> CellTypeMarkers
#> Drosophila melanogaster (Ensembl 101)
#> crystal_cell(5): PPO1 Sox102F ... lz mam
#> lamellocyte(16): 14-3-3zeta Eip75B ... pnt tx
#> plasmatocyte(18): Col4a1 He ... pnt ttk
#> prohemocyte(8): Tep4 dome ... srp wg