ptm sphere#452
Conversation
… and their centerpoints and radius
…nates 407 get all ptms with coordinates
NeleRiediger
left a comment
There was a problem hiding this comment.
Testing worked great and the code looks good to me too. Although I can't really verify, whether all the logic is completely correct.
tE3m
left a comment
There was a problem hiding this comment.
Everything works from what I can see, good work there! I didn't check the frontend code too closely as I'm out of my depth there. Since the PR is rather large, I didn't focus on the geometrical/trimesh operations but rather on the pandas/df operations.
See my comments about the column titles, I'm a big proponent of using the constants but you don't have to if you think it's better this way. I was just a bit confused by the wording throughout the code, I feel like amino_acid should in most cases be replaced by something like unmodified, since PTMs are just modifications on amino acids, they're not really different concepts.
Also check out the merge conflicts, since those currently block merging this addition
Co-authored-by: Tarek <tarek@massini.me>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description
fixes #405
Adds trimesh spheres for PTMs and amino acids and displays them in the validation step if they intersect.
The user can also specify the number of neighboring amino acids around the PTM that should be ignored when calculating intersections.
Changes
Testing
How is a sphere calculated?
A sphere is calculated for each PTM and amino acid. Its center is the mean position of all corresponding atom coordinates. Its radius is the maximum distance from this center to any atom, extended by that atom's van der Waals radius.
Two spheres are considered intersecting when the distance between their centers is smaller than the sum of their radii.
PR checklist
Development
Mergeability
blackpnpm formatand checked withpnpm lintCode review