Skip to content

Commit

Permalink
add decoy filter
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgWa committed Sep 15, 2024
1 parent 7fa7f28 commit 7a1e03e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion alphadia/workflow/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,9 @@ def update_with_fdr(self, precursor_df: pd.DataFrame):
The precursor dataframe for the current batch of the optimization lock (from workflow.perform_fdr).
"""

self._precursor_at_fdr_count = np.sum(precursor_df["qval"] < 0.01)
self._precursor_at_fdr_count = np.sum(
(precursor_df["qval"] < 0.01) & (precursor_df["decoy"] == 0)
)
self.has_target_num_precursors = (
self._precursor_at_fdr_count >= self._precursor_target_count
)
Expand Down

0 comments on commit 7a1e03e

Please sign in to comment.