Biostar Beta. Not for public use.
biomaRt code giving me trouble
0
Entering edit mode
16 months ago
European Union

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.... hoping 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),"_
R • 1.5k views
ADD COMMENTlink
0
Entering edit mode

the command head(gene$hgnc) returns NULL.....? what do i have to do to give it a value?

ADD REPLYlink
0
Entering edit mode

How did you create it in the first place (or did you)?

ADD REPLYlink
0
Entering edit mode

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.

ADD REPLYlink
0
Entering edit mode

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.

ADD REPLYlink
1
Entering edit mode
15 months ago
Freiburg, Germany

It looks like you just merged two lines. Instead of this:

go=c("GO:0051330", "GO:0000080", chrom=c(1,2,"Y"))

Try this:

go=c("GO:0051330", "GO:0000080")
chrom=c("1","2","Y")
ADD COMMENTlink
0
Entering edit mode

perfect thanks. how do i get the getBM command to work?

ADD REPLYlink
1
Entering edit mode

By reading help(getBM) and showing us what gene$hgnc contains in the other thread you just started.

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1