Mercurial > repos > bimib > cobraxy
changeset 242:c6d78b0d324d draft
Uploaded
author | francesco_lapi |
---|---|
date | Wed, 15 Jan 2025 10:32:09 +0000 |
parents | 049aa0f4844f |
children | 5aaf15260ca6 |
files | COBRAxy/flux_to_map.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/COBRAxy/flux_to_map.py Mon Jan 13 15:16:18 2025 +0000 +++ b/COBRAxy/flux_to_map.py Wed Jan 15 10:32:09 2025 +0000 @@ -698,8 +698,8 @@ ks_statistic, p_value = st.ks_2samp(dataset1Data, dataset2Data) # Calculate means and standard deviations - mean1 = np.mean(dataset1Data) - mean2 = np.mean(dataset2Data) + mean1 = np.nanmean(dataset1Data) + mean2 = np.nanmean(dataset2Data) std1 = np.std(dataset1Data, ddof=1) std2 = np.std(dataset2Data, ddof=1) @@ -958,8 +958,8 @@ metabMap_median = copy.deepcopy(metabMap) # Compute medians and means - medians = {key: np.round(np.median(np.array(value), axis=1), 6) for key, value in class_pat.items()} - means = {key: np.round(np.mean(np.array(value), axis=1),6) for key, value in class_pat.items()} + medians = {key: np.round(np.nanmedian(np.array(value), axis=1), 6) for key, value in class_pat.items()} + means = {key: np.round(np.nanmean(np.array(value), axis=1),6) for key, value in class_pat.items()} # Normalize medians and means max_flux_medians = max(np.max(np.abs(arr)) for arr in medians.values())