View source: R/uniquifyFeatureNames.R
uniquifyFeatureNames | R Documentation |
Combine a user-interpretable feature name (e.g., gene symbol) with a standard identifier that is guaranteed to be unique and valid (e.g., Ensembl) for use as row names.
uniquifyFeatureNames(ID, names)
ID |
A character vector of unique identifiers. |
names |
A character vector of feature names. |
This function will attempt to use names
if it is unique.
If not, it will append the _ID
to any non-unique value of names
.
Missing names
will be replaced entirely by ID
.
The output is guaranteed to be unique, assuming that ID
is also unique.
This can be directly used as the row names of a SingleCellExperiment object.
A character vector of unique-ified feature names.
Aaron Lun
uniquifyFeatureNames(
ID=paste0("ENSG0000000", 1:5),
names=c("A", NA, "B", "C", "A")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.