Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix undefined peptide param #9

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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