Skip to content

Commit

Permalink
predict-library: Allow fasta file to be missing from config file if p…
Browse files Browse the repository at this point in the history
…rovided in CLI
  • Loading branch information
RalfG committed May 9, 2024
1 parent a335bf2 commit 1ad181b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ms2pip/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def predict_library(
"""
if fasta_file and config:
# Use provided proteome, but overwrite fasta_file
config["fasta_file"] = fasta_file
config = ProteomeSearchSpace.from_any(config)
config.fasta_file = fasta_file
elif fasta_file and not config:
# Default proteome search space with provided fasta_file
config = ProteomeSearchSpace(fasta_file=fasta_file)
Expand All @@ -177,7 +177,7 @@ def predict_library(
for batch in track(
_into_batches(search_space, batch_size=batch_size),
description="Predicting spectra...",
total = ceil(len(search_space) / batch_size),
total=ceil(len(search_space) / batch_size),
):
logging.disable(logging.CRITICAL)
yield predict_batch(
Expand Down

0 comments on commit 1ad181b

Please sign in to comment.