BiomaRt package not working
4
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 2.7 years ago
Spain

Hi,

I usually use this script to get the GO IDs but I'm getting the error below since yesterday.

library("biomaRt")

listMarts(host="plants.ensembl.org") 
m <- useMart("plants_mart", host="plants.ensembl.org");
listDatasets(ensembl)
ensembl= useDataset("athaliana_eg_gene", mart=ensembl)
go <- getBM(attributes=c("go_accession", "tair_locus", "go_namespace_1003"), mart=ensembl)

Error in getBM(attributes = c("go_accession", "tair_locus", "go_namespace_1003"),  : 
  Invalid attribute(s): go_accession, go_namespace_1003 
Please use the function 'listAttributes' to get valid attribute names

Thanks a lot.

 

biomart getbm • 2.6k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Ensembl just updated to Ensembl plants 35, which includes changes to the Biomart.

> library(biomaRt)
> mart <- useMart("plants_mart", host = "plants.ensembl.org")
> mart <- useMart("plants_mart", "athaliana_eg_gene", host = "plants.ensembl.org")
> grep("go", listAttributes(mart)[,1], value = TRUE)
 [1] "go_id"                                             
 [2] "go_linkage_type"                                   
 [3] "goslim_goa_accession"                              
 [4] "goslim_goa_description"      

That's all the GO stuff they have now, so far as I can tell. I have no idea what a go_namespace_1003 might be, so I can't say if any of those things are what you are looking for. You can always use the archive, however:

> mart2 <- useMart("plants_mart", "athaliana_eg_gene",host = "archive.plants.ensembl.org")
> grep("go", listAttributes(mart2)[,1], value = TRUE)
 [1] "go_accession"                               
 [2] "go_name_1006"                               
 [3] "go_definition_1006"                         
 [4] "go_linkage_type"                            
 [5] "go_namespace_1003"                          
 [6] "goslim_goa_accession"                       
 [7] "goslim_goa_description"                    
ADD COMMENT
0
Entering edit mode

Thanks a lot. 

ADD REPLY
0
Entering edit mode
@mjsteinbaugh
Last seen 11 months ago
Cambridge, MA

The Ensembl website is down for maintenance, which could also be causing your biomaRt requests to error out at the moment.

ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 4 hours ago
EMBL Heidelberg

Did you try using the listAttributes() function as suggested in the output message you've highlighted?

As James says a new Ensembl plants has  been release, and some of the attribute names have changed.  These are documented here although I'm not sure that list is accurate since, for example, there is no attribute named simply go.  I think the code you require is:

go <- getBM(attributes = c("go_id", "tair_locus", "namespace_1003"), 
            mart=ensembl)
ADD COMMENT
0
Entering edit mode

Dear Mike,

Thanks a lot for spotting this. I've now updated the following file: ftp://ftp.ensemblgenomes.org/pub/release-35/release_35_biomart_changes.txt

Kind Regards,

Thomas

ADD REPLY
0
Entering edit mode

Cool, I made my suggested substitutions based on the 'Description' field, so point out if that was incorrect.

Should there still be an entry in the file for go_accession -> go_id? I can't see one, but go_accession is no longer listed as an attribute.

ADD REPLY
0
Entering edit mode

Opps sorry, you are right. I've added "go_accession -> go_id" to the file. 
Thanks,

Thomas

ADD REPLY
0
Entering edit mode
Didi ▴ 10
@didi-10905
Last seen 2.7 years ago
Spain

Thank you so much. It's working now by using :

go <- getBM(attributes = c("go_id", "tair_locus", "namespace_1003"), 
            mart=ensembl)

It was really helpful.

Thanks again.

 

ADD COMMENT

Login before adding your answer.

Traffic: 653 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