add total frustration functions and an example notebook #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I added functions at the end of the frustration.py file to compute energy using the proper masks for segments "in context". I also included a function to compute total frustration. For the frustration of an "independent" fragment, the total frustration should be computed using a sliced pdb model using only that fragment.
The new functions use explicit decoy computation. Sequence decoys are created using the lenght and amino acid composition of the native sequence, and their energy is computed directly. An "approximation" for the total configurational frustration is available also.
I added the total frustration function to the Frustratometer class.
I created a new example notebook to use these new functions
Todos
Note
The total frustration that can be directly computed using this module is not directly comparable with the PNAS 2024 results for exon relative total frustration. For that, it should be taken into account that the sequences and potts models do not cover the complete PDBs and that the native sequences used were not PDB sequences, but instead the ones having the analyzed exon.