Using BiomaRt returns to get entrez gene ids returns an error. Why is this happening?
3
0
Entering edit mode
3.4 years ago
peter.berry5 ▴ 60

I have a list of DE gene symbols that I want to convert to entrez gene ids so I can compare the output from different experiments.

Previously I used the following code to do this with no issues.

v8 <- data.frame(c("5.20", "74.44", "46.67", "26.94", "22.25", "15.13",  "2.27", "8.05", "5.11", "2.75", "18.95"), c("HSPB1", "ENTPD5", "CLU", "THBD", "RRM2", "FAH", "EZR", "H2-L",  "ACAA2", "SERPINB1A", "FABP4")) 
names(v8)[1] <- "Max_Fold_Change"
names(v8)[2] <- "HGNC_Symbol"

mart <- useMart(biomart = "ensembl", dataset = "cgchok1gshd_gene_ensembl")
#obtain entrez gene ids for each gene name in the progenesis dataset (v8) and store in a dataframe v10
V10=getBM(attributes = c("external_gene_name", "entrezgene_id", "hmmpanther"),   
filters = "external_gene_name", 
values = v8$HGNC_Symbol, 
bmHeader = T, mart = mart) 

Today I get the following error.

cannot open compressed file 'C:\Users\Peter\AppData\Local\Temp\RtmpwRdSpO/biomaRt_ac6442011a322c53ec8e6fb374c8cd4a.rds', probable reason 'No such file or directory'

I'm not clear why there's a temporary file being called or how to replace it if that turns out to be required.

Any suggestions would be welcomed.

Peter

BiomaRt R • 1.4k views
ADD COMMENT
1
Entering edit mode
3.4 years ago

This is a local problem very much unrelated to this forum... probably something to do with permissions or your local machine (did you try turning it off and then back on again?).

> V10=getBM(attributes = c("external_gene_name", "entrezgene_id", "hmmpanther"), filters = "external_gene_name", values = v8$HGNC_Symbol, bmHeader = TRUE, mart = mart)
> V10
   Gene name NCBI gene (formerly Entrezgene) ID      PANTHER ID
1      Acaa2                          100765829       PTHR18919
2      Acaa2                          100765829 PTHR18919:SF145
3       Rrm2                          100752542       PTHR23409
4       Rrm2                          100752542  PTHR23409:SF20
5       Thbd                          100765076       PTHR24036
6       Thbd                          100765076   PTHR24036:SF5
7      Hspb1                          100763481       PTHR45640
8      Hspb1                          100763481   PTHR45640:SF7
9      Fabp4                          100760812       PTHR11955
10     Fabp4                          100760812  PTHR11955:SF83
11    Entpd5                                 NA       PTHR11782
12    Entpd5                                 NA  PTHR11782:SF35
13       Clu                          100756447       PTHR10970
14       Clu                          100756447   PTHR10970:SF1
15       Ezr                                 NA       PTHR23281
16       Ezr                                 NA  PTHR23281:SF13
17       Fah                          100757944       PTHR43069
18       Fah                          100757944   PTHR43069:SF2
> 
ADD COMMENT
0
Entering edit mode
3.4 years ago
Mike Smith ★ 2.1k

When you run a query biomaRt creates a temporary copy of the results as an rds file. It does this because large queries are actually submitted in batches, and it's sometimes useful to have access to the results from early batches in the case that something goes wrong with a late batch. It looks like the file causing the error is one of these temporary files.

However biomaRt should clear all the temporary files once a query has completed successfully. Also it should not attempt to read such a file without checking that it exists firsts, so I'm not sure how it's ending up at the error you're seeing.

Perhaps the simplest approach is to close the R session and start again. This should deleted the entire R temporary folder and create a fresh one. Please report back if you continue to run into the issue and we'll try to track down what's causing it.

ADD COMMENT
0
Entering edit mode
3.4 years ago
peter.berry5 ▴ 60

@mike smith, I had tried closing the r session and starting again but hadn't rebooked my machine. @benformatics, a reboot did the trick. Thanks, v much.

Peter

ADD COMMENT

Login before adding your answer.

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