tleonardi / nanocompore

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

SampComp output is a .dat file #177

Closed sr8510 closed 3 years ago

sr8510 commented 3 years ago

I am using Nanocompore to analyze RNA modifications in a set of nanopore Direct RNA sequencing samples. I am now comparing 2 samples (I am still preparing the replicates but wanted to check the flow of the code). Each sample has aroun 1 million reads. I performed all the steps in the Nanocompore protocol (Alignment with Minimap, Eventalign then Eventalign collapes). When I perform SampComp, I got the output file as a .db.dat (the file name is out_SampComp.db.dat). When I tried reading the file using SampCompDB, I get this error: NanocomporeError: The result database cannot be opened How to fix this error, and is it happening because I am using one replicate per condition?

tleonardi commented 3 years ago

Hi, the .dat extension is expected. Are you sure you are using the right command to open it with SampCompDB? Could you post an ls of your working directory as well as the python line you are using to open it? cheers tom

sr8510 commented 3 years ago

Hi Tom

I used Jupyter lab to open the db file. The command was:

from nanocompore.SampCompDB import SampCompDB, jhelp db = SampCompDB ( db_fn = "/media/sherif/Data/Miniknow/ALkbh1-Direct_RNA/Nanocompore/results/outSampComp.db.dat", fasta_fn = "/media/sherif/Data/Miniknow/ALkbh1-Direct_RNA/Nanocompore/rat.fa") print (db) print (db.ref_id_list)

I got this error:

2021-01-27 11:56:00.648 | INFO | nanocompore.SampCompDB:init:55 - Loading SampCompDB 2021-01-27 11:56:00.650 | ERROR | nanocompore.common:init:21 - The result database cannot be opened

What can I do to resolve this?

Sherif

tleonardi commented 3 years ago

Hi Sherif, the .dat extension of the DB is not required. Can you try with the following?

db = SampCompDB (
    db_fn = "/media/sherif/Data/Miniknow/ALkbh1-Direct_RNA/Nanocompore/results/outSampComp.db",
    fasta_fn = "/media/sherif/Data/Miniknow/ALkbh1-Direct_RNA/Nanocompore/rat.fa")