Mercurial > repos > bimib > cobraxy
comparison COBRAxy/flux_to_map.py @ 244:ccb4ae0e01b3 draft
Uploaded
author | francesco_lapi |
---|---|
date | Wed, 15 Jan 2025 10:52:04 +0000 |
parents | 5aaf15260ca6 |
children | 58037c24c716 |
comparison
equal
deleted
inserted
replaced
243:5aaf15260ca6 | 244:ccb4ae0e01b3 |
---|---|
698 ks_statistic, p_value = st.ks_2samp(dataset1Data, dataset2Data) | 698 ks_statistic, p_value = st.ks_2samp(dataset1Data, dataset2Data) |
699 | 699 |
700 # Calculate means and standard deviations | 700 # Calculate means and standard deviations |
701 mean1 = np.nanmean(dataset1Data) | 701 mean1 = np.nanmean(dataset1Data) |
702 mean2 = np.nanmean(dataset2Data) | 702 mean2 = np.nanmean(dataset2Data) |
703 std1 = np.std(dataset1Data, ddof=1) | 703 std1 = np.nanstd(dataset1Data, ddof=1) |
704 std2 = np.std(dataset2Data, ddof=1) | 704 std2 = np.nanstd(dataset2Data, ddof=1) |
705 | 705 |
706 n1 = len(dataset1Data) | 706 n1 = len(dataset1Data) |
707 n2 = len(dataset2Data) | 707 n2 = len(dataset2Data) |
708 | 708 |
709 # Calculate Z-score | 709 # Calculate Z-score |
877 vectors[name] = np.zeros_like(vector) # Sostituisci con un vettore di zeri | 877 vectors[name] = np.zeros_like(vector) # Sostituisci con un vettore di zeri |
878 | 878 |
879 # Riassegna i vettori aggiornati | 879 # Riassegna i vettori aggiornati |
880 lact_glc, lact_gln, lact_o2, glu_gln = vectors['lact_glc'], vectors['lact_gln'], vectors['lact_o2'], vectors['glu_gln'] | 880 lact_glc, lact_gln, lact_o2, glu_gln = vectors['lact_glc'], vectors['lact_gln'], vectors['lact_o2'], vectors['glu_gln'] |
881 | 881 |
882 print(vectors) | |
882 # Create a DataFrame for the new rows | 883 # Create a DataFrame for the new rows |
883 new_rows = pd.DataFrame({ | 884 new_rows = pd.DataFrame({ |
884 dataset.index.name: ['LactGlc', 'LactGln','LactO2', 'GluGln'], | 885 dataset.index.name: ['LactGlc', 'LactGln','LactO2', 'GluGln'], |
885 **{col: [lact_glc[i], lact_gln[i],lact_o2[i], glu_gln[i]] for i, col in enumerate(dataset.columns)} | 886 **{col: [lact_glc[i], lact_gln[i],lact_o2[i], glu_gln[i]] for i, col in enumerate(dataset.columns)} |
886 }) | 887 }) |