This assert check determines if a user-defined gene name query is using only unique (non-amgibuous) symbols. It is designed to be used for gene plotting particularly when performing single-cell RNA-seq marker analysis.

matchesUniqueGeneNames(x, genes, .xname = getNameInParent(x))

Arguments

x

Object.

genes

character. Genes.

.xname

Not intended to be used directly.

Value

TRUE on success; FALSE on failure, with cause attribute set.

Examples

x <- SummarizedExperiment::SummarizedExperiment( assays = matrix( data = seq_len(16L), nrow = 4L, ncol = 4L, dimnames = list( paste0("gene", seq_len(4L)), paste0("sample", seq_len(4L)) ) ), rowData = S4Vectors::DataFrame( geneID = paste0("ENSG0000000000", seq_len(4L)), geneName = paste0("SYMBOL", seq_len(4L)) ) ) genes <- SummarizedExperiment::rowData(x)$geneName ## TRUE ==== matchesUniqueGeneNames(x = x, genes = genes)
#> [1] TRUE