Skip to content

Commit

Permalink
Merge pull request #340 from Proteobench/fix_338_mq_2_6
Browse files Browse the repository at this point in the history
🐛 Close 338 parsing MQ 2.6 (minPepLen)
  • Loading branch information
RobbinBouwmeester authored Aug 9, 2024
2 parents cd7ed36 + b0239c7 commit c804897
Show file tree
Hide file tree
Showing 7 changed files with 2,315 additions and 2 deletions.
8 changes: 7 additions & 1 deletion proteobench/io/params/maxquant.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ def extract_params(fname, ms2frac="FTMS") -> ProteoBenchParameters:
params.allowed_miscleavages = record.loc[
pd.IndexSlice["parameterGroups", "parameterGroup", "maxMissedCleavages", :]
].squeeze()
params.min_peptide_length = record.loc["minPepLen"].squeeze()
try:
params.min_peptide_length = record.loc["minPepLen"].squeeze()
except KeyError:
# Version 2.6 and above
params.minPeptideLength = record.loc["minPeptideLength"].squeeze()
# minPeptideLengthForUnspecificSearch (what is it?)
params.max_peptide_length = None
# fixed mods
if params.software_version > "1.6.0.0":
Expand Down Expand Up @@ -192,6 +197,7 @@ def extract_params(fname, ms2frac="FTMS") -> ProteoBenchParameters:
"../../../test/params/mqpar_MQ1.6.3.3_MBR.xml",
"../../../test/params/mqpar_MQ2.1.3.0_noMBR.xml",
"../../../test/params/mqpar1.5.3.30_MBR.xml",
"../../../test/params/mqpar_mq2.6.2.0_1mc_MBR.xml",
]:
print(f"{test_file = }")
record = read_file(test_file)
Expand Down
2 changes: 1 addition & 1 deletion test/params/mqpar1.5.3.30_MBR_sel.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"max_mods": "5",
"min_precursor_charge": null,
"max_precursor_charge": "7"
}
}
Loading

0 comments on commit c804897

Please sign in to comment.