Skip to content

Commit

Permalink
Merge pull request #9 from hgb-bin-proteomics/develop
Browse files Browse the repository at this point in the history
fix undefined peptide param
  • Loading branch information
michabirklbauer authored Dec 19, 2023
2 parents 2b59ad0 + 30bf3c6 commit e937b34
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions create_spectral_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@

##### PARAMETERS #####

from config import *
from config import SPECTRA_FILE
from config import CSMS_FILE
from config import RUN_NAME
from config import CROSSLINKER
from config import MODIFICATIONS
from config import ION_TYPES
from config import MAX_CHARGE
from config import MATCH_TOLERANCE
from config import iRT_PARAMS

######################

Expand Down Expand Up @@ -366,7 +374,7 @@ def get_ModifiedPeptide(row: pd.Series,
"""

# helper function to parse MS Annika modification string
def parse_mod_str(mod_str, crosslinker):
def parse_mod_str(peptide, mod_str, crosslinker):
modifications_dict = dict()
modifications = mod_str.split(";")
for modification in modifications:
Expand Down Expand Up @@ -396,8 +404,8 @@ def str_insert(string, index, character):
return string[:index] + character + string[:index]
# end function

mods_A = parse_mod_str(str(row["Modifications A"]), crosslinker)
mods_B = parse_mod_str(str(row["Modifications B"]), crosslinker)
mods_A = parse_mod_str(str(row["Sequence A"]), str(row["Modifications A"]), crosslinker)
mods_B = parse_mod_str(str(row["Sequence B"]), str(row["Modifications B"]), crosslinker)

# generate annotation for sequence A
shift = 0
Expand Down

0 comments on commit e937b34

Please sign in to comment.