# HG changeset patch # User bimib # Date 1730974151 0 # Node ID 49fb0556242ff0eed39a41774ff16da968f8ec12 # Parent a95ac9ae96489d3b85dbd7632d839d2ecd11e03a Uploaded diff -r a95ac9ae9648 -r 49fb0556242f COBRAxy/marea_cluster.py --- 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')