Commit 7177484c authored by Mathieu Courcelles's avatar Mathieu Courcelles

Fixes support for Kojak 1.6.1 (Issue #27)

Issue with intra-peptide cross-link
parent 64a72f6d
Pipeline #15072026 passed with stage
......@@ -182,7 +182,7 @@ class KojakParser:
# Find peptide position for linear peptide
if fields['peptide_position1'] == -1 and clpep.fs_prot1_id is not None:
key = '%s-%s' % (fields['peptide_wo_mod1'], clpep.fs_prot1_id.pk)
key = f'{fields["peptide_wo_mod1"]}-{clpep.fs_prot1_id.pk}'
if key in pep_pos_dict:
clpep.peptide_position1 = pep_pos_dict[key]
......@@ -202,7 +202,7 @@ class KojakParser:
if fields['peptide_position2'] == -1 and clpep.fs_prot2_id is not None:
key = '%s-%s' % (fields['peptide_wo_mod2'], clpep.fs_prot2_id.pk)
key = f'{fields["peptide_wo_mod2"]}-{clpep.fs_prot2_id.pk}'
if key in pep_pos_dict:
clpep.peptide_position2 = pep_pos_dict[key]
......@@ -212,7 +212,7 @@ class KojakParser:
pep_pos_dict[key] = clpep.peptide_position2
if fields['peptide_position2'] == -1 and fields['pep2_link_pos'] != -1:
fields['peptide_position2'] = fields['peptide_position1']
clpep.peptide_position2 = fields['peptide_position1']
clpep.guessLinkType()
# clpep.id = next_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment