aiondata
Advanced tools
@@ -1,2 +0,2 @@ | ||
| from .bindingdb import BindingDB | ||
| from .bindingdb import BindingDB, BindingAffinity | ||
| from .protein_structure import ( | ||
@@ -3,0 +3,0 @@ FoldswitchProteinsTableS1A, |
@@ -1,11 +0,9 @@ | ||
| from collections import OrderedDict | ||
| import io | ||
| from typing import Optional, Generator, Union, Tuple | ||
| import urllib.request | ||
| from rdkit import Chem | ||
| from rdkit import RDLogger | ||
| from rdkit import Chem, RDLogger | ||
| from tqdm.auto import tqdm | ||
| import zipfile | ||
| from .datasets import GeneratedDataset | ||
| from .datasets import GeneratedDataset, CachedDataset | ||
| import polars as pl | ||
@@ -235,1 +233,34 @@ | ||
| RDLogger.EnableLog("rdApp.warning") | ||
| class BindingAffinity(CachedDataset): | ||
| def __init__(self, fd: Optional[io.BufferedReader] = None): | ||
| """ | ||
| Initializes a BindingAffinity instance. | ||
| Args: | ||
| fd (Optional[io.BufferedReader]): The file-like object containing the BindingDB content. | ||
| If `fd` is not provided, the dataset content will be fetched from the default source. | ||
| """ | ||
| self.bindingdb = BindingDB(fd) | ||
| def get_df(self) -> pl.DataFrame: | ||
| bdb_df = self.bindingdb.to_df() | ||
| ba_df = bdb_df.select( | ||
| [ | ||
| "SMILES", | ||
| "BindingDB Target Chain Sequence", | ||
| "Ki (nM)", | ||
| "IC50 (nM)", | ||
| "Kd (nM)", | ||
| "EC50 (nM)", | ||
| "kon (M-1-s-1)", | ||
| "koff (s-1)", | ||
| ] | ||
| ) | ||
| ba_df = ba_df.rename({"BindingDB Target Chain Sequence": "Sequence"}) | ||
| # Remove spaces from BindingDB Target Chain Sequence column | ||
| ba_df = ba_df.with_columns(pl.col("Sequence").str.replace_all(" ", "")) | ||
| return ba_df |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: aiondata | ||
| Version: 0.4.6 | ||
| Version: 0.5.0 | ||
| Summary: A common data access layer for AI-driven drug discovery. | ||
@@ -5,0 +5,0 @@ Home-page: https://www.github.com/aion-labs/aiondata |
+1
-1
| [tool.poetry] | ||
| name = "aiondata" | ||
| version = "0.4.6" | ||
| version = "0.5.0" | ||
| description = "A common data access layer for AI-driven drug discovery." | ||
@@ -5,0 +5,0 @@ authors = ["JJ Ben-Joseph <jj@tensorspace.ai>"] |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
54945
1.97%680
3.82%