Skip to content

Comments

Handle duplicates by only reading in first active site in PDB file#1

Open
greyson9 wants to merge 5 commits intoucsf-bmi-203:masterfrom
greyson9:master
Open

Handle duplicates by only reading in first active site in PDB file#1
greyson9 wants to merge 5 commits intoucsf-bmi-203:masterfrom
greyson9:master

Conversation

@greyson9
Copy link

@greyson9 greyson9 commented Jan 27, 2017

modified io.py to only read the first chain of each PDB so that there are no duplicate sites in sequence

Copy link
Member

@tlnagy tlnagy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary.

return active_sites


# modified to only read the first chain of a PDB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed any more because of my changes in 376deba

@@ -0,0 +1,37 @@
import sys
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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']),
])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Residue number should be a integer, not a string. See my change in 376deba.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tlnagy tlnagy changed the title modified io.py to only read the first chain of each PDB so that there… Handle duplicates by only reading in first active site in PDB file Jan 27, 2017
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.

2 participants