-
Notifications
You must be signed in to change notification settings - Fork 12
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
Unittest structure similarity #14
Conversation
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.
it s a bit hard to disentanlge all the PR. That's mainly my fault since I have not so much time to review them. an you review PR13 and then we'' ldeal with that one
@@ -252,34 +238,27 @@ def compute_irmsd_fast(self,izone=None,method='svd',cutoff=10,check=True): | |||
# read the izone file | |||
if izone is None: | |||
resData = self.compute_izone(cutoff,save_file=False) | |||
elif not os.path.isfile(izone): | |||
resData = self.compute_izone(cutoff,save_file=True,filename=izone) | |||
# elif not os.path.isfile(izone): |
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.
why comment that ?
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.
izone
is used as both input file and output file, which is not unique. I left a TODO comment around that to add output file to the function.
data_decoy_long, data_decoy_short = self.get_data_zone_backbone(self.decoy,resData,return_not_in_zone=True) | ||
data_ref_long, data_ref_short = self.get_data_zone_backbone(self.ref,resData,return_not_in_zone=True) | ||
|
||
atom_long = data_ref_long.intersection(data_decoy_long) |
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.
this intersection stuff does all the work ?
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.
It gets the common residues or atoms and ignore missing ones. It's actually checking if the sequences are consistent or not, but it cannot fix it if not consistent(even the former code cannot do this).
|
||
|
||
def compute_izone(self,cutoff=5.0,save_file=True,filename=None): | ||
def compute_izone(self,cutoff=10.0,save_file=True,filename=None): |
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.
why a cutoff of 10 now ?
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.
It should be 10Å for iRMSD and 5Å for FNAT.
It's a bug but fine, the code invoking it resets the cutoff to 10.
# create the sql | ||
sql_decoy = pdb2sql(self.decoy,sqlfile='decoy.db') | ||
sql_ref = pdb2sql(self.ref,sqlfile='ref.db') | ||
|
||
# extract the pos of chains A | ||
xyz_decoy_A = np.array(sql_decoy.get('x,y,z',chainID='A')) | ||
xyz_ref_A = np.array(sql_ref.get('x,y,z',chainID='A')) | ||
xyz_decoy_A = np.array(sql_decoy.get('x,y,z',chainID='A', name=backbone)) |
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.
why only backbone ?
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.
Only backbone is needed in L-RMSD calculation, for both fitting and rmsd calculation. Here is the original reference https://doi.org/10.1002/prot.10393.
Note: This PR contains #11, #13.