Skip to content

Commit

Permalink
add some docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Nov 22, 2024
1 parent 67044e8 commit 4dd79c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion alphabase/psm_reader/msfragger_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def _translate_decoy(self) -> None:
self._psm_df[PsmDfCols.TO_REMOVE] += self._psm_df[PsmDfCols.DECOY] > 0

def _translate_score(self) -> None:
# evalue score
"""Translate MSFragger evalue to AlphaBase score: the larger the better."""
self._psm_df[PsmDfCols.SCORE] = -np.log(self._psm_df[PsmDfCols.SCORE] + 1e-100)

def _load_modifications(self, origin_df: pd.DataFrame) -> None:
Expand Down
1 change: 1 addition & 0 deletions alphabase/psm_reader/pfind_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def _translate_decoy(self) -> None:
).astype(np.int8)

def _translate_score(self) -> None:
"""Translate pFind pvalue to AlphaBase score: the larger the better."""
self._psm_df[PsmDfCols.SCORE] = -np.log(
self._psm_df[PsmDfCols.SCORE].astype(float) + 1e-100
)
Expand Down

0 comments on commit 4dd79c7

Please sign in to comment.