Skip to content

Commit

Permalink
Merge branch 'a-r-j:master' into amorehead-pdbmanager-chain-interface…
Browse files Browse the repository at this point in the history
…-filtering
  • Loading branch information
amorehead authored Sep 12, 2023
2 parents 6518dc7 + 6d5972f commit ea2e2f3
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .requirements/base.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pandas<2.0.0
biopandas==0.5.0.dev0
biopandas>=0.5.0.dev0
biopython
bioservices>=1.10.0
deepdiff
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
### 1.7.1 - UNRELEASED
### 1.7.3 - 30/08/2023

* Fixes edge case in FoldComp database download if target directory has same name as database ([#339](https://github.com/a-r-j/graphein/pull/339))

### 1.7.2 - 28/08/2023

* Pins BioPandas version to latest

### 1.7.1 - 26/07/2023

#### New Features
* [Feature] - [#305](https://github.com/a-r-j/graphein/pull/305) Adds the `add_virtual_beta_carbon_vector` function inspired by [RFdiffusion](https://github.com/RosettaCommons/RFdiffusion/blob/main/rfdiffusion/coords6d.py#L37) and ProteinMPNN.
Expand All @@ -12,6 +20,9 @@
* [Bugfix] - [#305](https://github.com/a-r-j/graphein/pull/305) Fixes the construction of geometric features when beta-carbons or side chains are missing in non-glycine residues (for example in `H:CYS:104` in 3SE8).
* [Bugfix] - [#305](https://github.com/a-r-j/graphein/pull/305) Fixes data types of geometric feature vectors: `object` -> `float`.
* [Bugfix] - [#301](https://github.com/a-r-j/graphein/pull/301) Fixes the conversion of undirected NetworkX graph to directed PyG data.
* [Bugfix] - [#334](https://github.com/a-r-j/graphein/pull/334) Fixes the corner case of the NetworkX -> PyG conversion when input graph has no edges.

https://github.com/a-r-j/graphein/pull/334

#### Bugfixes
* Adds missing `stage` parameter to `graphein.ml.datasets.foldcomp_data.FoldCompDataModule.setup()`. [#310](https://github.com/a-r-j/graphein/pull/310)
Expand All @@ -22,6 +33,7 @@
* Fixes initialisation of `Protein` objects. [#317](https://github.com/a-r-j/graphein/issues/317) [#318](https://github.com/a-r-j/graphein/pull/318)
* Fixes incorrect `rad` and `embed` argument logic in `graphein.protein.tensor.angles.dihedrals/sidechain_torsion` [#321](https://github.com/a-r-j/graphein/pull/321)
* Fixes incorrect start padding in pNeRF output [#321](https://github.com/a-r-j/graphein/pull/321)
* Fixes `pyyaml` breaking installation [#328](https://github.com/a-r-j/graphein/pull/328)
* Fixes setting ID for PyG data objects when loading from a path to a `.pdb` file [#332](https://github.com/a-r-j/graphein/pull/332)

#### Other Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
copyright = f"{datetime.datetime.now().year}, {author}"

# The full version, including alpha/beta/rc tags
release = "1.7.0"
release = "1.7.3"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion graphein/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .testing import *

__author__ = "Arian Jamasb <arian@jamasb.io>"
__version__ = "1.7.0"
__version__ = "1.7.3"


logger.configure(
Expand Down
3 changes: 2 additions & 1 deletion graphein/ml/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ def convert_nx_to_pyg(self, G: nx.Graph) -> Data:
data[key].append(value)

# Add edge features
edge_feature_names = list(G.edges(data=True))[0][2].keys()
edge_list = list(G.edges(data=True))
edge_feature_names = edge_list[0][2].keys() if edge_list else []
edge_feature_names = list(
filter(
lambda x: x in self.columns and x != "kind", edge_feature_names
Expand Down
9 changes: 6 additions & 3 deletions graphein/ml/datasets/foldcomp_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,19 @@ def download(self):
os.path.exists(self.root / f) for f in self._database_files
):
log.info(f"Downloading FoldComp dataset {self.database}...")
curr_dir = os.getcwd()
os.chdir(self.root)
try:
foldcomp.setup(self.database)
except RuntimeError:
_ = self.async_setup()
asyncio.run(_)
os.chdir(curr_dir)
log.info("Download complete.")
log.info("Moving files to raw directory...")
# log.info("Moving files to raw directory...")

for f in self._database_files:
shutil.move(f, self.root)
# for f in self._database_files:
# shutil.move(f, self.root)
else:
log.info(f"FoldComp database already downloaded: {self.root}.")

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def run(self):

setup(
name="graphein",
version="1.7.0",
version="1.7.3",
description="Protein & Interactomic Graph Construction for Machine Learning",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit ea2e2f3

Please sign in to comment.