PyProphet / pyprophet

PyProphet: Semi-supervised learning and scoring of OpenSWATH results.
http://www.openswath.org
BSD 3-Clause "New" or "Revised" License
29 stars 21 forks source link

[FIX] merge osw with compounds #66

Closed oliveralka closed 4 years ago

oliveralka commented 4 years ago

I had issues merging compound osw.

This seems to be due to an updated format of the FEATURE Table in the .osw file using the "merge_oswr" function in "levels_contexts.py".

pyprophet merge --template "assay_library_t3_decoy.pqp" --out "merged_exp.osw" *.osw

File "/usr/local/miniconda3/envs/py37/lib/python3.7/site-packages/pyprophet/levels_contexts.py", line 683, in merge_oswr
    c.executescript('ATTACH DATABASE "%s" AS sdb; INSERT INTO FEATURE SELECT * FROM sdb.FEATURE; DETACH DATABASE sdb;' % infile)
sqlite3.OperationalError: table FEATURE has 3 columns but 8 values were supplied
ID - RUN_ID - PRECURSOR_ID
vs 
ID - RUN_ID - PRECURSOR_ID - EXP_RT - NORM_RT - DELTA_RT - LEFT_WIDTH - RIGHT_WIDTH

I added them for table creation as "NULL" - please let me know if you think that breaks the compatibility and should be handled in another way.

Thank you!

grosenberger commented 4 years ago

I think that looks ok, let's merge and see if this will be resolved.