Skip to content

Commit

Permalink
fix cutoff comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
michabirklbauer committed Jan 24, 2024
1 parent 6bff9c3 commit 5f5871d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions msannika_fdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5f5871d

Please sign in to comment.