Skip to content

Commit 8c713d1

Browse files
committed
Merge branch 'master' into hetatm_parsing
2 parents 2e75043 + 848a3f8 commit 8c713d1

File tree

17 files changed

+11507
-55
lines changed

17 files changed

+11507
-55
lines changed

.github/workflows/build.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
python-version: [3.8, 3.9, "3.10"]
26-
torch: [1.13.0, 2.1.0, 2.2.0]
25+
python-version: [3.8, 3.9, "3.10", "3.11"]
26+
torch: [1.13.0, 2.1.0, 2.2.0, 2.3.0, 2.4.0]
2727
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
2828
defaults:
2929
run:
@@ -33,28 +33,33 @@ jobs:
3333
uses: actions/checkout@v3
3434
# See: https://github.com/marketplace/actions/setup-miniconda
3535
- name: Setup miniconda
36-
uses: conda-incubator/setup-miniconda@v2
36+
uses: conda-incubator/setup-miniconda@v3
3737
with:
3838
auto-update-conda: true
3939
miniforge-variant: Mambaforge
4040
channels: "conda-forge, salilab, pytorch, pyg"
4141
python-version: ${{ matrix.python-version }}
4242
use-mamba: true
43+
- name: Install setuptools
44+
run: pip install setuptools==69.5.1
4345
- name: Install Boost 1.7.3 (for DSSP)
4446
run: conda install -c anaconda libboost=1.73.0
4547
- name: Install DSSP
4648
run: conda install dssp -c salilab
4749
- name: Install mmseqs
4850
run: mamba install -c conda-forge -c bioconda mmseqs2
49-
- name: Install PyTorch
50-
#run: mamba install -c pytorch pytorch==${{matrix.torch}} cpuonly
51-
run: pip install torch==${{matrix.torch}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
51+
- name: Install PyTorch (1.13.0)
52+
if: matrix.torch == '1.13.0'
53+
run: pip install torch==${{matrix.torch}}+cpu --extra-index-url https://download.pytorch.org/whl/cpu
54+
- name: Install PyTorch (2.0+)
55+
if: matrix.torch != '1.13.0'
56+
run: pip install torch==${{matrix.torch}} -f https://download.pytorch.org/whl/cpu
5257
- name: Install PyG
5358
#run: mamba install -c pyg pyg
5459
run: pip install torch_geometric
5560
- name: Install torch-cluster
5661
#run: mamba install pytorch-cluster -c pyg
57-
run: pip install pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-${{matrix.torch}}+cpu.html
62+
run: pip install torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-${{matrix.torch}}+cpu.html
5863
- name: Install BLAST
5964
run: sudo apt install ncbi-blast+
6065
- name: Install Graphein
@@ -68,4 +73,4 @@ jobs:
6873
- name: Run unit tests and generate coverage report
6974
run: pytest .
7075
- name: Test notebook execution
71-
run: pytest --nbval-lax notebooks/ --current-env --ignore-glob="notebooks/dataloader_tutorial.ipynb" --ignore-glob="notebooks/datasets_and_dataloaders.ipynb" --ignore-glob="notebooks/foldcomp.ipynb"
76+
run: pytest --nbval-lax notebooks/ --current-env --ignore-glob="notebooks/dataloader_tutorial.ipynb" --ignore-glob="notebooks/datasets_and_dataloaders.ipynb" --ignore-glob="notebooks/foldcomp.ipynb" --ignore-glob="notebooks/grn_tutorial.ipynb"

.github/workflows/minimal__install.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@v3
3535
# See: https://github.com/marketplace/actions/setup-miniconda
3636
- name: Setup miniconda
37-
uses: conda-incubator/setup-miniconda@v2
37+
uses: conda-incubator/setup-miniconda@v3
3838
with:
3939
auto-update-conda: true
4040
miniforge-variant: Mambaforge
@@ -50,4 +50,4 @@ jobs:
5050
- name: Run unit tests and generate coverage report
5151
run: pytest . --ignore-glob="tests/protein/tensor" --ignore="tests/ml/test_conversion.py" --ignore="tests/ml/test_torch_geometric_dataset.py"
5252
- name: Test notebook execution
53-
run: pytest --nbval-lax notebooks/ --current-env --ignore-glob="notebooks/dataloader_tutorial.ipynb" --ignore-glob="notebooks/higher_order_graphs.ipynb" --ignore-glob="notebooks/protein_graph_analytics.ipynb" --ignore-glob="notebooks/subgraphing_tutorial.ipynb" --ignore-glob="notebooks/splitting_a_dataset.ipynb" --ignore-glob="notebooks/protein_tensors.ipynb" --ignore-glob="notebooks/datasets_and_dataloaders.ipynb" --ignore-glob="notebooks/foldcomp.ipynb" --ignore-glob="notebooks/creating_datasets_from_the_pdb.ipynb"
53+
run: pytest --nbval-lax notebooks/ --current-env --ignore-glob="notebooks/dataloader_tutorial.ipynb" --ignore-glob="notebooks/higher_order_graphs.ipynb" --ignore-glob="notebooks/protein_graph_analytics.ipynb" --ignore-glob="notebooks/subgraphing_tutorial.ipynb" --ignore-glob="notebooks/splitting_a_dataset.ipynb" --ignore-glob="notebooks/protein_tensors.ipynb" --ignore-glob="notebooks/datasets_and_dataloaders.ipynb" --ignore-glob="notebooks/foldcomp.ipynb" --ignore-glob="notebooks/creating_datasets_from_the_pdb.ipynb" --ignore-glob="notebooks/grn_tutorial.ipynb"

.requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pandas<2.0.0
2-
biopandas>=0.5.0.dev0
2+
biopandas>=0.5.1
33
biopython
44
bioservices>=1.10.0
55
deepdiff

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* Fix cluster file loading bug in `pdb_data.py` [#396](https://github.com/a-r-j/graphein/pull/396)
99

1010
#### Misc
11+
* set logging to false by default and added mmcif support [#402](https://github.com/a-r-j/graphein/pull/402)
12+
* add metadata options for uniprot, ecnumber and CATH code to pdb manager [#398](https://github.com/a-r-j/graphein/pull/398)
1113
* bumped logging level down from `INFO` to `DEBUG` at several places to reduced output length [#391](https://github.com/a-r-j/graphein/pull/391)
1214
* exposed `fill_value` and `bfactor` option to `protein_to_pyg` function. [#385](https://github.com/a-r-j/graphein/pull/385) and [#388](https://github.com/a-r-j/graphein/pull/388)
1315
* Updated Foldcomp datasets with improved setup function and updated database choices such as ESMAtlas. [#382](https://github.com/a-r-j/graphein/pull/382)

graphein/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
]
2222
)
2323

24+
logger.disable("graphein")
25+
2426

2527
def verbose(enabled: bool = False):
2628
"""Enable/Disable logging.

graphein/grn/parse_regnetwork.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
import wget
1919
from loguru import logger as log
2020

21-
from graphein.utils.utils import filter_dataframe, ping
21+
from graphein.utils.utils import deprecated, filter_dataframe, ping
2222

2323

24+
@deprecated(
25+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
26+
)
2427
def _download_RegNetwork(
2528
root_dir: Optional[Path] = None, network_type: str = "human"
2629
) -> str:
@@ -86,6 +89,9 @@ def _download_RegNetwork(
8689
return file
8790

8891

92+
@deprecated(
93+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
94+
)
8995
def _download_RegNetwork_regtypes(root_dir: Optional[Path] = None) -> str:
9096
"""
9197
Downloads RegNetwork regulatory interactions types to the root directory.
@@ -124,6 +130,9 @@ def _download_RegNetwork_regtypes(root_dir: Optional[Path] = None) -> str:
124130
return file
125131

126132

133+
@deprecated(
134+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
135+
)
127136
@functools.lru_cache()
128137
def load_RegNetwork_interactions(
129138
root_dir: Optional[Path] = None,
@@ -144,6 +153,9 @@ def load_RegNetwork_interactions(
144153
)
145154

146155

156+
@deprecated(
157+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
158+
)
147159
@functools.lru_cache()
148160
def load_RegNetwork_regulation_types(
149161
root_dir: Optional[Path] = None,
@@ -168,6 +180,9 @@ def load_RegNetwork_regulation_types(
168180
)
169181

170182

183+
@deprecated(
184+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
185+
)
171186
def parse_RegNetwork(
172187
gene_list: List[str], root_dir: Optional[Path] = None
173188
) -> pd.DataFrame:
@@ -244,6 +259,9 @@ def standardise_RegNetwork(df: pd.DataFrame) -> pd.DataFrame:
244259
return df
245260

246261

262+
@deprecated(
263+
"RegNetwork appears to be down. This warning will be removed in a future release if the service is restored."
264+
)
247265
def RegNetwork_df(
248266
gene_list: List[str],
249267
root_dir: Optional[Path] = None,

graphein/ml/clustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_seq_records(
8585
"Alphabet given. Only checking for terminating *!\n"
8686
)
8787
check_sequences = False
88-
with open(filename, "rU") as handle:
88+
with open(filename, "r") as handle:
8989
records = list(SeqIO.parse(handle, file_format, alphabet=alphabet))
9090
del handle
9191
if check_sequences:

graphein/ml/datasets/foldcomp_dataset.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,6 @@ def download(self):
236236
asyncio.run(_)
237237
os.chdir(curr_dir)
238238
log.info("Download complete.")
239-
# log.info("Moving files to raw directory...")
240-
241-
# for f in self._database_files:
242-
# shutil.move(f, self.root)
243239
else:
244240
log.info(f"FoldComp database already downloaded: {self.root}.")
245241

0 commit comments

Comments
 (0)