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

add efoldmine module #251

Merged
merged 9 commits into from
Jun 6, 2024
Merged

add efoldmine module #251

merged 9 commits into from
Jun 6, 2024

Conversation

elenikiachaki
Copy link
Collaborator

fixes #250

Comment on lines 736 to 738



Copy link
Contributor

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

Comment on lines 711 to 712


Copy link
Contributor

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

Comment on lines 683 to 684


Copy link
Contributor

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

Comment on lines 718 to 729
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]))
Copy link
Contributor

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]
Copy link
Contributor

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?

else:
result.append((False, row['earlyFolding'].iloc[0]))
row = efoldmine_parsed[efoldmine_parsed['residue_index'] == mut_resn]
if not row.empty:
Copy link
Contributor

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

elenikiachaki and others added 3 commits June 4, 2024 14:47
…for presence of 'residue_index'and 'earlyFolding' columns and check for not valid or missing early folding scores
mtiberti
mtiberti previously approved these changes Jun 6, 2024
@mtiberti mtiberti merged commit 498d4a3 into main Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add evfoldmine module
2 participants