Handle duplicates by only reading in first active site in PDB file#1
Handle duplicates by only reading in first active site in PDB file#1greyson9 wants to merge 5 commits intoucsf-bmi-203:masterfrom
Conversation
… are no duplicate sites in sequence
tlnagy
left a comment
There was a problem hiding this comment.
Hey Greyson, thanks for submitting a PR! We'll need to make some changes before I merge into in. I've commented on your code below. You can push more commits to this branch to fix things. I'll squash everything before we merge.
cheers,
-tamas
| @@ -1,4 +1,4 @@ | |||
| from .utils import Atom, Residue, ActiveSite | |||
| from hw2skeleton.utils import Atom, Residue, ActiveSite | |||
| return active_sites | ||
|
|
||
|
|
||
| # modified to only read the first chain of a PDB |
There was a problem hiding this comment.
This information should be in your commit message, not in a comment.
| # make a new residue if needed | ||
| if residue_number != r_num: | ||
| residue = Residue(residue_type, residue_number) | ||
| residue = Residue(residue_type, str(residue_number)) |
There was a problem hiding this comment.
This isn't needed any more because of my changes in 376deba
| @@ -0,0 +1,37 @@ | |||
| import sys | |||
There was a problem hiding this comment.
Not everyone wants to go the FASTA route so I don't think we should add this file to this PR.
|
|
||
| def __init__(self, type): | ||
| self.type = type | ||
| def __init__(self, type_var): |
There was a problem hiding this comment.
Why make this change? Is there a conflict with the name?
| ("4629.pdb", ["ASP", "THR", "ARG", "SER", "LYS", "TYR", "SER", "ASN", "ASP"], [10, 14, 41, 118, 151, 157, 176, 177, 180]), | ||
| ("276.pdb", ["HIS", "HIS", "HIS", "HIS", "ASP"], ['55', '57', '201', '230', '301']), | ||
| ("4629.pdb", ["ASP", "THR", "ARG", "SER", "LYS", "TYR", "SER", "ASN", "ASP"], ['10', '14', '41', '118', '151', '157', '176', '177', '180']), | ||
| ]) |
There was a problem hiding this comment.
Residue number should be a integer, not a string. See my change in 376deba.
There was a problem hiding this comment.
Also, can you add a test for your code? For example, load a PDB with known duplicate active sites and make sure that it is read in correctly.
modified io.py to only read the first chain of each PDB so that there are no duplicate sites in sequence