From d822f619eccd85b16d1d96e266e3266941add0d4 Mon Sep 17 00:00:00 2001 From: Witold Wolski Date: Fri, 17 Jan 2025 17:16:09 +0100 Subject: [PATCH] fix test errors after adding parameter --- .gitignore | 3 +++ proteobench/io/params/alphapept.py | 2 +- proteobench/io/params/diann.py | 2 +- proteobench/io/params/fragger.py | 3 +++ proteobench/io/params/spectronaut.py | 2 +- test/params/DIANN_1.7.16.log.csv | 1 + test/params/DIANN_WU304578_report.log.csv | 1 + test/params/DIANN_output_20240229_report.log.csv | 1 + test/params/ProlineStudio_241024.csv | 1 + test/params/ProlineStudio_withMBR.csv | 1 + test/params/Proline_example_2.csv | 1 + test/params/Proline_example_w_Mascot_wo_proteinSets.csv | 1 + test/params/Version1_9_Predicted_Library_report.log.csv | 1 + test/params/alphapept_0.4.9.csv | 1 + test/params/alphapept_0.4.9_unnormalized.csv | 1 + test/params/fragpipe_extracted_params.csv | 1 + test/params/fragpipe_v22_extracted_params.csv | 1 + test/params/fragpipe_win_paths_extracted_params.csv | 1 + .../i2mproteobench_2pep_fdr01psm_fdr01prot_xtandem_sel.csv | 1 + test/params/i2mproteobench_params_sage_sel.csv | 1 + test/params/i2mq_result_parameters_sel.csv | 1 + test/params/mqpar1.5.3.30_MBR_sel.json | 3 ++- test/params/mqpar_MQ1.6.3.3_MBR_sel.json | 3 ++- test/params/mqpar_MQ2.1.3.0_noMBR_sel.json | 3 ++- test/params/mqpar_mq2.6.2.0_1mc_MBR_sel.json | 3 ++- ...xperiment1_ExperimentSetupOverview_BGS_Factory_Settings.csv | 1 + 26 files changed, 34 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3a54c1d9..588634d2 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,6 @@ results.json # secrets **/.streamlit/secrets.toml + +# wew +build.sh diff --git a/proteobench/io/params/alphapept.py b/proteobench/io/params/alphapept.py index 43700172..614540d3 100644 --- a/proteobench/io/params/alphapept.py +++ b/proteobench/io/params/alphapept.py @@ -66,7 +66,7 @@ def extract_params(fname: pathlib.Path) -> ProteoBenchParameters: params.min_precursor_charge = record["features"]["iso_charge_min"] params.max_precursor_charge = record["features"]["iso_charge_max"] params.enable_match_between_runs = record["workflow"]["match"] # Check if matching is enabled - + params.abundance_normalization_ions = None # No normalization in AlphaPept return params diff --git a/proteobench/io/params/diann.py b/proteobench/io/params/diann.py index 7f4e85a2..ef25eca5 100644 --- a/proteobench/io/params/diann.py +++ b/proteobench/io/params/diann.py @@ -346,7 +346,7 @@ def extract_params(fname: str) -> ProteoBenchParameters: # If scan window is not customely set, extract it from the log file parameters["scan_window"] = int(extract_with_regex(lines, scan_window_regex)) - + parameters["abundance_normalization_ions"] = None return ProteoBenchParameters(**parameters) diff --git a/proteobench/io/params/fragger.py b/proteobench/io/params/fragger.py index 664c32f0..070708c6 100644 --- a/proteobench/io/params/fragger.py +++ b/proteobench/io/params/fragger.py @@ -156,10 +156,13 @@ def extract_params(file: BytesIO) -> ProteoBenchParameters: params.ident_fdr_protein = fragpipe_params.loc["ionquant.proteinfdr"] params.ident_fdr_peptide = fragpipe_params.loc["ionquant.peptidefdr"] params.ident_fdr_psm = fragpipe_params.loc["ionquant.ionfdr"] + params.abundance_normalization_ions = fragpipe_params.loc["ionquant.normalization"] + elif fragpipe_params.loc["diann.run-dia-nn"] == "true": params.ident_fdr_protein = fragpipe_params.loc["diann.q-value"] params.ident_fdr_peptide = fragpipe_params.loc["diann.q-value"] params.ident_fdr_psm = fragpipe_params.loc["diann.q-value"] + params.abundance_normalization_ions = None # Precursor charge settings if fragpipe_params.loc["msfragger.override_charge"] == "true": diff --git a/proteobench/io/params/spectronaut.py b/proteobench/io/params/spectronaut.py index 54d80e0f..a7c0c3a2 100644 --- a/proteobench/io/params/spectronaut.py +++ b/proteobench/io/params/spectronaut.py @@ -128,7 +128,7 @@ def read_spectronaut_settings(file_path: str) -> ProteoBenchParameters: params.second_pass = extract_value(lines, "directDIA Workflow:") params.protein_inference = extract_value(lines, "Inference Algorithm:") # or Protein Inference Workflow: params.predictors_library = extract_value(lines, "Hybrid (DDA + DIA) Library").replace(":", "").strip() - + params.abundance_normalization_ions = extract_value(lines, "Cross-Run Normalization:") return params diff --git a/test/params/DIANN_1.7.16.log.csv b/test/params/DIANN_1.7.16.log.csv index c723259d..2eacf877 100644 --- a/test/params/DIANN_1.7.16.log.csv +++ b/test/params/DIANN_1.7.16.log.csv @@ -23,3 +23,4 @@ quantification_method,QuantUMS high-precision second_pass,False protein_inference, predictors_library,"{'RT': 'DIANN', 'IM': 'DIANN', 'MS2_int': 'DIANN'}" +abundance_normalization_ions, diff --git a/test/params/DIANN_WU304578_report.log.csv b/test/params/DIANN_WU304578_report.log.csv index 5938179c..a24818b0 100644 --- a/test/params/DIANN_WU304578_report.log.csv +++ b/test/params/DIANN_WU304578_report.log.csv @@ -23,3 +23,4 @@ quantification_method,QuantUMS high-precision second_pass,False protein_inference, predictors_library,"{'RT': 'DIANN', 'IM': 'DIANN', 'MS2_int': 'DIANN'}" +abundance_normalization_ions, diff --git a/test/params/DIANN_output_20240229_report.log.csv b/test/params/DIANN_output_20240229_report.log.csv index 3070b0b9..af0661ca 100644 --- a/test/params/DIANN_output_20240229_report.log.csv +++ b/test/params/DIANN_output_20240229_report.log.csv @@ -23,3 +23,4 @@ quantification_method,QuantUMS high-accuracy second_pass,True protein_inference,Protein_names predictors_library,"{'RT': 'DIANN', 'IM': 'DIANN', 'MS2_int': 'DIANN'}" +abundance_normalization_ions, diff --git a/test/params/ProlineStudio_241024.csv b/test/params/ProlineStudio_241024.csv index 8a234100..c149cd99 100644 --- a/test/params/ProlineStudio_241024.csv +++ b/test/params/ProlineStudio_241024.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/ProlineStudio_withMBR.csv b/test/params/ProlineStudio_withMBR.csv index 6674d02c..74faeaa3 100644 --- a/test/params/ProlineStudio_withMBR.csv +++ b/test/params/ProlineStudio_withMBR.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/Proline_example_2.csv b/test/params/Proline_example_2.csv index 4c313f67..c2a061cd 100644 --- a/test/params/Proline_example_2.csv +++ b/test/params/Proline_example_2.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/Proline_example_w_Mascot_wo_proteinSets.csv b/test/params/Proline_example_w_Mascot_wo_proteinSets.csv index 0ffe422b..7bd9a40d 100644 --- a/test/params/Proline_example_w_Mascot_wo_proteinSets.csv +++ b/test/params/Proline_example_w_Mascot_wo_proteinSets.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/Version1_9_Predicted_Library_report.log.csv b/test/params/Version1_9_Predicted_Library_report.log.csv index 2a25381e..8864db9a 100644 --- a/test/params/Version1_9_Predicted_Library_report.log.csv +++ b/test/params/Version1_9_Predicted_Library_report.log.csv @@ -23,3 +23,4 @@ quantification_method,QuantUMS high-precision second_pass,True protein_inference,Protein_names predictors_library,"{'RT': 'DIANN', 'IM': 'DIANN', 'MS2_int': 'DIANN'}" +abundance_normalization_ions, diff --git a/test/params/alphapept_0.4.9.csv b/test/params/alphapept_0.4.9.csv index 138a2e1a..2548db8d 100644 --- a/test/params/alphapept_0.4.9.csv +++ b/test/params/alphapept_0.4.9.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/alphapept_0.4.9_unnormalized.csv b/test/params/alphapept_0.4.9_unnormalized.csv index 138a2e1a..2548db8d 100644 --- a/test/params/alphapept_0.4.9_unnormalized.csv +++ b/test/params/alphapept_0.4.9_unnormalized.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/fragpipe_extracted_params.csv b/test/params/fragpipe_extracted_params.csv index dc74514e..dce82d53 100644 --- a/test/params/fragpipe_extracted_params.csv +++ b/test/params/fragpipe_extracted_params.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference,ProteinProphet: --maxppmdiff 2000000 predictors_library, +abundance_normalization_ions,1 diff --git a/test/params/fragpipe_v22_extracted_params.csv b/test/params/fragpipe_v22_extracted_params.csv index c3d46c87..15c491ed 100644 --- a/test/params/fragpipe_v22_extracted_params.csv +++ b/test/params/fragpipe_v22_extracted_params.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference,ProteinProphet: --maxppmdiff 2000000 predictors_library, +abundance_normalization_ions,1 diff --git a/test/params/fragpipe_win_paths_extracted_params.csv b/test/params/fragpipe_win_paths_extracted_params.csv index c21705c6..925ab250 100644 --- a/test/params/fragpipe_win_paths_extracted_params.csv +++ b/test/params/fragpipe_win_paths_extracted_params.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference,ProteinProphet: --maxppmdiff 2000000 predictors_library, +abundance_normalization_ions,1 diff --git a/test/params/i2mproteobench_2pep_fdr01psm_fdr01prot_xtandem_sel.csv b/test/params/i2mproteobench_2pep_fdr01psm_fdr01prot_xtandem_sel.csv index a3dc48bf..1b6d25ae 100644 --- a/test/params/i2mproteobench_2pep_fdr01psm_fdr01prot_xtandem_sel.csv +++ b/test/params/i2mproteobench_2pep_fdr01psm_fdr01prot_xtandem_sel.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/i2mproteobench_params_sage_sel.csv b/test/params/i2mproteobench_params_sage_sel.csv index 358be0c8..8237d429 100644 --- a/test/params/i2mproteobench_params_sage_sel.csv +++ b/test/params/i2mproteobench_params_sage_sel.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/i2mq_result_parameters_sel.csv b/test/params/i2mq_result_parameters_sel.csv index 81cb020c..e648a484 100644 --- a/test/params/i2mq_result_parameters_sel.csv +++ b/test/params/i2mq_result_parameters_sel.csv @@ -23,3 +23,4 @@ quantification_method, second_pass, protein_inference, predictors_library, +abundance_normalization_ions, diff --git a/test/params/mqpar1.5.3.30_MBR_sel.json b/test/params/mqpar1.5.3.30_MBR_sel.json index c0de9fed..bd428e69 100644 --- a/test/params/mqpar1.5.3.30_MBR_sel.json +++ b/test/params/mqpar1.5.3.30_MBR_sel.json @@ -22,5 +22,6 @@ "quantification_method": null, "second_pass": null, "protein_inference": null, - "predictors_library": null + "predictors_library": null, + "abundance_normalization_ions": null } \ No newline at end of file diff --git a/test/params/mqpar_MQ1.6.3.3_MBR_sel.json b/test/params/mqpar_MQ1.6.3.3_MBR_sel.json index f878edc8..5fe61cb6 100644 --- a/test/params/mqpar_MQ1.6.3.3_MBR_sel.json +++ b/test/params/mqpar_MQ1.6.3.3_MBR_sel.json @@ -22,5 +22,6 @@ "quantification_method": null, "second_pass": null, "protein_inference": null, - "predictors_library": null + "predictors_library": null, + "abundance_normalization_ions": null } \ No newline at end of file diff --git a/test/params/mqpar_MQ2.1.3.0_noMBR_sel.json b/test/params/mqpar_MQ2.1.3.0_noMBR_sel.json index 73896dc0..d4e5404b 100644 --- a/test/params/mqpar_MQ2.1.3.0_noMBR_sel.json +++ b/test/params/mqpar_MQ2.1.3.0_noMBR_sel.json @@ -22,5 +22,6 @@ "quantification_method": null, "second_pass": null, "protein_inference": null, - "predictors_library": null + "predictors_library": null, + "abundance_normalization_ions": null } \ No newline at end of file diff --git a/test/params/mqpar_mq2.6.2.0_1mc_MBR_sel.json b/test/params/mqpar_mq2.6.2.0_1mc_MBR_sel.json index 1a390dd7..2d85d750 100644 --- a/test/params/mqpar_mq2.6.2.0_1mc_MBR_sel.json +++ b/test/params/mqpar_mq2.6.2.0_1mc_MBR_sel.json @@ -22,5 +22,6 @@ "quantification_method": null, "second_pass": null, "protein_inference": null, - "predictors_library": null + "predictors_library": null, + "abundance_normalization_ions": null } \ No newline at end of file diff --git a/test/params/spectronaut_Experiment1_ExperimentSetupOverview_BGS_Factory_Settings.csv b/test/params/spectronaut_Experiment1_ExperimentSetupOverview_BGS_Factory_Settings.csv index cf477872..357a4599 100644 --- a/test/params/spectronaut_Experiment1_ExperimentSetupOverview_BGS_Factory_Settings.csv +++ b/test/params/spectronaut_Experiment1_ExperimentSetupOverview_BGS_Factory_Settings.csv @@ -23,3 +23,4 @@ quantification_method,MS2 second_pass,directDIA+ (Deep) protein_inference,IDPicker predictors_library,False +abundance_normalization_ions,True