diff --git a/sdrf_pipelines/openms/openms.py b/sdrf_pipelines/openms/openms.py index b1ec65a..c0ecb7a 100644 --- a/sdrf_pipelines/openms/openms.py +++ b/sdrf_pipelines/openms/openms.py @@ -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" @@ -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: diff --git a/setup.py b/setup.py index 424d8f5..ca15a4c 100644 --- a/setup.py +++ b/setup.py @@ -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",