Skip to content

Commit

Permalink
handle nan values from decoys
Browse files Browse the repository at this point in the history
  • Loading branch information
michabirklbauer committed Jun 19, 2024
1 parent f099de4 commit f9b7301
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 @@ -6,7 +6,7 @@
# [email protected]

# version tracking
__version = "1.1.4"
__version = "1.1.5"
__date = "2024-06-19"

# REQUIREMENTS
Expand Down Expand Up @@ -66,7 +66,7 @@ def get_xl_position_in_protein(row: pd.Series, alpha: bool) -> int:
positions = [float(pos) + float(row["Crosslinker Position A"]) for pos in str(row["A in protein"]).split(";")]
else:
positions = [float(pos) + float(row["Crosslinker Position B"]) for pos in str(row["B in protein"]).split(";")]
return ";".join([str(int(pos)) for pos in positions])
return ";".join([str(int(pos)) for pos in positions if not pd.isna(pos)])

@staticmethod
def get_best_csm_score(csms: List[pd.Series]) -> float:
Expand Down

0 comments on commit f9b7301

Please sign in to comment.