Description Usage Arguments Details Value Author(s) Examples
View source: R/annotateBMFeatures.R
Use the biomaRt package to add feature annotation information to an SingleCellExperiment
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | annotateBMFeatures(
ids,
biomart = "ENSEMBL_MART_ENSEMBL",
dataset = "mmusculus_gene_ensembl",
id.type = "ensembl_gene_id",
symbol.type,
attributes = c(id.type, symbol.type, "chromosome_name", "gene_biotype",
"start_position", "end_position"),
filters = id.type,
...
)
getBMFeatureAnnos(x, ids = rownames(x), ...)
|
ids |
A character vector containing feature identifiers. |
biomart |
String defining the biomaRt to be used, to be passed to |
dataset |
String defining the dataset to use, to be passed to |
id.type |
String specifying the type of identifier in |
symbol.type |
String specifying the type of symbol to retrieve.
If missing, this is set to |
attributes |
Character vector defining the attributes to pass to |
filters |
String defining the type of identifier in |
... |
For For |
x |
A SingleCellExperiment object. |
These functions provide convenient wrappers around biomaRt to quickly obtain annotation in the required format.
For annotateBMFeatures
, a DataFrame containing feature annotation, with one row per value in ids
.
For getBMFeatureAnnos
, x
is returned containing the output of annotateBMFeatures
appended to its rowData
.
Aaron Lun, based on code by Davis McCarthy
1 2 3 4 5 6 | ## Not run:
# Making up Ensembl IDs for demonstration purposes.
mock_id <- paste0("ENSMUSG", sprintf("%011d", seq_len(1000)))
anno <- annotateBMFeatures(ids=mock_id)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.