-
Notifications
You must be signed in to change notification settings - Fork 1
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
First version of pLDDT and LUR module #11
Conversation
if chopping: | ||
for segment in chopping.segments: | ||
segment_plddt += plddt_string[(segment.start - 1) : segment.end] | ||
domain_length = len(segment_plddt) |
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.
domain_length
needs to be a running total of the segments, then take the average after the loop, e.g.
domain_length = 0
for segment in chopping.segments:
segment_plddt += plddt_string[(segment.start - 1) : segment.end]
domain_length += len(segment_plddt)
average_plddt = ...
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.
Fixed in 'move domain_length out of loop to solve average'
for segment in chopping.segments: | ||
segment_plddt += plddt_string[(segment.start - 1) : segment.end] | ||
domain_length = len(segment_plddt) | ||
average_plddt = round((sum(segment_plddt) / domain_length) * 100, 2) |
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.
not sure about the logic of this average calculation - is segment_plddt an int
or a list of int
? (sum
usually takes an iterable
)
mmcif_dict = MMCIF2Dict.MMCIF2Dict(cif_path) | ||
chain_plddt = mmcif_dict["_ma_qa_metric_global.metric_value"][0] | ||
plddt_string = mmcif_dict["_ma_qa_metric_local.metric_value"] | ||
segment_plddt = "" |
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.
should this be initialised as an array (of float
) that gets append to in the following loop?
segment_plddt = []
in pLDDTSummary
Fix LUR and pLDDT summary given a chopping segment. Change LUR threshold from 90 to 70 (residual from testing). Return LUR_perc,LUR_total and segment_length
to check against. Adjusted values in test to reflect change.
First version of pLDDT and LUR module.
Input: CIF File
Output: Summary with Average pLDDT (by chain or domain depending on input) and percentage of residues in Long Unordered Regions (LUR, by chain or domain depending on input).
Add additional models, constant (for min_LUR_length) and writer.
Requires biopython for MMCIF reader.