Skip to content

Commit e115b91

Browse files
committed
Fix kcat bug #26 thanks to @yaccos
1 parent 180e382 commit e115b91

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

autopacmen/submodules/get_reactions_kcat_mapping.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,9 @@ def _get_kcat_from_protein_kcat_database(searched_direction: str, reaction: cobr
5959
if gene_name not in protein_kcat_database.keys():
6060
continue
6161
kcat_direction = protein_kcat_database[gene_name]["direction"][reaction.id]
62-
max_kcat = max(protein_kcat_database[gene_name]["kcats"])
6362

64-
if kcat_direction == searched_direction == "forward":
65-
max_kcats.append(max_kcat)
66-
else:
63+
if kcat_direction == searched_direction:
64+
max_kcat = max(protein_kcat_database[gene_name]["kcats"])
6765
max_kcats.append(max_kcat)
6866

6967
# Get the minimal maximal kcat and return it :D

0 commit comments

Comments
 (0)