--- language: en license: mit tags: - chemistry - toxicology pretty_name: AttentiveSkin dataset_summary: >- Compiled GHS dataset comprising 731 Corrosion, 1283 Irritation, and 1205 Negative samples from 6 governmental databases and 2 external datasets. Results of the two binary tasks (Corr vs Neg, Irrit vs Neg) will be generated separately. citation: |- @article{, author = {Zejun Huang and Shang Lou and Haoqiang Wang and Weihua Li and Guixia Liu, and Yun Tang}, doi = {10.1021/acs.chemrestox.3c00332}, journal = {Journal of Chemical Information and Modeling}, number = {2}, title = {AttentiveSkin: To Predict Skin Corrosion/Irritation Potentials of Chemicals via Explainable Machine Learning Methods}, volume = {37}, year = {2024}, url = {https://pubs.acs.org/doi/10.1021/acs.chemrestox.3c00332}, publisher = {ACS publications} } size_categories: - 1K>> import datasets and load one of the `AttentiveSkin` datasets, e.g., >>> Corr_Neg = datasets.load_dataset("maomlab/AttentiveSkin", name = 'Corr_Neg') Downloading readme: 100%|██████████| 64.0k/64.0k [00:00<00:00, 11.7kkB/s] Downloading data: 100%|██████████| 1.02M/1.02M [00:00<00:00, 4.88MkB/s] Generating test split: 100%|██████████| 181/181 [00:00<00:00, 3189.72examples/s] Generating train split: 100%|██████████| 1755/1755 [00:00<00:00, 19806.87examples/s] and inspecting the loaded dataset >>> Corr_Neg DatasetDict({ test: Dataset({ features: ['Name', 'Synonym', 'CAS RN', 'Y', 'Detailed Page', 'Evidence', 'OECD TG 404', 'Data Source', 'Frequency', 'SMILES', 'SMILES URL', 'SMILES Source', 'Canonical SMILES', 'Split'], num_rows: 181 }) train: Dataset({ features: ['Name', 'Synonym', 'CAS RN', 'Y', 'Detailed Page', 'Evidence', 'OECD TG 404', 'Data Source', 'Frequency', 'SMILES', 'SMILES URL', 'SMILES Source', 'Canonical SMILES', 'Split'], num_rows: 1755 }) }) ### Use a dataset to train a model One way to use the dataset is through the [MolFlux](https://exscientia.github.io/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_dataset = load_dataset('maomlab/AttentiveSkin', name = 'Corr_Neg') 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": ['Y']}}) 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"]['Y'], predictions=preds["cat_boost_classifier::Y"]) ### Data splits Here we have used the Realistic Split method described in [(Martin et al., 2018)](https://doi.org/10.1021/acs.jcim.7b00166) ## AttentiveSkin To Predict Skin Corrosion/Irritation Potentials of Chemicals via Explainable Machine Learning Methods Download: https://github.com/BeeBeeWong/AttentiveSkin/releases/tag/v1.0 ## Tutorial ### Basic: AttentiveSkin is a software used for predicting GHS-defined (the Globally Harmonized System of Classification and Labeling of Chemicals) Skin Corrosion/Irritation labels of chemicals. Download and unzip the "AttentiveSkin_v1.0.zip" at the URL above. Place the file "AttentiveSkin.exe" and dir "dependency" in the same directory. Launch the "AttentiveSkin.exe" and wait until the GUI being initialized. ### Input: The input SMILES can be listed to the first column in .txt or .tsv files. User can follow the manner of example in "./example/input.txt". Click the button "Input" to open the text file containing input SMILES. ### Output: The interpretable prediction containing attetion weights will be placed in .html files, while basic info will be written to .xlsx files. Results of the two binary tasks (Corr vs Neg, Irrit vs Neg) are generated separately. Click the button "Output" to select the directory to store the prediction results. ## Citation Cite this: Chem. Res. Toxicol. 2024, 37, 2, 361–373 Publication Date:January 31, 2024 https://doi.org/10.1021/acs.chemrestox.3c00332 Copyright © 2024 American Chemical Society ## Contact Developer: Zejun Huang, incorrectwong11@gmail.com Corresponding author (Prof.): Yun Tang, ytang234@ecust.edu.cn