EI-CoreBioinformatics / mikado

Mikado is a lightweight Python3 pipeline whose purpose is to facilitate the identification of expressed loci from RNA-Seq data * and to select the best models in each locus.
https://mikado.readthedocs.io/en/stable/
GNU Lesser General Public License v3.0
97 stars 18 forks source link

Error with mikado serialise: 'Engine' object has no attribute 'cursor' #450

Open bbista opened 8 months ago

bbista commented 8 months ago

Hello, I am having trouble with the mikado serialize step. I get this error every time:

mikado serialise --json-conf configuration.yaml --xml mikado_prepared.blast.tsv --orfs mikado.orfs.gff3 --junctions portcullis_filtered.pass.junctions.bed -bt /uniprot/TSEprotein.faa

Mikado crashed, cause: 'Engine' object has no attribute 'cursor' Traceback (most recent call last): File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/main.py", line 68, in main args.func(args) File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/subprograms/serialise.py", line 383, in serialise load_orfs(mikado_configuration, logger) File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/subprograms/serialise.py", line 183, in load_orfs serializer() File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/serializers/orf.py", line 486, in call self.serialize() File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/serializers/orf.py", line 461, in serialize self.load_fasta() File "/home/bbista/.local/lib/python3.9/site-packages/Mikado/serializers/orf.py", line 260, in load_fasta cache = pd.read_sql_table("query", self.engine, index_col="query_name", columns=["query_name", "query_id"]) File "/home/bbista/.local/lib/python3.9/site-packages/pandas/io/sql.py", line 385, in read_sql_table if not pandas_sql.has_table(table_name): File "/home/bbista/.local/lib/python3.9/site-packages/pandas/io/sql.py", line 2863, in has_table return len(self.execute(query, [name]).fetchall()) > 0 File "/home/bbista/.local/lib/python3.9/site-packages/pandas/io/sql.py", line 2670, in execute cur = self.con.cursor() AttributeError: 'Engine' object has no attribute 'cursor'

The log file for serialize looks like this: 2024-02-26 07:55:35,513 - serialise - serialise.py:321 - INFO - setup - MainProcess - Mikado version: 2.3.4 2024-02-26 07:55:35,513 - serialise - serialise.py:322 - INFO - setup - MainProcess - Command line: /home/bbista/.local/bin/mikado serialise --json-conf configuration.yaml --xml mikado_prepared.blast.tsv --orfs mikado.orfs.gff3 --junctions /work/LAS/nvalenzu-lab/bbista/ASP_final_annot/portcullis_out_ASP/3-filt/portcullis_filtered.pass.junctions.bed -bt /work/LAS/nvalenzu-lab/bbista/uniprot/TSEprotein.faa 2024-02-26 07:55:35,526 - serialise - serialise.py:332 - INFO - setup - MainProcess - Random seed: 0 2024-02-26 07:55:35,526 - serialise - serialise.py:345 - INFO - setup - MainProcess - Using a sqlite database (location: mikado.db) 2024-02-26 07:55:35,526 - serialise - serialise.py:348 - INFO - setup - MainProcess - Requested 1 threads, forcing single thread: False 2024-02-26 07:55:35,526 - serialise - serialise.py:176 - INFO - load_orfs - MainProcess - Starting to load ORF data

I am using Mikado v2.3.4 installed using the following steps:

mamba env create -f environment.yml

pip wheel -w dist . pip install dist/*whl

I only have issues with the serialise part.

Any help is greatly appreaciated.

Best, bbista

jasonshiller commented 5 months ago

@bbista I have the same problem. Did you manage to solve this?

bbista commented 5 months ago

@jasonshiller I did not solve it at all. I work in an HPC cluster and I just installed mikado in a different HPC cluster where I do not get this error. Only advice I can give you is to try a different machine.