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

[ADD] export function for compounds #52

Closed oliveralka closed 5 years ago

oliveralka commented 5 years ago

Add method export_compound to pyProphet.

Please let me know what you think and if you have any suggestions for improvement.

pyprophet export-compound --in merged_all_lin_allshuff_decoy.osw --format score_plots Is only working on ms2 level right now - ms1 throws an error:

tdensity = gaussian_kde(top_targets)
raise LinAlgError("singular matrix")
numpy.linalg.LinAlgError: singular matrix

This may be due to my current data (I could remove part of the function for now)

If you like to have a look at the current output I can send you a mail with the files.

Let me know if I should add some test.

grosenberger commented 5 years ago

This is a nice addition. Do you think it might make sense to add regression tests for the metabolomics data too? This would only need to cover the learn and export_compound steps.

hroest commented 5 years ago

:+1: looks good

oliveralka commented 5 years ago

I am working on adding Adducts to the OpenSWATH (tsv, pqp, osw) - after this is finished I will update this function and add regression tests.

edit: https://github.com/OpenMS/OpenMS/pull/4008

oliveralka commented 5 years ago

I removed the MS1 scoring for compounds. Added fragment and adduct information and a test for the scoring and export. Let me know if tests are still missing, or you would like to have them integrated differently.

grosenberger commented 5 years ago

Looks great, thanks for the PR!