rformassspectrometry / MsBackendMassbank

A prototype backend to parse MassBank records into Spectra
https://rformassspectrometry.github.io/MsBackendMassbank/
3 stars 5 forks source link

How to load Massbank.sql #37

Closed MonicaCalSan closed 2 years ago

MonicaCalSan commented 2 years ago

I have download the Massbank.sql file, but when trying to connect to it, a message tells me that this is not a database. I'm not sure what I'm doing wrong.

con <- dbConnect(SQLite(), dbname="MassBank(1).sql")

Warning message:
Couldn't set synchronous mode: file is not a database
Use `synchronous` = NULL to turn off this warning. 
jorainer commented 2 years ago

Note that the database provided by MassBank is a SQL dump in MySQL format. It can be imported into a MySQL database with mysql MassBank < MassBank.sql, but it can not be used with SQLite. I converted the MySQL database to a SQLite database (rather, I simply copied the tables needed for Spectra over) which can be downloaded from here (the function used to convert is here)

MonicaCalSan commented 2 years ago

Thankss, I'm going to try!