Skip to content

Commit

Permalink
Raise NotImplementedError in fasta2speclib until reimplemented for ms…
Browse files Browse the repository at this point in the history
…2pip v4
  • Loading branch information
RalfG committed May 2, 2024
1 parent 922f435 commit 2985b7d
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions fasta2speclib/fasta2speclib.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- Terminal modifications can have site specificity (e.g. N-term K or N-term P).
"""

from __future__ import annotations

__author__ = "Ralf Gabriels"
Expand Down Expand Up @@ -56,6 +57,8 @@

logger = logging.getLogger(__name__)

raise NotImplementedError("This module is not yet implemented for MS²PIP v4.")


class Peptide(BaseModel):
"""Peptide representation within the fasta2speclib search space."""
Expand Down Expand Up @@ -138,7 +141,7 @@ class Configuration(BaseModel):
@field_validator("output_filetype")
@classmethod
def _validate_output_filetypes(cls, v):
allowed_types = ["msp", "mgf", "bibliospec", "spectronaut", "dlib"] # , "hdf"]
allowed_types = ["msp", "mgf", "bibliospec", "spectronaut", "dlib"] # , "hdf"]
v = [filetype.lower() for filetype in v]
for filetype in v:
if filetype not in allowed_types:
Expand Down Expand Up @@ -399,11 +402,15 @@ def _prepare_ms2pip_params(config: Configuration) -> dict:
"model": config.ms2pip_model,
"frag_error": 0.02,
"ptm": [
"{},{},opt,N-term".format(mod.name, mod.mass_shift)
if mod.peptide_n_term or mod.protein_n_term
else "{},{},opt,C-term".format(mod.name, mod.mass_shift)
if mod.peptide_c_term or mod.protein_c_term
else "{},{},opt,{}".format(mod.name, mod.mass_shift, mod.amino_acid)
(
"{},{},opt,N-term".format(mod.name, mod.mass_shift)
if mod.peptide_n_term or mod.protein_n_term
else (
"{},{},opt,C-term".format(mod.name, mod.mass_shift)
if mod.peptide_c_term or mod.protein_c_term
else "{},{},opt,{}".format(mod.name, mod.mass_shift, mod.amino_acid)
)
)
for mod in config.modifications
],
"sptm": [],
Expand Down

0 comments on commit 2985b7d

Please sign in to comment.