JulianneDavid / shared-cancer-splicing

Code for reproducing analyses and figures for shared alternative cancer splicing paper
MIT License
4 stars 2 forks source link

sqlite3.OperationalError: table jx_sample_map already exists #2

Closed linagapa closed 4 years ago

linagapa commented 4 years ago

Hi Julianne,

After a failed run of jx_indexer.py (due to a typo in a file name) I'm encountering this error, which seems to indicate that I got jx_sample_map sql table created from the previous failed run and now the script gets stocked because of it:

phenotype table creating complete, moving to indexing coding regions discovered CDS tree created splice sites extracted Traceback (most recent call last): File "junction_database/jx_indexer.py", line 48, in submain.main(args, now, conn, index_db) File "index.py", line 729, in main jx_annotations, id_name_dict, auc_decoder, conn File "index.py", line 617, in fill_new_table index_db.execute(jx_samp_command) sqlite3.OperationalError: table jx_sample_map already exists

My sql knowledge is very basic so I tried naively to uncomment "DROP TABLE IF EXISTS" in line 612 and 619 in index.py to see if I could drop the existing table somehow but it didn't work (I may have misunderstood from where is this table created at the first place). I have also tried to clean cache.db without any effect. I would be grateful if you can help me solving this issue.

Lina.

linagapa commented 4 years ago

Hi again, well at the end I solved the problem by just removing new_jx_index.db and letting jx_indexer.py to create the database again. Thank you very much anyway!

JulianneDavid commented 4 years ago

Hi Lina, I'm glad you were able to fix the issue by deleting the initial db file. I've now added an option to check for this at the beginning of any run in "index" mode so hopefully it will not occur in the future. I appreciate your having brought it to my attention.

I'd also like to confirm that the failure of the first run was not an issue with the software, but just a file input issue. Is that correct?

linagapa commented 4 years ago

Hi Julianne, Yes precisely, it was just an input issue (wrote somewhere in the command "GTEx" instead of "GTEX", my mistake). Thank you very much for your attention!

JulianneDavid commented 4 years ago

You're welcome! Let me know if anything else comes up.