HematoxLong2023 / README.md
haneulpark's picture
Update README.md
14ad0c8 verified
metadata
license: mit
language: en
tags:
  - chemistry
  - chemical information
task_categories:
  - tabular-classification
pretty_name: Hematotoxicity Dataset
dataset_summary: >-
  The hematotoxicity dataset consists of a training set with 1788 molecules and
  a test set with 594 molecules.  The train and test datasets were created after
  sanitizing and splitting the original dataset in the paper below.
citation: |-
  @article{,
    author = {Teng-Zhi Long, Shao-Hua Shi, Shao Liu, Ai-Ping Lu, Zhao-Qian Liu, Min Li, Ting-Jun Hou*, and Dong-Sheng Cao},
    doi = {10.1021/acs.jcim.2c01088},
    journal = {Journal of Chemical Information and Modeling},
    number = {1},
    title = {Structural Analysis and Prediction of Hematotoxicity Using Deep Learning Approaches},
    volume = {63},
    year = {2023},
    url = {https://pubs.acs.org/doi/10.1021/acs.jcim.2c01088},
    publisher = {ACS publications}
  }
size_categories:
  - 1K<n<10K
config_names:
  - HematoxLong2023
configs:
  - config_name: HematoxLong2023
    data_files:
      - split: test
        path: HematoxLong2023/test.csv
      - split: train
        path: HematoxLong2023/train.csv
dataset_info:
  - config_name: HematoxLong2023
    features:
      - name: SMILES
        dtype: string
      - name: Label
        dtype:
          class_label:
            names:
              '0': negative
              '1': positive
    splits:
      - name: train
        num_bytes: 28736
        num_examples: 1788
      - name: test
        num_bytes: 9632
        num_examples: 594

Hematotoxicity Dataset (HematoxLong2023)

A hematotoxicity dataset containing 1772 chemicals was obtained, which includes a positive set with 589 molecules and a negative set with 1183 molecules. The molecules were divided into a training set of 1330 molecules and a test set of 442 molecules according to their Murcko scaffolds. Additionally, 610 new molecules from related research and databases were compiled as the external validation set.

The train and test datasets uploaded to our Hugging Face repository have been sanitized and split from the original dataset, which contains 2382 molecules. If you would like to try these processes with the original dataset, please follow the instructions in the Preprocessing Script.py file located in the HematoxLong2023.

Quickstart Usage

Load a dataset in python

Each subset can be loaded into python using the Huggingface datasets library. First, from the command line install the datasets library

$ pip install datasets

then, from within python load the datasets library

>>> import datasets

and load one of the HematoxLong2023 datasets, e.g.,

>>> HematoxLong2023 = datasets.load_dataset("maomlab/HematoxLong2023", name = "HematoxLong2023")
Downloading readme: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 5.23k/5.23k [00:00<00:00, 35.1kkB/s]
Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 34.5k//34.5k/ [00:00<00:00, 155kB/s]
Downloading data: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 97.1k/97.1k [00:00<00:00, 587kB/s]
Generating test split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 594/594 [00:00<00:00, 12705.92 examples/s]
Generating train split: 100%|β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 1788/1788 [00:00<00:00, 43895.91 examples/s]

and inspecting the loaded dataset

>>> HematoxLong2023
HematoxLong2023
DatasetDict({
  test: Dataset({
     features: ['SMILES', 'label'],
     num_rows: 594
  })
  train: Dataset({
      features: ['SMILES', 'label'],
      num_rows: 1788
  })    
})

Use a dataset to train a model

One way to use the dataset is through the MolFlux package developed by Exscientia. First, from the command line, install MolFlux library with catboost and rdkit support

pip install 'molflux[catboost,rdkit]'

then load, featurize, split, fit, and evaluate the catboost model

import json
from datasets import load_dataset
from molflux.datasets import featurise_dataset
from molflux.features import load_from_dicts as load_representations_from_dicts
from molflux.splits import load_from_dict as load_split_from_dict
from molflux.modelzoo import load_from_dict as load_model_from_dict
from molflux.metrics import load_suite

Split and evaluate the catboost model

split_dataset = load_dataset('maomlab/HematoxLong2023', name = 'HematoxLong2023')

split_featurised_dataset = featurise_dataset(
  split_dataset,
  column = "SMILES",
  representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))

model = load_model_from_dict({
    "name": "cat_boost_classifier",
    "config": {
        "x_features": ['SMILES::morgan', 'SMILES::maccs_rdkit'],
        "y_features": ['Label']}})

model.train(split_featurised_dataset["train"])
preds = model.predict(split_featurised_dataset["test"])

classification_suite = load_suite("classification")

scores = classification_suite.compute(
    references=split_featurised_dataset["test"]['Label'],
    predictions=preds["cat_boost_classifier::Label"])        

Citation

Cite this: J. Chem. Inf. Model. 2023, 63, 1, 111–125 Publication Date:December 6, 2022 https://doi.org/10.1021/acs.jcim.2c01088 Copyright Β© 2024 American Chemical Society