Skip to content

Commit

Permalink
Merge pull request #112 from Proteobench/Module-specific-toml
Browse files Browse the repository at this point in the history
Module specific toml
  • Loading branch information
scaramonche authored Sep 26, 2023
2 parents f65b363 + c796d92 commit 60d8ae6
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 90 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,6 @@ LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03 = "Condition_B_Sample_Alpha_03"
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = true
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03 = "Condition_B_Sample_Alpha_03"
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 0.5

[species_expected_ratio.ECOLI]
"1|2" = 1.5

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = true
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,6 @@ LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03 = 2
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_01|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_01" = 2.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_02|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_02" = 2.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_03|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_01|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_01" = 0.25
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_02|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_02" = 0.25
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_03|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_01|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_01" = 1.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_02|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_02" = 1.0
"LFQ_Orbitrap_DDA_Condition_A_Sample_Alpha_03|LFQ_Orbitrap_DDA_Condition_B_Sample_Alpha_03" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = true
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ Charge = "Charge"
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = false
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ abundance_DDA_Condition_B_Sample_Alpha_03 = 2
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = true
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = false
min_count_multispec = 1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
protein_group = "Proteins"
"modified_peptide" = "Modified sequence"


[replicate_mapper]
abundance_A_1 = 1
abundance_A_2 = 1
Expand All @@ -24,17 +23,6 @@ abundance_B_3 = "Condition_B_Sample_Alpha_03"
"_ECOLI" = "ECOLI"
"_HUMAN" = "HUMAN"

[species_expected_ratio]
[species_expected_ratio.YEAST]
"1|2" = 2.0

[species_expected_ratio.ECOLI]
"1|2" = 0.25

[species_expected_ratio.HUMAN]
"1|2" = 1.0

[general]
contaminant_flag = "Cont_"
decoy_flag = true
min_count_multispec = 1
decoy_flag = true
8 changes: 6 additions & 2 deletions proteobench/modules/dda_quant/parse_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"Custom" : os.path.join(PARSE_SETTINGS_DIR, 'parse_settings_custom.toml')
}

PARSE_SETTINGS_FILES_MODULE = os.path.join(PARSE_SETTINGS_DIR, 'module_settings.toml')

# ! Could be created from keys of PARSE_SETTINGS_FILES
INPUT_FORMATS = ("MaxQuant",
"AlphaPept",
Expand Down Expand Up @@ -51,8 +53,10 @@ def __init__(self, input_format:str):
self.decoy_flag = parse_settings["general"]["decoy_flag"]
self.species_dict = parse_settings["species_mapper"]
self.contaminant_flag = parse_settings["general"]["contaminant_flag"]
self.min_count_multispec = parse_settings["general"]["min_count_multispec"]
self.species_expected_ratio = parse_settings["species_expected_ratio"]

parse_settings_module = toml.load(PARSE_SETTINGS_FILES_MODULE)
self.min_count_multispec = parse_settings_module["general"]["min_count_multispec"]
self.species_expected_ratio = parse_settings_module["species_expected_ratio"]


def parse_settings(input_format:str) -> Settings:
Expand Down

0 comments on commit 60d8ae6

Please sign in to comment.