Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor config #411

Open
wants to merge 15 commits into
base: add_unit_test_for_config
Choose a base branch
from
5 changes: 5 additions & 0 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
- name: Conda info
shell: bash -l {0}
run: conda info
- name: Install mono
shell: bash -l {0}
run: |
conda install mono

- name: Perform pip installation with all stable dependencies
shell: bash -l {0}
run: |
Expand Down
19 changes: 16 additions & 3 deletions alphadia/constants/default.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# configuration for the extraction plan
version: 1

library: null
output_directory: null
raw_path_list: []
output: null

general:
thread_count: 10
# maximum number of threads or processes to use per raw file
Expand All @@ -26,7 +31,7 @@ library_prediction:
variable_modifications: 'Oxidation@M;Acetyl@Protein_N-term'
max_var_mod_num: 2
missed_cleavages: 1
precursor_len:
precursor_len: # TODO: make this min/max ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way how the gui interacts with the config makes it easier if this is a treated like a fixed length tuple.

- 7
- 35
precursor_charge:
Expand All @@ -53,6 +58,9 @@ library_prediction:

# define custom alphabase modifications not part of unimod or alphabase
# also used for decoy channels
# TODO make this a list
# - name: Dimethyl:d12@K
# composition: H(-2)2H(8)13C(2)
custom_modifications:
# Dimethyl @K channel decoy
Dimethyl:d12@K:
Expand Down Expand Up @@ -191,8 +199,12 @@ library_multiplexing:
# channels can be either a number or a string
# for every channel, the library gets copied and the modifications are translated according to the mapping
# the following example shows how to multiplex mTRAQ to three sample channels and a decoy channel
# TODO make this a list
# - channel_name: 0
# channel_modifications:
# mTRAQ@K: mTRAQ@K
# mTRAQ@Any_N-term: mTRAQ@Any_N-term
multiplex_mapping: {}

#0:
# mTRAQ@K: mTRAQ@K
# mTRAQ@Any_N-term: mTRAQ@Any_N-term
Expand Down Expand Up @@ -373,11 +385,12 @@ transfer_learning:
# instrument type encoded during training
instrument: 'Lumos'


# configuration for the calibration manager
# the config has to start with the calibration keyword and consists of a list of calibration groups.
# each group consists of datapoints which have multiple properties.
# This can be for example precursors (mz, rt ...), fragments (mz, ...), quadrupole (transfer_efficiency)
calibration_manager:
calibration_manager: # TODO move to a separate file or hard-code
- name: fragment
estimators:
- name: mz
Expand Down
2 changes: 1 addition & 1 deletion alphadia/search_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def _init_config(
extra_config["output"] = output_folder
config_updates.append(extra_config_update)

config.update(config_updates, print_modifications=True)
config.update(config_updates, do_print=True)

if "output" not in config:
config["output"] = output_folder
Expand Down
Loading
Loading