Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

replace code with pdb2sql package #111

Merged
merged 40 commits into from
Nov 25, 2019
Merged

Conversation

CunliangGeng
Copy link
Member

To solve issues: #100 #102.

Note: please first merge RP #103 and #107 and then this RP.

@coveralls
Copy link

coveralls commented Oct 21, 2019

Pull Request Test Coverage Report for Build 639

  • 48 of 56 (85.71%) changed or added relevant lines in 11 files are covered.
  • 21 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-1.3%) to 73.532%

Changes Missing Coverage Covered Lines Changed/Added Lines %
deeprank/features/FeatureClass.py 2 3 66.67%
deeprank/generate/GridTools.py 7 8 87.5%
deeprank/features/NaivePSSM.py 2 4 50.0%
deeprank/features/FullPSSM.py 7 11 63.64%
Files with Coverage Reduction New Missed Lines %
deeprank/features/FullPSSM.py 1 73.85%
deeprank/utils/cal_hitrate_successrate.py 20 50.0%
Totals Coverage Status
Change from base Build 571: -1.3%
Covered Lines: 1503
Relevant Lines: 2044

💛 - Coveralls

@CunliangGeng
Copy link
Member Author

@NicoRenaud All checks failed because the current pdb2sql package in pip is still the old one. BTW, all tests passed at local machines using the latest pdb2sql package.

@CunliangGeng
Copy link
Member Author

Finally freesasa can be installed using pip, but only version 2.0.3.post7.
On mac, should use v2.0.3.post6.

Copy link
Member

@NicoRenaud NicoRenaud left a comment

Choose a reason for hiding this comment

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

Very nice ! there is only a few comments to address . I think we should make deeprank pip installable now !

@@ -81,7 +81,7 @@ def __init__(self, pdbfile, param_charge=None, param_vdw=None,
self.atom_key = 'chainID, resSeq, resName, name'

# read the pdb as an sql
self.sqldb = pdb2sql(self.pdbfile)
self.sqldb = pdb2sql.pdb2sql(self.pdbfile)
Copy link
Member

Choose a reason for hiding this comment

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

that's from pdb2sql_core right ?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

if ds:
ds = np.array(ds).astype('|S' + str(len(ds[0])))
else:
ds = np.array(ds)
Copy link
Member

Choose a reason for hiding this comment

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

good catch !

@@ -411,11 +413,11 @@ def create_database(
self.f5.copy(mol_name + '/features/', molgrp)

# rotate the feature
self._rotate_feature(molgrp, axis, angle, mol_center)
DataGenerator._rotate_feature(molgrp, axis, angle, mol_center)
Copy link
Member

Choose a reason for hiding this comment

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

why not self here ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I misunderstood static method before. self is better here.

@@ -577,7 +579,7 @@ def add_feature(self, remove_error=True, prog_bar=True):
aug_molgrp.create_dataset("features/" + k, data=data)

# rotate
self._rotate_feature(
DataGenerator._rotate_feature(
Copy link
Member

Choose a reason for hiding this comment

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

same here, why DataGenerator. and not self._rotate_feature ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated now.


# get the pdb-format data
data = sqldb.sql2pdb()
Copy link
Member

Choose a reason for hiding this comment

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

nice little function here :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks :-)

@CunliangGeng CunliangGeng merged commit c385cf1 into development Nov 25, 2019
@CunliangGeng CunliangGeng deleted the issue102_pdb2sql branch November 25, 2019 08:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants