getBMFeatureAnnos {scater}R Documentation

Get feature annotation information from Biomart

Description

Use the biomaRt package to add feature annotation information to an SingleCellExperiment.

Usage

getBMFeatureAnnos(object, ids = rownames(object),
  filters = "ensembl_gene_id", attributes = c(filters, "mgi_symbol",
  "chromosome_name", "gene_biotype", "start_position", "end_position"),
  biomart = "ENSEMBL_MART_ENSEMBL", dataset = "mmusculus_gene_ensembl",
  host = "www.ensembl.org")

Arguments

object

A SingleCellExperiment object.

ids

A character vector containing the identifiers for all rows of object, of the same type specified by filters.

filters

Character vector defining the filters to pass to the getBM function.

attributes

Character vector defining the attributes to pass to getBM.

biomart

String defining the biomaRt to be used, to be passed to useMart. Default is "ENSEMBL_MART_ENSEMBL".

dataset

String defining the dataset to use, to be passed to useMart. Default is "mmusculus_gene_ensembl", which should be changed if the organism is not mouse.

host

Character string argument which can be used to select a particular "host" to pass to useMart. Useful for accessing archived versions of biomaRt data. Default is "www.ensembl.org", in which case the current version of the biomaRt (now hosted by Ensembl) is used.

Value

A SingleCellExperiment object containing feature annotation. The input feature_symbol appears as the feature_symbol field in the rowData of the output object.

Examples

## Not run: 
data("sc_example_counts")
data("sc_example_cell_info")
example_sce <- SingleCellExperiment(
    assays = list(counts = sc_example_counts), 
    colData = sc_example_cell_info
)

mock_id <- paste0("ENSMUSG", sprintf("%011d", seq_len(nrow(example_sce))))
example_sce <- getBMFeatureAnnos(example_sce, ids=mock_id)

## End(Not run)


[Package scater version 1.12.2 Index]