Biomart getLDS between two plant genomes does not work
1
1
Entering edit mode
2.9 years ago
Jonathan ▴ 30

Hello everyone (first post ever for me)

I am using Biomart in R and I am trying to obtain the maize homologs of a set of barley genes (I am only displaying one here for example's sake). Everything works fine when I use the getBM function for getLDS does not seem to work.

host="plants.ensembl.org"
mysets<-listDatasets(useMart("plants_mart", host = host))
barley <- useDataset("hvulgare_eg_gene", mart = useMart("plants_mart", host = host))
zea <-useDataset("zmays_eg_gene", mart = useMart("plants_mart", host = host))
getLDS(attributes = c("ensembl_gene_id","description", "go_id","name_1006"),
   filters = "ensembl_gene_id", values = "HORVU.MOREX.r3.1HG0000220",
   mart = barley ,
   attributesL = c("ensembl_gene_id","description", "go_id","name_1006"), 
   martL = zea)

I get the following error message. I think the issue may be that the Virtual Schema is set to default, but I can't find how to change it to plants_mart

Error in getLDS(attributes = c("ensembl_gene_id", "description", "go_id", : Query ERROR: caught BioMart::Exception::Usage: WITHIN Virtual Schema : default, Dataset hvulgare_eg_gene NOT FOUND
Traceback:

1. getLDS(attributes = c("ensembl_gene_id", "description", "go_id", 
 .     "name_1006"), filters = "ensembl_gene_id", values = "HORVU.MOREX.r3.1HG0000220", 
 .     mart = barley, attributesL = c("ensembl_gene_id", "description", 
 .         "go_id", "name_1006"), martL = zea)
2. stop(postRes)

Any help would be greatly appreciated

Biomart plants R • 2.7k views
ADD COMMENT
1
Entering edit mode

I can confirm that I see the same error, and it's unexpected since you can run this query in the Ensembl web interface. I'll investigate if biomaRt is doing something incorrectly and get back to you.

ADD REPLY
0
Entering edit mode

Thank you very much!

ADD REPLY
0
Entering edit mode

https://support.bioconductor.org/p/110433/ Is the answer here helpful?

ADD REPLY
1
Entering edit mode

Hi, Thanks for your reply. The answer you provided talks about trying to get two different mart (in this instance human and plant) to interact. The issue there is that you cannot get two marts located on different hosts to link. My issue is that even though both the barley and zea marts are on the same host (plants.ensembl.org), the getLDS function cannot connect to the plants.ensembl host it seems, thus why it cannot find the barley genes dataset. I hope this clears it up somewhat ^^"

ADD REPLY
3
Entering edit mode
2.9 years ago
Mike Smith ★ 2.1k

Great spot that this was related to the virtualSchemaName. That was hardcoded to be "default" in biomaRt and no one has ever reported a problem before. I assumed there were no Mart instances that ever used anything different!

Anyway, it's been patched in biomaRt version 2.50.3, which should be available from Bioconductor in the next few days. If you want to get a copy before then you can install from Github with BiocManager::install('grimbough/biomaRt', ref = 'RELEASE_3_14').

Here's an example with it working for a similar query:

library(biomaRt)
packageVersion("biomaRt")
#> [1] '2.50.3'

ensembl_plants <- useEnsemblGenomes(biomart = "plants_mart")

barley <- useDataset("hvulgare_eg_gene", mart = ensembl_plants)
zea    <- useDataset("zmays_eg_gene", mart = ensembl_plants)

barley_gene_id <- "HORVU.MOREX.r3.4HG0381830"

getLDS(filters = "ensembl_gene_id", 
       values = barley_gene_id, 
       attributes = c("ensembl_gene_id","description", "go_id","name_1006"),
       mart = barley ,
       attributesL = c("ensembl_gene_id","description", "go_id","name_1006"), 
       martL = zea)

#>              Gene.stable.ID Gene.description GO.term.accession
#> 1 HORVU.MOREX.r3.4HG0381830               NA        GO:0016788
#> 2 HORVU.MOREX.r3.4HG0381830               NA        GO:0016788
#>                                GO.term.name Gene.stable.ID.1 Gene.description.1
#> 1 hydrolase activity, acting on ester bonds  Zm00001eb395980     Zm00001e038320
#> 2 hydrolase activity, acting on ester bonds  Zm00001eb395980     Zm00001e038320
#>   GO.term.accession.1                            GO.term.name.1
#> 1          GO:0016788 hydrolase activity, acting on ester bonds
#> 2          GO:0016787                        hydrolase activity
ADD COMMENT
1
Entering edit mode

That is awesome! Thank you very much for helping me with this.

ADD REPLY
0
Entering edit mode

Happy to help. Thanks for reporting the problem and the nice reproducible example, it really helped tracking this down.

ADD REPLY

Login before adding your answer.

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