Skip to content

Commit

Permalink
#299: review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mschwoer committed Aug 14, 2024
1 parent 3e6e811 commit 0bfb56f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions alphadia/constants/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ general:
wsl: false
mmap_detector_events: false
use_gpu: true
# whether to save the (MBR) library to the output directory
save_library: True
save_mbr_library: True
# whether to save the libraries to the output directory
save_library: True # input library
save_mbr_library: True # output library

library_loading:
rt_heuristic: 180
Expand Down
7 changes: 1 addition & 6 deletions alphadia/outputtransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ def build(
_ = self.build_library(
base_spec_lib,
psm_df=psm_df,
save=self.config["general"]["save_mbr_library"],
)

if self.config["transfer_library"]["enabled"]:
Expand Down Expand Up @@ -775,7 +774,6 @@ def build_library(
self,
base_spec_lib: base.SpecLibBase,
psm_df: pd.DataFrame | None = None,
save: bool = True,
):
"""Build spectral library
Expand All @@ -788,9 +786,6 @@ def build_library(
psm_df: Union[pd.DataFrame, None]
Combined precursor table. If None, the precursor table is loaded from disk.
save: bool
Save the generated spectral library to disk
"""
logger.progress("Building spectral library")

Expand All @@ -812,7 +807,7 @@ def build_library(
f"MBR spectral library contains {precursor_number:,} precursors, {protein_number:,} proteins"
)

if save:
if self.config["general"]["save_mbr_library"]:
logger.info("Writing MBR spectral library to disk")
mbr_spec_lib.save_hdf(os.path.join(self.output_folder, "speclib.mbr.hdf"))

Expand Down

0 comments on commit 0bfb56f

Please sign in to comment.