Skip to content

Commit

Permalink
Merge pull request #466 from MannLabs/config_simplifications
Browse files Browse the repository at this point in the history
Config simplifications
  • Loading branch information
mschwoer authored Feb 19, 2025
2 parents 86fee44 + 421099d commit a136f17
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions alphadia/constants/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ library_prediction:
# set path for custom peptdeep model. If set to null, the default model will be used
peptdeep_model_path: null

# set peptdeep model type. Possible values are 'generic', 'phospho', 'digly'. If set to null, the generic model will be used
peptdeep_model_type: null
# set peptdeep model type. Possible values are 'generic', 'phospho', 'digly'.
peptdeep_model_type: 'generic'

# define custom alphabase modifications not part of unimod or alphabase
# also used for decoy channels
Expand Down Expand Up @@ -96,7 +96,7 @@ custom_modifications:
composition: C(12)

search:
channel_filter: '0'
channel_filter: "" # will be mapped to "0" -> load only the default unmultiplexed channel
exclude_shared_ions: True
compete_for_fragments: True

Expand Down
7 changes: 4 additions & 3 deletions alphadia/libtransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def __init__(
peptdeep_model_type : str, optional
Use other peptdeep models provided by the peptdeep model manager.
Default is None, which means the peptdeep default model ("generic") is being used.
Default is None, which means the default model provided by peptdeep (e.g. "generic" for version 1.4.0) is being used.
Possible values are ['generic','phospho','digly']
fragment_types : list[str], optional
Expand Down Expand Up @@ -326,12 +326,13 @@ def forward(self, input: SpecLibBase) -> SpecLibBase:

model_mgr = ModelManager(device=device)

# will load other model than default generic
if self.peptdeep_model_type:
logging.info(f"Loading PeptDeep models of type {self.peptdeep_model_type}")
model_mgr.load_installed_models(self.peptdeep_model_type)
else:
logging.info("Using PeptDeep default model.")

if self.peptdeep_model_path and self.peptdeep_model_path != "":
if self.peptdeep_model_path:
if not os.path.exists(self.peptdeep_model_path):
raise ValueError(
f"PeptDeep model checkpoint folder {self.peptdeep_model_path} does not exist"
Expand Down
2 changes: 1 addition & 1 deletion gui/workflows/PeptideCentric.v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
"id": "channel_filter",
"name": "Channel Filter",
"default": "",
"description": "Comma separated list eg. 1,2,3. Only precursors with matching channels will be loaded. Leave empty to load all available channels.",
"description": "Comma separated list eg. 1,2,3. Only precursors with matching channels will be loaded. Leave empty to load only the default unmultiplexed channel (0).",
"type": "string"
},
{
Expand Down

0 comments on commit a136f17

Please sign in to comment.