Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with newer versions of Pandas #37

Open
bolak92 opened this issue Aug 23, 2023 · 3 comments
Open

Incompatibility with newer versions of Pandas #37

bolak92 opened this issue Aug 23, 2023 · 3 comments

Comments

@bolak92
Copy link

bolak92 commented Aug 23, 2023

Hello,

I am experiencing many issues with calling the data import functionalities either through the python module or the GUI.
This, I believe, is happening because of incompatibilities with the newer versions of Pandas - it works only if I strict pandas at version 1.3, but this is not convenient as the virtual environment is needed for other application that uses the newer pandas.

After some debugging, it seems that either some arguments in pandas has changed, while their name is still the same in MsPypeline.

Regards, Bola

@siheming
Copy link
Owner

Hi Bola,

could you post some of the errors you are seeing to help me check what I should look for?

Best Simon

@bolak92
Copy link
Author

bolak92 commented Sep 1, 2023

From the GUI, I get this warning for example:

C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\file_reader\MQReader.py:181: DtypeWarning: Columns (5,6,728,729) have mixed types. Specify dtype option on import or set low_memory=False.
  df = pd.read_csv(file_dir, sep="\t")

and

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\tkinter\__init__.py", line 1892, in __call__
    return self.func(*args)
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPypeline.py", line 169, in <lambda>
    command=lambda: self.report_button())
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPypeline.py", line 388, in report_button
    mspplots = self.selected_reader.plotter.from_MSPInitializer(self.mspinit)
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPPlots\MaxQuantPlotter.py", line 76, in from_MSPInitializer
    return super().from_MSPInitializer(mspinit_instance, **default_kwargs)
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPPlots\BasePlotter.py", line 209, in from_MSPInitializer
    return cls(**default_kwargs)
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPPlots\MaxQuantPlotter.py", line 55, in __init__
    super().__init__(
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPPlots\BasePlotter.py", line 160, in __init__
    self.add_intensity_column(option_name, name_in_file, name_in_plot)
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\core\MSPPlots\BasePlotter.py", line 318, in add_intensity_column
    f"{option_name}": DataTree.from_analysis_design(
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\modules\DataStructure.py", line 253, in from_analysis_design
    c.aggregate_technical_replicates()
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\modules\DataStructure.py", line 353, in aggregate_technical_replicates
    parent.data = parent.aggregate()
  File "C:\ProgramData\Anaconda3\envs\upprot\lib\site-packages\mspypeline\modules\DataStructure.py", line 137, in aggregate
    data = pd.concat(data, axis=1)
  File "C:\Users\bkhalil\AppData\Roaming\Python\Python38\site-packages\pandas\core\reshape\concat.py", line 372, in concat
    op = _Concatenator(
  File "C:\Users\bkhalil\AppData\Roaming\Python\Python38\site-packages\pandas\core\reshape\concat.py", line 429, in __init__
    raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate

@siheming
Copy link
Owner

siheming commented Sep 4, 2023

Hey, the first message is, as you pointed out, only a warning, and can be ignored. The second message seems like a configuration error to me. Do you have a installation with an older pandas version where this worked?
Here it seems like you specified that the file has technical replicates, but they cant be found?
However, I have not worked with this software for more than two years, so I am not certain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants