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

ValueError: Buffer dtype mismatch #4

Closed IvanSilbern closed 7 years ago

IvanSilbern commented 7 years ago

Dear All,

I am getting a following error when I am trying to run pyprophet:

File "c:\users\a-isilber\anaconda2\lib\site-packages\pyprophet\data_handling.py", line 279, in rank_by flags = find_top_ranked(self.df.tg_num_id.values, self.df[score_col_name].values) File "pyprophet/_optimized.pyx", line 157, in pyprophet._optimized.find_top_ranked (pyprophet/_optimized.c:3729) ValueError: Buffer dtype mismatch, expected 'DATA_TYPE' but got 'double'

I get the same issue on two systems x64 and x32 windows 10 and 7 with python 2.7 installed through Anaconda pyprophet version 0.22.0 numpy version 1.11.3 updating numpy through $pip install numpy also does not solve the issue

command which I am using: pyprophet --ignore.invalid_score_columns --xeval.num_iter=10 --target.dir=PATH\ PATH\file.tsv

I would very appreciate your help! Thank you in advance, Ivan

grosenberger commented 7 years ago

Hi Ivan,

I'm sorry to hear about the trouble, but thanks for the report. Could you please provide an example file which is as small as possible so I can take a look? I'm currently out of office, so it might take a few days for me to work on it.

Best regards, George

grosenberger commented 7 years ago

Update: We just realised that this bug was already fixed in the development version. We will make a new release and let you know as soon as it is available.

IvanSilbern commented 7 years ago

Hi George,

Thanks a lot for your reply! I assume you do not need an example file anymore :) Is there any quick-and-dirty solution to the problem, e.g. replacing DATA_TYPE with double in optimized.c file? I am not sure, if it is relevant, but the first time I have encountered the problem was after I disabled -Scoring:TransitionGroupPicker:minimal_quality in OpenSwathWorkflow or set -Scoring:TransitionGroupPicker:compute_peak_quality to -2. This resulted obviously in a bigger output .tsv file and then the mentioned problem has occured. I guess it might be related to the .find_top_ranked feature but probably I am wrong.

Thanks again for your help, I will look forward to a new release.

Best wishes, Ivan

grosenberger commented 7 years ago

Hi Ivan,

If you install the pyprophet version from GitHub instead from PyPI, this should already provide the patch.

Best regards, George

IvanSilbern commented 7 years ago

Indeed, it has worked! Thank you!

hroest commented 7 years ago

great to see this fixed, @grosenberger is this what was fixed in #3 ?