Entering edit mode
8.5 years ago
chrisclarkson100
▴
150
Trying to get task number 4.3 from biomaRt vignette to work for me. I have established ensembl as the database but from there nothing works for me. I hope you could spot any mistakes in my code:
go=c("GO:0051330", "GO:0000080", chrom=c(1,2,"Y"))
getBM(attributes = "hgnc_symbol",
+ filters=c("go","chromosome_name"),
+ values=list(go,chrom), mart=ensembl)
Error in getBM(attributes = "hgnc_symbol", filters = c("go", "chromosome_name"), :
object 'chrom' not found
getBM(attributes="hgnc_symbol"
+ filters=c("go","chromosome_name")
Error: unexpected symbol in:
"getBM(attributes="hgnc_symbol"
filters"
values=list(go,chrom), mart=ensembl)
Error: unexpected ',' in "values=list(go,chrom),"
The command
head(gene$hgnc)
returnsNULL
? What do I have to do to give it a value?How did you create it in the first place (or did you)?
For what it's worth, section 4.3 of that vignette doesn't seem to work because the example GO IDs in it no longer match to the genes. Presumably this is due to ensembl now using GRCh38 when the vignette was made for hg19 (this is just a guess). If you change the GO ids to GO:0000086 and GO:0051322 and change the "go" filter to "go_id" then you'll get at least partly similar results. If I get a chance, I'll look at the devel branch vignette and see if it's broken too.
I've now alerted the package maintainer. The first error that you ran into has already been corrected for the next release of the package, but the GO ids and the filter are still wrong. Hopefully Steffen will have a chance to update things before the next release goes live, which shouldn't be long.