Commit 63d44479 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Fixes support for Kojak 1.6.0-dev (Issue #27)

Header was different in 1.6.0-dev
parent d28bc001
Pipeline #15123978 passed with stage
in 2 minutes and 37 seconds
# # Copyright 2013-2017 Mathieu Courcelles
# # Mike Tyers's lab / IRIC / Universite de Montreal
# Copyright 2013-2017 Mathieu Courcelles
# Mike Tyers's lab / IRIC / Universite de Montreal
# Import standard libraries
......@@ -17,6 +17,7 @@ from .sequences import sequencesMatcher
kojak_version = {
'1.0-1.5': 'Scan Number\tObs Mass\tCharge\tPSM Mass\tPPM Error\tScore\tdScore\tPep. Diff.\tPeptide #1\tLink #1\tProtein #1\tPeptide #2\tLink #2\tProtein #2\tLinker Mass',
'1.6-dev': 'Scan Number\tRet Time\tObs Mass\tCharge\tPSM Mass\tPPM Error\tScore\tdScore\tPep. Diff.\tPeptide #1\tLink #1\tProtein #1\tPeptide #2\tLink #2\tProtein #2\tLinker Mass',
'1.6': 'Scan Number\tRet Time\tObs Mass\tCharge\tPSM Mass\tPPM Error\tScore\tdScore\tPeptide #1 Score\tPeptide #1\tLinked AA #1\tProtein #1\tProtein #1 Site\tPeptide #2 Score\tPeptide #2\tLinked AA #2\tProtein #2\tProtein #2 Site\tLinker Mass'
}
......@@ -138,7 +139,6 @@ class KojakParser:
fields['pep1_link_pos'] = int(row['Linked AA #1'])
fields['pep2_link_pos'] = int(row['Linked AA #2'])
fields['retention_time'] = float(row['Ret Time']) * 60
fields['n_score_a'] = float(row['Peptide #1 Score'])
fields['n_score_b'] = float(row['Peptide #2 Score'])
......@@ -146,6 +146,9 @@ class KojakParser:
fields['pep1_link_pos'] = int(row['Link #1'])
fields['pep2_link_pos'] = int(row['Link #2'])
if 'Ret Time' in row:
fields['retention_time'] = float(row['Ret Time']) * 60
fields['display_protein1'] = row['Protein #1'].split(';')[0]
fields['display_protein1'] = re.sub('(^>)', '', fields['display_protein1'])
result = protpos_pattern.match(fields['display_protein1'])
......
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