Commit 65e3c86b authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

Proper assert when a molecule of interest was not found

parent 1aef904c
......@@ -215,6 +215,8 @@ def filter_trajectories(trajectories, molecules_of_interest):
filtered_macs = tuple(sol for sol, trajectory_places in trajectories
if entity_is_in_trajectory(sol, trajectory_places))
assert filtered_macs, "No molecule of interest was found."
return filtered_macs, binary_interactions
......@@ -342,7 +344,8 @@ def build_interactions(filtered_macs, binary_interactions):
for data in binary_interactions.iteritems())
# warning: marchera pas si la molec of interest est dans les conditions
# et non dans les places des trajectoires...
molecule_stimuli_interactions = Counter(next(g))
# => Comme si la molecule n'était pas trouvée
molecule_stimuli_interactions = Counter()
[molecule_stimuli_interactions.update(f_bin) for f_bin in g]
return all_genes, all_stimuli, genes_interactions, \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment