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

methylprep not working with pandas version >2 due to API changes #125

Open
kptoemail opened this issue Jul 19, 2023 · 0 comments
Open

methylprep not working with pandas version >2 due to API changes #125

kptoemail opened this issue Jul 19, 2023 · 0 comments

Comments

@kptoemail
Copy link

Exception raised when running a pipeline:

Traceback (most recent call last):
File "", line 1, in
File "/home/paul/miniconda3/lib/python3.11/site-packages/methylprep/processing/pipeline.py", line 331, in run_pipeline
data_container = SampleDataContainer(
^^^^^^^^^^^^^^^^^^^^
File "/home/paul/miniconda3/lib/python3.11/site-packages/methylprep/processing/pipeline.py", line 590, in init
infer_type_I_probes(self, debug=self.debug)
File "/home/paul/miniconda3/lib/python3.11/site-packages/methylprep/processing/infer_channel_switch.py", line 19, in infer_type_I_probes
channels = get_infer_channel_probes(container.manifest, container.green_idat, container.red_idat, debug=debug)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paul/miniconda3/lib/python3.11/site-packages/methylprep/processing/infer_channel_switch.py", line 171, in get_infer_channel_probes
oobG_IG = oobG.append(green_in_band).sort_index()
^^^^^^^^^^^
File "/home/paul/miniconda3/lib/python3.11/site-packages/pandas/core/generic.py", line 5989, in getattr
return object.getattribute(self, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?

It seems this is the reason:
https://stackoverflow.com/questions/75956209/dataframe-object-has-no-attribute-append
Problem's solved if I downgrade to pandas 1.5.3

Suggested change:

  1. Bump the requirement to >2 and adapt the corresponding change
  2. Limit the requirement to <2
  3. Check pandas version and use different functions accordingly
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

1 participant