tleonardi / nanocompore

RNA modifications detection from Nanopore dRNA-Seq data
https://nanocompore.rna.rocks
GNU General Public License v3.0
80 stars 12 forks source link

Error occurred during SampCompDB command #145

Closed aman21392 closed 4 years ago

aman21392 commented 4 years ago

db = SampCompDB ( ... db_fn = "/home/aclab/m6A/result/out_SampComp.db", ... fasta_fn = "/media/aclab/other/homotranscript.fa") Loading SampCompDB Traceback (most recent call last): File "/home/aclab/env/lib/python3.7/site-packages/nanocompore/SampCompDB.py", line 67, in init with shelve.open(db_fn, flag='r') as db: File "/home/aclab/miniconda3/lib/python3.7/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/home/aclab/miniconda3/lib/python3.7/shelve.py", line 227, in init Shelf.init(self, dbm.open(filename, flag), protocol, writeback) File "/home/aclab/miniconda3/lib/python3.7/dbm/init.py", line 91, in open "available".format(result)) dbm.error: db type is dbm.gnu, but the module is not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 3, in File "/home/aclab/env/lib/python3.7/site-packages/nanocompore/SampCompDB.py", line 84, in init raise NanocomporeError("The result database cannot be opened") nanocompore.common.NanocomporeError: The result database cannot be opened

Can you please give suggestion why this error occur during this command process. Thank you in advance

tleonardi commented 4 years ago

Hi @aman21392, apologies for the late reply, I had missed this issue. The problem here is that you are missing the dbm.gnu module, which is used internally by shelve to read/write the db. I think you might have generated the db file on a machine with a certain database backend (i.e. dbm.gnu) and now you're trying to open it on a machine that have a different backend installed (e.g. dbm.ndbm). In general the easiest thing to do is to run Nanocompore in a container (e.g. Docker) and then use the same container to open the DB on a different machine.