Annotate your Expression Set with biomaRt
Usage
annotateFromBiomart(
obj,
genes = featureNames(obj),
filters = "ensembl_gene_id",
attributes = c("ensembl_gene_id", "hgnc_symbol", "chromosome_name", "start_position",
"end_position"),
biomart = "ensembl",
dataset = "hsapiens_gene_ensembl",
...
)
Arguments
- obj
ExpressionSet object.
- genes
Genes or rownames of the ExpressionSet.
- filters
getBM filter value, see getBM help file.
- attributes
getBM attributes value, see getBM help file.
- biomart
BioMart database name you want to connect to. Possible database names can be retrieved with teh function listMarts.
- dataset
Dataset you want to use. To see the different datasets available within a biomaRt you can e.g. do: mart = useMart('ensembl'), followed by listDatasets(mart).
- ...
Values for useMart, see useMart help file.
Examples
download.file('https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/bladder.rdata',destfile='netZooR/data/bladder.rdata')
download.file('https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/yarn/skin.rdata',destfile='netZooR/data/skin.rdata')
data(skin)
# subsetting and changing column name just for a silly example
skin <- skin[1:10,]
colnames(fData(skin)) = paste("names",1:6)
biomart<-"ENSEMBL_MART_ENSEMBL";
genes <- sapply(strsplit(rownames(skin),split="\\."),function(i)i[1])
newskin <-annotateFromBiomart(skin,genes=genes,biomart=biomart)
head(fData(newskin)[,7:11])