Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion metaspace/engine/sm/engine/annotation/fdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def score_to_fdr_map(
cumulative_targets = cumulative_targets + 1
cumulative_decoys = cumulative_decoys + 1

fdrs = cumulative_decoys / decoy_ratio / cumulative_targets
weighted_decoys = cumulative_decoys / decoy_ratio
fdrs = weighted_decoys / (cumulative_targets + weighted_decoys)
fdrs[cumulative_targets == 0] = 1 # Fix NaNs when decoys come before targets

if monotonic:
Expand Down