Skip to content

Commit

Permalink
cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Nov 20, 2024
1 parent cdfd46d commit 4641e5e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion alphabase/psm_reader/dia_psm_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SpectronautReader(MaxQuantReader):
_reader_type = "spectronaut"
_add_unimod_to_mod_mapping = True
_min_max_rt_norm = True
_fixed_c57 = False
_fixed_c57_default = False

def _pre_process(self, df: pd.DataFrame) -> pd.DataFrame:
"""Spectronaut-specific preprocessing of output data."""
Expand Down
11 changes: 6 additions & 5 deletions alphabase/psm_reader/maxquant_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,19 @@ class MaxQuantReader(PSMReaderBase):
_reader_type = "maxquant"
_add_unimod_to_mod_mapping = True
_modification_type = "maxquant"
_fixed_c57 = True
_fixed_c57_default = True

def __init__( # noqa: PLR0913, D417 # too many arguments in function definition, missing argument descriptions
self,
*,
column_mapping: Optional[dict] = None,
modification_mapping: Optional[dict] = None,
mod_seq_columns: Optional[List[str]] = None,
fdr: float = 0.01,
keep_decoy: bool = False,
fixed_C57: Optional[bool] = None, # noqa: N803 TODO: make this *,fixed_c57 (breaking)
mod_seq_columns: Optional[List[str]] = None,
rt_unit: str = "minute",
# MaxQuant reader-specific
fixed_C57: Optional[bool] = None, # noqa: N803 TODO: make this *,fixed_c57 (breaking)
**kwargs,
):
"""Reader for MaxQuant msms.txt and evidence.txt.
Expand All @@ -158,14 +159,14 @@ def __init__( # noqa: PLR0913, D417 # too many arguments in function definition
super().__init__(
column_mapping=column_mapping,
modification_mapping=modification_mapping,
mod_seq_columns=mod_seq_columns,
fdr=fdr,
keep_decoy=keep_decoy,
rt_unit=rt_unit,
mod_seq_columns=mod_seq_columns,
**kwargs,
)

self.fixed_C57 = fixed_C57 if fixed_C57 is not None else self._fixed_c57
self.fixed_C57 = fixed_C57 if fixed_C57 is not None else self._fixed_c57_default

def _translate_decoy(self) -> None:
if PsmDfCols.DECOY in self._psm_df.columns:
Expand Down
1 change: 1 addition & 0 deletions alphabase/psm_reader/msfragger_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def __init__( # noqa: PLR0913, D417 # too many arguments in function definition
*,
column_mapping: Optional[dict] = None,
modification_mapping: Optional[dict] = None,
# mod_seq_columns: Optional[List[str]] = None,# TODO: not needed here?
fdr: float = 0.001, # refers to E-value in the PepXML
keep_decoy: bool = False,
rt_unit: str = "second",
Expand Down
1 change: 1 addition & 0 deletions alphabase/psm_reader/sage_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ def __init__( # noqa: PLR0913, D417 # too many arguments in function definition
*,
column_mapping: Optional[dict] = None,
modification_mapping: Optional[dict] = None,
# mod_seq_columns: Optional[List[str]] = None, # TODO: not needed here?
fdr: float = 0.01,
keep_decoy: bool = False,
rt_unit: str = "second",
Expand Down

0 comments on commit 4641e5e

Please sign in to comment.