Error in getBM(c("affy_rice", "ensembl_gene_id", "entrezgene", "external_gene_name"), : could not find function "featureNames"
1
0
Entering edit mode
@pratikshasharma47-20320
Last seen 3.4 years ago

Hi! I'm new to R and I'm trying to do GO enrichment analysis using biomaRT. I have affymetrix data of rice (GPL2025) I have run the following script:

> library(biomaRt)
> mart <- useEnsembl("plants_mart", "osativa_eg_gene",host = "plants.ensembl.org")
> annot <- getBM(c("affy_rice","ensembl_gene_id","entrezgene","external_gene_name"), "affy_rice",featureNames(z), mart)
Error in getBM(c("affy_rice", "ensembl_gene_id", "entrezgene", "external_gene_name"),  :
could not find function "featureNames"


any information to get rid of this error.

annotation error biomaRT affy ricedataset • 617 views
1
Entering edit mode
Mike Smith ★ 5.7k
@mike-smith
Last seen 1 day ago
EMBL Heidelberg / de.NBI

You'll need to load the package where featureNames() is defined. This is in Biobase rather than biomaRt, so you should add the line library(Biobase) to the top of your script.

If you see an error like this in the future you can search the help files for all the package you have installed using ?? e.g. ??featureNames. This will hopefully help you find the package where a function is defined.