Skip to content

Issue with DunedinPACE model #195

@plbaldoni

Description

@plbaldoni

Hello,

Thanks for maintaining biolearn. I am getting the following error when computing the DunedinPACE clock:

Traceback (most recent call last):
  File "/ix1/pbaldoni/baldoni/Methylation/code/biolearn-clock/clock.py", line 30, in <module>
    DunedinPACE_results = gallery.get("DunedinPACE").predict(data)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/pbaldoni/baldoni/ix1/software/envs/biolearn-python3.11/lib/python3.11/site-packages/biolearn/model.py", line 1144, in predict
    matrix_data = self.preprocess(matrix_data)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/pbaldoni/baldoni/ix1/software/envs/biolearn-python3.11/lib/python3.11/site-packages/biolearn/dunedin_pace.py", line 37, in dunedin_pace_normalization
    dataframe_normalized = quantile_normalize_using_target(
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/pbaldoni/baldoni/ix1/software/envs/biolearn-python3.11/lib/python3.11/site-packages/biolearn/dunedin_pace.py", line 61, in quantile_normalize_using_target
    column_data[has_decimal_above_0_4] = 0.5 * (
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
ValueError: assignment destination is read-only

Oddly, this error did not occur in the past with exactly the same data when I ran biolearn with Python 3.10.

What could be happening here?

Cheers,
Pedro

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions