0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

biomaRt, getBM で "Error in scan(file = file, what = what, sep = sep, quote = quote,..." というエラーが出る問題

Last updated at Posted at 2020-10-13

こんにちは!バイオインフォマティクス系オタク修士学生のroadricefieldです!今日は2020年10月13日現在発生しているbiomaRtのgetBM()で起こっている問題についてです.

起きている問題

db <- useMart("ensembl")
hs <- useDataset("hsapiens_gene_ensembl",mart=db)

symbol <- getBM(attributes = c("ensembl_gene_id", "uniprot_gn_symbol"),
                filters = "ensembl_gene_id", 
                values = ID, #IDはensembl_gene_id
                mart = hs)

これでやると以下のように怒られます.

Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, : line 1 did not have 3 elements.

なんでや!! この前まで元気に動いとったやろ!!

調べるともしかしたらEnsembl側の問題かもしれないというコメントを見つけました.

どうやら通信の障害でサーバーから正しい形のテキストファイルが返って来ない問題なようです.

ミラーサイトを指定したら直った!!

上記の私のスクリプトではデフォルトでEnsemblサーバーが指定されていると思うのでこちらを参考にして以下のようにアジアのサーバーを指定してみました.

mart <- useEnsembl(biomart = "ensembl", 
                   dataset = "hsapiens_gene_ensembl", 
                   mirror = "asia")

symbol <- getBM(attributes = c("ensembl_gene_id", "uniprot_gn_symbol"),
                filters = "ensembl_gene_id", 
                values = ID, #IDはensembl_gene_id
                mart = mart)

動いた!! 動きました!! ありがとう......ありがとう......アジアのサーバーは生きていました......

同日 11:09 追記

Request to BioMart web service failed.
The BioMart web service you're accessing may be down.
Check the following URL and see if this website is available:
http://asia.ensembl.org:80/biomart/martservice?type=registry&requestid=biomaRt
Error in if (!grepl(x = registry, pattern = "^\n*<MartRegistry>")) { : 
  argument is of length zero

あああああぁぁぁぁぁぁぁぁぁぁぁ!!!!!!!

ミラーをuseastに変えたらまた動きました. とりあえずミラーを色々変えてみてください!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?