biomaRt code giving me trouble
1
0
Entering edit mode
9.6 years ago

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),"
R • 2.7k views
ADD COMMENT
0
Entering edit mode

The command head(gene$hgnc) returns NULL? What do I have to do to give it a value?

ADD REPLY
0
Entering edit mode

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

ADD REPLY
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 REPLY
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 REPLY
1
Entering edit mode
9.6 years ago

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 COMMENT
0
Entering edit mode

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

ADD REPLY
1
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 1849 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6