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 phenotypic traits prediction from whole bacterial genomes (DNA)
A dataset of 24,462 bacterial genomes across 15,477 species with diverse phenotypic traits as labels.
The genome protein sequences have been extracted from GenBank. Each row contains the whole bacterial genome DNA, with the DNA from different contigs separated by a space.
The phenotypic traits have been extracted from a number of sources [1, 2, 3] and include a diversity of categorical phenotypes. We exclude phenotypic traits with a low nr of samples, giving us 139
uniqe phenotypic traits. If the same or similar label appeared in two different sources,
we kept it as separate labels as the label collection setup may differ for the labels.
Labels
We provide labels in the Files and versions
(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-phenotypic-traits-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-phenotypic-traits-dna", split="train", streaming=True)
item = next(iter(ds))
# read labels (available in repo root)
labels_df = pd.read_csv("<input-dir>/labels.csv").set_index("genome_name")
# fetch labels
labels = labels_df.loc[item["genome_name"]]
# drop labels without a value for the genome (NaN)
labels = labels.dropna()
Split
Due to low number of samples for many phenotypic traits and the variability between genomes, which may skew the results when using a single split, we recommend training and evaluating the model across numerous splits. Specifically, for each phenotypic traits we recommend:
- Splitting the data into
60 / 20 / 20
(%) train, validation and test partitions respectively - Training the model on the train set and monitoring the results on the validation set using macro
AUROC
. - Using the best performing model on validation to evaluate the model on the test set.
- Repeat the (1-3) steps 5 times and report the average result across the runs.
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 phenotypic-traits-protein-sequences dataset.
References
[1] Madin, Joshua S., et al. "A synthesis of bacterial and archaeal phenotypic trait data." Scientific data 7.1 (2020): 170.
[2] Weimann, Aaron, et al. "From genomes to phenotypes: Traitar, the microbial trait analyzer." MSystems 1.6 (2016): 10-1128.
[3] Brbić, Maria, et al. "The landscape of microbial phenotypic traits and associated genes." Nucleic acids research (2016): gkw964.
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: 104142909218 num_examples: 24462 download_size: 48217470302 dataset_size: 104142909218 configs: - config_name: default data_files: - split: train path: data/train-*
- Downloads last month
- 130