Datasets:
The dataset viewer is not available for this split.
Error code: TooBigContentError
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
Dataset for antibiotic resistance prediction from whole-bacterial genomes (DNA)
A dataset of 25,032 bacterial genomes across 39 species with antimicrobial resistance labels.
The genome DNA sequences have been extracted from GenBank. Each row contains whole bacterial genome, with spaces separating different contigs present in the genome.
The antimicrobial resistance labels have been extracted from Antibiotic Susceptibility Test (AST) Browser, accessed 23 Oct, 2024.)
and include both binary
(resistant/susceptible) labels as well as minimum inhibitory concentration (MIC)
regression values. The MIC has been log1p
normalised.
We exclude antimicrobials with a low nr of samples, giving us 56
unique antimicrobials for MIC (regression)
prediction and 36
for binary labels. For binary case, we only
included genomes with susceptible
and resistant
labels provided by the AST Browser, excluding ambiguous labels. We treat combination of antimicrobials as a separate drug.
Labels
We provide labels in separate files in the dataset Files and versions
. This includes:
- binary labels -
binary_labels.csv
- MIC (regression) labels -
mic_regression_labels.csv
Usage
We recommend loading the dataset in a streaming mode to prevent memory errors.
from datasets import load_dataset
ds = load_dataset("macwiatrak/bacbench-antibiotic-resistance-dna", split="train", streaming=True)
Fetch the labels for the genome
import pandas as pd
from datasets import load_dataset
ds = load_dataset("macwiatrak/bacbench-antibiotic-resistance-dna", split="train", streaming=True)
item = next(iter(ds))
# read labels (available in repo root)
labels_df = pd.read_csv("<input-dir>/mic_regression_labels.csv").set_index("genome_name")
# fetch labels
labels = labels_df.loc[item["genome_name"]]
# drop antibiotics without a value for the genome (NaN)
labels = labels.dropna()
Split
Due to low number of samples for many antibiotics and the variability between genomes, which may skew the results when using a single split, we recommend training and evaluating the model with k-fold split
.
Specifically, for each antibiotic we recommend:
- Splitting the available data into 5 equal splits (
sklearn.model_selection.StratifiedKFold
for binary labels andsklearn.model_selection.KFold
for regression labels) - In each split, further dividing the larger
train
set intotrain
andval
, wherevalidation
makes up 20% of the train split. - Training the model on the train set from the point above and monitoring the results on the validation set, using
AUPRC
andR2
as metrics for monitoring the performance on the validation set for binary and regression setups. - Using the best performing model on validation to evaluate the model on the test set.
See github repository for details on how to embed the dataset with DNA and protein language models as well as code to predict antibiotic resistance from sequence. For coding sequence representation of the genome see the antibiotic-resistance-protein-sequences dataset.
dataset_info: features: - name: genome_name dtype: string - name: contig_name sequence: string - name: dna_sequence dtype: string - name: taxid dtype: string splits: - name: train num_bytes: 110813875147 num_examples: 26052 download_size: 51625216055 dataset_size: 110813875147 configs: - config_name: default data_files: - split: train path: data/train-* license: apache-2.0 tags: - AMR - antibiotic - resistance - bacteria - genomics - dna size_categories: - 1K<n<10K
- Downloads last month
- 212