From 5f5871d1822f15e67f6f11b2914d5e69b61526ab Mon Sep 17 00:00:00 2001 From: Micha Birklbauer Date: Wed, 24 Jan 2024 15:11:54 +0100 Subject: [PATCH] fix cutoff comparison --- msannika_fdr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/msannika_fdr.py b/msannika_fdr.py index ce9aeff..b3c9f04 100644 --- a/msannika_fdr.py +++ b/msannika_fdr.py @@ -159,7 +159,7 @@ def get_cutoff(data: pd.DataFrame, fdr: float) -> float: def validate(data: pd.DataFrame, fdr: float) -> pd.DataFrame: cutoff = MSAnnika_CSM_Validator.get_cutoff(data, fdr) - df = data[data["Combined Score"] > cutoff].copy() + df = data[data["Combined Score"] >= cutoff].copy() if "Confidence" not in df.columns: return df @@ -193,7 +193,7 @@ def get_cutoff(data: pd.DataFrame, fdr: float) -> float: def validate(data: pd.DataFrame, fdr: float) -> pd.DataFrame: cutoff = MSAnnika_Crosslink_Validator.get_cutoff(data, fdr) - df = data[data["Best CSM Score"] > cutoff].copy() + df = data[data["Best CSM Score"] >= cutoff].copy() df["Confidence"] = df.apply(lambda row: "High", axis = 1) return df