methylprep
methylprep copied to clipboard
methylprep not working with pandas version >2 due to API changes
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:
- Bump the requirement to >2 and adapt the corresponding change
- Limit the requirement to <2
- Check pandas version and use different functions accordingly