-
Notifications
You must be signed in to change notification settings - Fork 0
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
add efoldmine module #251
add efoldmine module #251
Conversation
mavisp/modules.py
Outdated
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra newlines to be removed
mavisp/modules.py
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra newlines to be removed
mavisp/modules.py
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra newlines to be removed
mavisp/modules.py
Outdated
for mut in mutations: | ||
mut_resn = int(mut[1:-1]) | ||
row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn] | ||
if not row.empty and row['earlyFolding'].iloc[0] > 0.169: | ||
prev_row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn - 1] | ||
next_row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn + 1] | ||
if not prev_row.empty and not next_row.empty and prev_row['earlyFolding'].iloc[0] > 0.169 and next_row['earlyFolding'].iloc[0] > 0.169: | ||
result.append((True, row['earlyFolding'].iloc[0])) | ||
else: | ||
result.append((False, row['earlyFolding'].iloc[0])) | ||
else: | ||
result.append((False, row['earlyFolding'].iloc[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should change the approach to:
- we precompute on the sequence which residues are part of early folding regions and which aren't by using a sliding window approach
- we then compare it with our mutations to determine which ones are in early folding regions
result.append((True, row['earlyFolding'].iloc[0])) | ||
else: | ||
result.append((False, row['earlyFolding'].iloc[0])) | ||
row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have a sanity check that we get only one row here?
mavisp/modules.py
Outdated
else: | ||
result.append((False, row['earlyFolding'].iloc[0])) | ||
row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn] | ||
if not row.empty: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does it mean if the row is empty? Should we issue a warning? The value should be well-defined for all residues
…for presence of 'residue_index'and 'earlyFolding' columns and check for not valid or missing early folding scores
fixes #250