Skip to content

Commit

Permalink
Merge pull request #79 from ypriverol/master
Browse files Browse the repository at this point in the history
Added new enzymes for OpenMS
  • Loading branch information
ypriverol authored Feb 22, 2021
2 parents e8be827 + 2a369d2 commit 5d93906
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
19 changes: 17 additions & 2 deletions sdrf_pipelines/openms/openms.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ def __init__(self) -> None:
'TMT129N': 6, 'TMT129C': 7, 'TMT130N': 8, 'TMT130C': 9, 'TMT131': 10}
self.tmt6plex = {'TMT126': 1, 'TMT127': 2, 'TMT128': 3,
'TMT129': 4, 'TMT130': 5, 'TMT131': 6}
# Hardcode enzymes from OpenMS
self.enzymes = {"Glutamyl endopeptidase":"glutamyl endopeptidase",
"Trypsin/p":"Trypsin/P",
"Lys-c":"Lys-C","Lys-n":"Lys-N","Arg-c":"Arg-C","Arg-c/p":"Arg-C/P",
"Asp-n":"Asp-N","Asp-n/b":"Asp-N/B","Asp-n_ambic":"Asp-N_ambic",
"Chymotrypsin/p":"Chymotrypsin/P","Cnbr":"CNBr",
"V8-de":"V8-DE", "V8-e":"V8-E",
"Elastase-trypsin-chymotrypsin":"elastase-trypsin-chymotrypsin",
"Pepsina":"PepsinA",
"Unspecific cleavage":"unspecific cleavage", "No cleavage":"no cleavage"}

# TODO What about iTRAQ?

# TODO How does this work? In OpenMS there are no such modifications. You can have different "isotope mods"
Expand Down Expand Up @@ -241,9 +252,13 @@ def openms_convert(self, sdrf_file: str = None, keep_raw: bool = False, one_tabl
source_name2n_reps[source_name] = int(f2c.file2technical_rep[raw])

enzyme = re.search("NT=(.+?)(;|$)", row['comment[cleavage agent details]']).group(1)

enzyme = enzyme.capitalize()
if "Trypsin/p" in enzyme: # workaround
enzyme = "Trypsin/P"
# This is to check if the openMS map of enzymes
if enzyme in self.enzymes:
enzyme = self.enzymes[enzyme]


f2c.file2enzyme[raw] = enzyme

if 'comment[fraction identifier]' in row:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name="sdrf-pipelines",
version="0.0.13",
version="0.0.14",
author="BigBio Team",
author_email="ypriverol@gmail.com",
description="Translate, convert SDRF to configuration pipelines",
Expand Down

0 comments on commit 5d93906

Please sign in to comment.