Skip to content

Commit 17ee180

Browse files
daichengxinCopilot
andauthored
Update quantmsutils/diann/dianncfg.py
Co-authored-by: Copilot <[email protected]>
1 parent 51f8610 commit 17ee180

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

quantmsutils/diann/dianncfg.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ def dianncfg(ctx, enzyme, fix_mod, var_mod):
5252

5353

5454
def get_mod(mod, mod_type):
55+
"""
56+
Retrieve and format a modification from the Unimod database for DIA-NN compatibility.
57+
58+
:param mod: The modification string, typically containing the modification name and site.
59+
:param mod_type: The type of modification ('fixed_mod' or 'var_mod').
60+
:return: A tuple (diann_mod_accession, site), where diann_mod_accession is a formatted string
61+
for DIA-NN and site is the modification site.
62+
:raises SystemExit: If the modification is not found in the Unimod database, logs an error and exits.
63+
"""
5564
pattern = re.compile(r"\((.*?)\)")
5665
tag = 0
5766
diann_mod_accession = None

0 commit comments

Comments
 (0)