changeset 154:49fb0556242f draft

Uploaded
author bimib
date Thu, 07 Nov 2024 10:09:11 +0000
parents a95ac9ae9648
children 3ad3fb730b87
files COBRAxy/marea_cluster.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/marea_cluster.py	Thu Nov 07 10:03:03 2024 +0000
+++ b/COBRAxy/marea_cluster.py	Thu Nov 07 10:09:11 2024 +0000
@@ -135,7 +135,7 @@
     return dataset
 
 ############################ rewrite_input ###################################
-def rewrite_input(dataset :pd.DataFrame) -> Dict[str, List[Optional[float]]]:
+def rewrite_input(dataset :Dict) -> Dict[str, List[Optional[float]]]:
     """
     Rewrite the dataset as a dictionary of lists instead of as a dictionary of dictionaries.
 
@@ -147,7 +147,6 @@
     """
     #Riscrivo il dataset come dizionario di liste, 
     #non come dizionario di dizionari
-    dataset = dataset.iloc[:, 1:]
     #dataset.pop('Reactions', None)
     
     for key, val in dataset.items():
@@ -506,6 +505,7 @@
     #Data read
     
     X = read_dataset(args.input)
+    X = X.iloc[:, 1:]
     X = pd.DataFrame.to_dict(X, orient='list')
     X = rewrite_input(X)
     X = pd.DataFrame.from_dict(X, orient = 'index')