epigenelabs / inmoose

InMoose is the INtegrated Multi Omic Open Source Environment. It is a collection of tools for the analysis of omic data.
GNU General Public License v3.0
51 stars 5 forks source link

Bug: Error in pycombat_seq due to DataFrame conversion in DGEList.py #93

Open sajaddarabi opened 5 days ago

sajaddarabi commented 5 days ago

Description: When running the function pycombat_seq(counts.T, batch).T in inmoose/edgepy/DGEList.py, here counts is a np.array an error occurs at lines 125-128. The issue arises because counts is converted to a DataFrame, and the lines check_range = (np.amin(y), np.nanmax(y)) in inmoose/edgepy/utils.py do not result in a single value but rather a series.

Steps to Reproduce:

  1. Run the function pycombat_seq(counts.T, batch).T using counts np.array
  2. Observe the error at lines 125-128.

Expected Behavior: The function should execute without errors, and check_range tuple should include single values in its entries

Actual Behavior: The function throws an error because check_range results in a series instead of a single value.

EpigeneMax commented 4 days ago

Hi @sajaddarabi, thanks for reporting this.

Sounds similar to #79, i.e. numpy having inconsistent behavior between ndarray and pandas.DataFrame.

Could you please share the version of numpy and pandas you are using so that we can investigate the issue?