Nesvilab/FragPipe

Python package version incompatibility: ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.

Closed this issue · 4 comments

I installed FragPipe v22 by unzipping it into a new directory, copied some workflows over from FragPipe v21, and then tried running a DIA_SpecLib_Quant files with MSFragger creating the spectral library, identifying peptides and proteins and using DIA_nn to quantify. I am using MSConvert to convert the .raw to a .mzML file. I keep running into an error at the speclibgen step:

2024-06-12 14:35:37 - Info: easypqp_rt_alignment_A20240325_SE_hela_100ng_01; Lowess fraction used: 0.04.
disallow_ndim_indexing(result)
File "C:\Users\shaoen\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexers\utils.py", line 341, in disallow_ndim_indexing
raise ValueError(
ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.
Library not generated, not enough peptides could be found for alignment.
Library not generated, not enough peptides could be found for alignment.
Please try using other options for alignment (e.g. ciRT if used other options)

I tried other options for alignment but it doesn't help. I also get other errors if I try different options but this one seems to always come up when I default to the base settings.

This happens with different files all run with DIA. This also happens with files that used to work with FragPipe v21. FragPipe v22 works with a DDA workflow. I have tried unzipping into a new directory, and this also happens with a different user.

Has anyone encountered this? Please help. Thanks!

log_2024-06-12_14-35-38.txt

fcyu commented

Thanks for the feedback.

We have also seen a similar error. It is because one of the Python packages, matplotlib, is too old. @guoci has fixed it in Nesvilab/easypqp@5000f8e

For the current version, could you open the cmd.exe and run the following commands to upgrade matplotlib?

pip uninstall matplotlib
pip install matplotlib>=3.5.1

Best,

Fengchao

Thanks for the quick reply Fengchao. I've updated matplotlib as you suggested.

It runs a bit further but then I see another outdated Python module:
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib_init_.py", line 287, in _check_versions
raise ImportError(f"Matplotlib requires {modname}>={minver}; "
ImportError: Matplotlib requires numpy>=1.23; you have 1.22.4

When I check my numpy version using the Anaconda prompt, it seems to have version 1.26.4.
(base) C:\Windows\system32>pip freeze | findstr numpy
numpy==1.26.4

Why is it FragPipe/matplotlib seeing a different version of numpy? I am using the Anaconda distribution as specified in the Config tools page. Thanks!

fcyu commented

I guess the numpy you checked is not the one in the Python you specified in FragPipe.

Best,

Fengchao

Thanks Fengchao. I wound up uninstalling/reinstalling Python and it's working now.