Dataset Viewer (First 5GB)
Auto-converted to Parquet
genome_name
stringlengths
15
15
contig_name
sequencelengths
1
450
protein_id
sequencelengths
1
450
protein_sequence
sequencelengths
1
450
taxid
stringclasses
95 values
locus_tag
sequencelengths
1
450
start
sequencelengths
1
450
end
sequencelengths
1
450
product
sequencelengths
1
450
GCA_017147335.1
["AAZECW010000001.1","AAZECW010000002.1","AAZECW010000003.1","AAZECW010000004.1","AAZECW010000005.1"(...TRUNCATED)
[["EHD5180979.1","EHD5180980.1","EHD5180981.1","EHD5180982.1","EHD5180983.1","EHD5180984.1","EHD5180(...TRUNCATED)
[["MLDIVELSRLQFALTAMYHFLFVPLTLGMAFLLAIMETVYVLSGKQIYKDMTKFWGKLFGINFALGVATGLTMEFQFGTNWSYYSHYVGDIFGAPLA(...TRUNCATED)
562
[["cydA","cydB","cydX","ybgE","ybgC","tolQ","tolR","tolA","tolB","pal","cpoB","nadA",null,"zitB",nul(...TRUNCATED)
[[339,1923,3077,3190,3633,4034,4730,5223,6540,7867,8398,10335,11416,12132,13187,13883,15102,16057,17(...TRUNCATED)
[[1907,3062,3190,3483,4037,4726,5158,6407,7832,8388,9189,11378,12135,13073,13567,14935,15854,17097,1(...TRUNCATED)
[["cytochrome ubiquinol oxidase subunit I","cytochrome d ubiquinol oxidase subunit II","cytochrome b(...TRUNCATED)
GCA_017147355.1
["AAZEDE010000001.1","AAZEDE010000002.1","AAZEDE010000003.1","AAZEDE010000004.1","AAZEDE010000005.1"(...TRUNCATED)
[["EHD5240679.1","EHD5240680.1","EHD5240681.1","EHD5240682.1","EHD5240683.1","EHD5240684.1","EHD5240(...TRUNCATED)
[["MNTSKRERMEYLVHTLIDNEPHAFKFHGEMATHLFLTDQLHFDNKVEICVKRNELLKILRVIPMAFTIKVINKKGEQLPYDDVQLHQMSSLEVYDHN(...TRUNCATED)
283734
[[null,null,null,null,null,null,null,null,"rpmG","rpsN","guaC",null,"lexA",null,null,"tkt",null,null(...TRUNCATED)
[[127,758,2302,3591,4652,5758,6715,7203,9008,9329,9679,10863,11891,12659,13158,13499,15630,16117,167(...TRUNCATED)
[[714,2110,3585,4655,5572,6561,7029,8654,9157,9598,10656,11678,12514,12892,13394,15484,15869,16584,1(...TRUNCATED)
[["hypothetical protein","aspartate kinase","homoserine dehydrogenase","threonine synthase","homoser(...TRUNCATED)
GCA_017147375.1
["AAZECZ010000001.1","AAZECZ010000002.1","AAZECZ010000003.1","AAZECZ010000004.1","AAZECZ010000005.1"(...TRUNCATED)
[["EHD5185722.1","EHD5185723.1","EHD5185724.1","EHD5185725.1","EHD5185726.1","EHD5185727.1","EHD5185(...TRUNCATED)
[["MNTSKRERMEYLVHTLIDNEPHAFKFHGEMATHLFLTDQLHFDNKVEICVKRNELLKILRVIPMAFTIKVINKKGEQLPYDDVQLHQMSSLEVYDHN(...TRUNCATED)
283734
[[null,null,null,null,null,null,null,null,"rpmG","rpsN","guaC",null,"lexA",null,null,"tkt",null,null(...TRUNCATED)
[[289,920,2464,3753,4814,5920,6877,7365,9170,9491,9841,11025,12053,12821,13321,13662,15793,16280,168(...TRUNCATED)
[[876,2272,3747,4817,5734,6723,7191,8816,9319,9760,10818,11840,12676,13054,13557,15647,16032,16747,1(...TRUNCATED)
[["hypothetical protein","aspartate kinase","homoserine dehydrogenase","threonine synthase","homoser(...TRUNCATED)
GCA_017147415.1
["AAZEDK010000001.1","AAZEDK010000002.1","AAZEDK010000003.1","AAZEDK010000004.1","AAZEDK010000005.1"(...TRUNCATED)
[["EHD5264385.1","EHD5264386.1","EHD5264387.1","EHD5264388.1","EHD5264389.1","EHD5264390.1","EHD5264(...TRUNCATED)
[["MLFFNQLGEILTSEMLSLILICIVFLGCLYQLYSRRINFSGIIALFALLFLFLGFIIQGSFTLITLMLFVIGVLLLLVELFVFGAVLGIIGITLIII(...TRUNCATED)
283734
[[null,"floA",null,null,"ybeY",null,"cdd",null,"recO",null,null,null,null,"rpoD",null,null,null,null(...TRUNCATED)
[[450,1119,2128,3093,4041,4502,4865,5269,6190,7176,9065,9700,10600,12405,14032,14706,15963,17112,184(...TRUNCATED)
[[1100,2114,2742,4037,4502,4849,5272,6165,6960,8570,9685,10527,12387,13514,14709,15809,16931,18446,1(...TRUNCATED)
[["serine protease","flotillin-like protein FloA","hypothetical protein","PhoH family protein","rRNA(...TRUNCATED)
GCA_017147495.1
["AAZEDL010000001.1","AAZEDL010000002.1","AAZEDL010000003.1","AAZEDL010000004.1","AAZEDL010000005.1"(...TRUNCATED)
[["EHD5261614.1","EHD5261615.1","EHD5261616.1","EHD5261617.1","EHD5261618.1","EHD5261619.1","EHD5261(...TRUNCATED)
[["HMEDKNVYKITMPSFYVLLKKDEEDYTLKNIVMNDSGNNLLDKSLGSDDTGIVLSQLIESRLAAEKVISDTVSESEQLRNENEYLLDKINTLESSLD(...TRUNCATED)
283734
[[null,null,null,null,null,null,null,null,null,null,null,null,"nrdI",null,null,"nrdF",null,null,null(...TRUNCATED)
[[1,319,661,899,1723,1992,2866,3375,3686,4468,5160,5685,6580,6974,9643,11065,12098,12749,13005,13255(...TRUNCATED)
[[326,630,855,1456,1920,2843,3378,3686,4468,5073,5672,6374,6960,7330,10470,12084,12733,12985,13241,1(...TRUNCATED)
[["hypothetical protein","hypothetical protein","hypothetical protein","nucleoside 2-deoxyribosyltra(...TRUNCATED)
GCA_017147515.1
["AAZEDJ010000001.1","AAZEDJ010000002.1","AAZEDJ010000003.1","AAZEDJ010000004.1","AAZEDJ010000005.1"(...TRUNCATED)
[["EHD5266891.1","EHD5266892.1","EHD5266893.1","EHD5266894.1","EHD5266895.1","EHD5266896.1","EHD5266(...TRUNCATED)
[["MKEQIIERLSRYVKINTQSDPNSETTPSTERQWDLLHLLESELKAMGLDTDLDRHGYLFATLEANIETEAPTIGFLAHVDTSPDFNAANVNPQMIDN(...TRUNCATED)
283734
[["pepT",null,null,null,null,null,null,null,null,"raiA","secA","prfB","prfB",null,null,"uvrB","uvrA"(...TRUNCATED)
[[347,1594,2113,3368,4868,6082,7015,8054,9337,10070,11053,13621,13694,14933,15580,15995,17983,20830,(...TRUNCATED)
[[1570,2097,2874,4438,5926,6717,7899,9340,10005,10630,13581,13692,14725,15574,15825,17977,20826,2118(...TRUNCATED)
[["peptidase T","threonine/serine exporter family protein","threonine/serine exporter family protein(...TRUNCATED)
GCA_017159175.1
["AAZEJR010000001.1","AAZEJR010000002.1","AAZEJR010000003.1","AAZEJR010000004.1","AAZEJR010000005.1"(...TRUNCATED)
[["EHD5909118.1","EHD5909119.1","EHD5909120.1","EHD5909121.1","EHD5909122.1","EHD5909123.1","EHD5909(...TRUNCATED)
[["MFRLSSVSSKLLLSVAISVIVAIALMIAIVSFQVASYSEKEAKDTIFLSSKRYVNYIQGILNEEVTLTKGVATSLNEMFQNNDHVDIDLIESLIKNT(...TRUNCATED)
195
[[null,null,null,null,"ilvE",null,"bcp",null,"fabZ","lpxA","clpX",null,"mreC",null,null,"prpB",null,(...TRUNCATED)
[[1,1639,2148,2689,3787,5028,5231,5689,6895,7346,8130,9367,10397,11141,12312,14219,15091,16228,19422(...TRUNCATED)
[[1526,2148,2678,3771,4701,5234,5689,6780,7335,8137,9353,10407,11146,12064,14219,15094,16218,17682,1(...TRUNCATED)
[["methyl-accepting chemotaxis protein","DUF2393 domain-containing protein","DUF2393 domain-containi(...TRUNCATED)
GCA_017177295.1
["AAZESI010000001.1","AAZESI010000002.1","AAZESI010000003.1","AAZESI010000004.1","AAZESI010000005.1"(...TRUNCATED)
[["EHD6947038.1","EHD6947039.1","EHD6947040.1","EHD6947041.1","EHD6947042.1","EHD6947043.1","EHD6947(...TRUNCATED)
[["MRLDRLTNKFQLALADAQSLALGHDNQFIEPLHLMSALLNQEGGSIRPLLTSAGINAGQLRTAIDQALSRLPQVEGTGGDVQPSSELVRVLNLCDKL(...TRUNCATED)
28901
[["clpB","pgeF","rluD","bamD","raiA",null,"pheA",null,"tyrA","aroF",null,"dgcN","rplS","trmD","rimM"(...TRUNCATED)
[[449,3152,3880,4992,6001,6443,6590,7711,8677,9808,11318,11829,13206,13594,14406,14973,15474,17004,1(...TRUNCATED)
[[3022,3883,4860,5729,6339,6490,7750,8619,9798,10878,11836,13049,13553,14361,14954,15221,16835,17795(...TRUNCATED)
[["ATP-dependent chaperone ClpB","polyphenol oxidase","23S rRNA pseudouridine(1911/1915/1917) syntha(...TRUNCATED)
GCA_017184335.1
["AAZFAQ010000001.1","AAZFAQ010000002.1","AAZFAQ010000003.1","AAZFAQ010000004.1","AAZFAQ010000005.1"(...TRUNCATED)
[["EHD7791943.1","EHD7791944.1","EHD7791945.1","EHD7791946.1","EHD7791947.1","EHD7791948.1","EHD7791(...TRUNCATED)
[["MKTGRIIKSISGVYRVDVNGEMFDAKPRGLFRKKQITPIVGDIVDIDVETHASGYIQHVHERRNELKRPPVSNIDLLIVVMSAVSPDFSTQLLDRFL(...TRUNCATED)
283734
[["rsgA",null,null,null,null,null,"sdaAB","sdaAA","recG","fapR","plsX","fabD","fabG",null,null,"smc"(...TRUNCATED)
[[230,1105,1755,2467,2988,3375,6082,6766,7638,9783,10372,11351,12270,13236,14363,15098,18672,19875,2(...TRUNCATED)
[[1105,1755,2396,2655,3362,5039,6747,7635,9683,10370,11358,12277,13007,13469,15094,18670,19871,20210(...TRUNCATED)
[["ribosome small subunit-dependent GTPase A","ribulose-phosphate 3-epimerase","thiamine diphosphoki(...TRUNCATED)
GCA_017184355.1
["AAZFAR010000001.1","AAZFAR010000002.1","AAZFAR010000003.1","AAZFAR010000004.1","AAZFAR010000005.1"(...TRUNCATED)
[["EHD7787917.1","EHD7787918.1","EHD7787919.1","EHD7787920.1","EHD7787921.1","EHD7787922.1","EHD7787(...TRUNCATED)
[["MKTGRIIKSISGVYRVDVNGEMFDAKPRGLFRKKQITPIVGDIVDIDVETHASGYIQHVHERRNELKRPPVSNIDLLIVVMSAVSPDFSTQLLDRFL(...TRUNCATED)
283734
[["rsgA",null,null,null,null,null,"sdaAB","sdaAA","recG","fapR","plsX","fabD","fabG",null,null,"smc"(...TRUNCATED)
[[376,1251,1901,2613,3134,3521,6168,6852,7724,9869,10458,11437,12356,13322,14455,15190,18764,19967,2(...TRUNCATED)
[[1251,1901,2542,2801,3508,5185,6833,7721,9769,10456,11444,12363,13093,13555,15186,18762,19963,20302(...TRUNCATED)
[["ribosome small subunit-dependent GTPase A","ribulose-phosphate 3-epimerase","thiamine diphosphoki(...TRUNCATED)
End of preview. Expand in Data Studio

Dataset for antibiotic resistance prediction from whole-bacterial genomes (protein sequences)

A dataset of 25,032 bacterial genomes across 39 species with antimicrobial resistance labels.

The genome protein 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-protein-sequences", 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:

  1. Splitting the available data into 5 equal splits (sklearn.model_selection.StratifiedKFold for binary labels and sklearn.model_selection.KFold for regression labels)
  2. In each split, further dividing the larger train set into train and val, where validation makes up 20% of the train split.
  3. Training the model on the train set from the point above and monitoring the results on the validation set, using AUPRC and R2 as metrics for monitoring the performance on the validation set for binary and regression setups.
  4. 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 DNA sequence representation of the genomes see the antibiotic-resistance-protein-sequences dataset.


dataset_info: features: - name: genome_name dtype: string - name: contig_name sequence: string - name: protein_id sequence: sequence: string - name: protein_sequence sequence: sequence: string - name: taxid dtype: string - name: locus_tag sequence: sequence: string - name: start sequence: sequence: int64 - name: end sequence: sequence: int64 - name: product sequence: sequence: string splits: - name: train num_bytes: 40490436864 num_examples: 26052 download_size: 34207458365 dataset_size: 40490436864 configs: - config_name: default data_files: - split: train path: data/train-* license: apache-2.0 tags: - biology - antibiotic - resistance - bacteria - genomics size_categories: - 10K<n<100K

Downloads last month
48

Collection including macwiatrak/bacbench-antibiotic-resistance-protein-sequences