Skip to content

Commit 48c089f

Browse files
Merge pull request ModelSEED#94 from ModelSEED/update_travis
empty reactions are printed but not errors
2 parents addc8a8 + e763bac commit 48c089f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Scripts/Validation/Validate_Reactions_JSON.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_atom_count(compoundDict, complist):
2323
if not pair[1]:
2424
atom_counts[pair[0]] += float(stoich)
2525
else:
26-
atom_counts[pair[0]] += int(pair[1]) * float(stoich)
26+
atom_counts[pair[0]] += float(pair[1]) * float(stoich)
2727
atom_counts = Counter({k: round(v, 1) for k, v in atom_counts.items()})
2828
return atom_counts
2929

@@ -91,6 +91,9 @@ def check_compounds(_rxns, verbose, compound_loc='./Biochemistry/compounds.json'
9191
print('Unbalanced reaction marked OK {}\n{}\n{}'
9292
.format(id, reactant_atoms, product_atoms))
9393
err['unbalanced_marked_OK'] += 1
94+
if rxn['status'] == "EMPTY":
95+
print("Empty Reaction: " + id)
96+
continue
9497
if comp_ids ^ set(list(reactants.keys()) + list(products.keys())):
9598
if verbose:
9699
print('"compound_ids" and "equation" are inconsistant in {}:\n{}\n{}'

0 commit comments

Comments
 (0)