genome_id stringlengths 13 41 | contig_id listlengths 546 20.9k | feature_id listlengths 546 20.9k | molecule listlengths 546 20.9k | start listlengths 546 20.9k | end listlengths 546 20.9k | strand listlengths 546 20.9k | sequence listlengths 546 20.9k | source stringclasses 3
values |
|---|---|---|---|---|---|---|---|---|
MGYG000003871 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,(...TRUNCATED) | ["DNA","AA","AA","DNA","AA","AA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","D(...TRUNCATED) | [0,2,577,1006,1254,2879,4078,4711,5050,5437,5497,6202,6322,7071,7557,7572,11502,11686,12970,12989,0,(...TRUNCATED) | [2,581,1006,1254,2883,4082,4711,5050,5437,5497,6202,6322,7075,7557,7572,11502,11686,12970,12989,1328(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1,-1,1(...TRUNCATED) | ["CC","CPYSFEKARLVVREMADALALDLVDKNLVTDQVVLDVGYDNGNISKWGSYTGETKTDRYGRMMPKPAHGSNRLDRQTSSAKLISYAVLELYDR(...TRUNCATED) | MGnify v2.0.2 |
MGYG000116199 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","(...TRUNCATED) | [0,1,139,246,576,617,954,1860,1908,2868,3056,3293,3529,4511,5489,5771,7274,7323,8579,8687,8833,9847,(...TRUNCATED) | [1,139,246,576,617,980,1860,1908,2868,3056,3293,3529,4519,5489,5771,7274,7323,8583,8687,8833,9847,98(...TRUNCATED) | [1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,-1,1,-1,(...TRUNCATED) | ["G","PISTPPNAIVFGTGKLRIIDMLRAGIIINIVAIVVIAGVILLIGC","AAACGTCTTGAAACACCTGACGGCCCCGACGAGAGAAATTTCGTCG(...TRUNCATED) | MGnify v2.0.2 |
MGYG000002053 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,1,2,3,4,5,6,7,8,9,10,11,12,13,1,2,3,4,5(...TRUNCATED) | ["DNA","AA","AA","AA","AA","AA","AA","AA","DNA","AA","AA","DNA","AA","AA","AA","DNA","AA","DNA","AA"(...TRUNCATED) | [0,87,902,2031,3791,5112,6209,6940,7759,8367,9338,9872,9907,10841,11377,12094,12102,12825,12850,1393(...TRUNCATED) | [87,906,2054,3792,5123,6213,6944,7759,8367,9339,9872,9907,10849,11381,12094,12102,12825,12850,13939,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,-1,1,-1,-1,1,-1,1(...TRUNCATED) | ["GGCGGAGTTTCTTTTGGTTTTAGAAGAAATTCTGGATACAGCATTTCGTTTCAGACAGGAATTTGACCATACGGAGGCATGGCATAG","MERVGLLA(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300179 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","(...TRUNCATED) | [0,2,1418,1573,2885,3035,3046,4660,4808,5120,5177,5621,5629,6361,6418,7044,7446,7458,7914,8192,9125,(...TRUNCATED) | [2,1418,1573,2893,3035,3046,4660,4808,5120,5177,5621,5629,6361,6418,7054,7446,7458,7914,8192,9125,92(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,1,1,1,1,-1,1,1(...TRUNCATED) | ["GG","WGHRIPAYYCDDCGEMTVAKTAPTVCPKCGGTHLHQDEDTLDTWFSSALWPFSTLGWPEKTPELEYFYPTDVLVTGYDIIFFWVIRMVFSALE(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300104 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","AA","DNA","(...TRUNCATED) | [0,389,1148,1201,1897,1976,4660,4978,5161,7429,7506,8583,8584,11550,11958,12025,12818,13523,13645,15(...TRUNCATED) | [389,1148,1201,1897,1976,4664,4978,5161,7429,7506,8583,8584,11554,11958,12025,12826,13523,13645,1507(...TRUNCATED) | [1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | ["TGGGGTGGATAGTCGGATTCGAACCGACGGTCTCCAGTGCCACAAACTGGCGCTTTAACCAACTAAGCTATACCCACCATATGGCGCGCTTGAAGGGA(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300481 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA",(...TRUNCATED) | [0,2,1253,1777,2881,3271,3967,4315,4909,4998,5154,5518,6682,7011,8838,8898,9615,10209,11733,11841,12(...TRUNCATED) | [2,1253,1777,2881,3271,3967,4315,4909,4998,5154,5518,6682,7011,8838,8898,9615,10209,11733,11841,1238(...TRUNCATED) | [1,-1,1,-1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,(...TRUNCATED) | ["CA","MRMKNRFSKMGKSLLGAMCLLSTCGITYSCSDDYDLDEKSPSFLGESIYDELKKNPEFSTMIGLIDDVEEYKSVLSRTGSNTLFVADDAAFDR(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300533 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,1,2,3,4,5,6,7,8,9,10,11,12,1,2,3,4,5,6,7,8,9,10,11,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","AA","(...TRUNCATED) | [0,1,2980,3005,3509,3556,4261,4279,4827,5556,5601,6399,6419,7556,7587,8598,8610,9038,9923,0,1,2122,2(...TRUNCATED) | [1,2980,3005,3509,3556,4261,4279,4831,5556,5601,6399,6419,7556,7587,8598,8610,9039,9923,9925,1,2122,(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | ["G","DFAQAYSSLKSDEALCNAAKELYSFAESMPAPMEWMQEKARLYDVEKESFTESIFAKTLLDSVRTALSGLAQMCKRGAEEHGESPAFAKLFHED(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300789 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA",(...TRUNCATED) | [0,315,1386,1395,2106,2170,3031,3047,3955,4807,4875,6432,6477,7686,7751,8768,8770,9973,10230,11613,1(...TRUNCATED) | [315,1386,1395,2106,2170,3031,3047,3956,4807,4875,6432,6477,7686,7751,8768,8770,9973,10230,11613,118(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | ["TAATAAAAAGATTATTATATTTTTAATTAAGTCACAGCACAGCTTGCAGGAGTGAATAATATTTCTATGCAGGGACATATGCGGCCGTCGTTTCTTAG(...TRUNCATED) | MGnify v2.0.2 |
MGYG000300700 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA",(...TRUNCATED) | [0,2,974,1219,1858,1920,5484,5538,6708,6718,7201,7632,9822,9883,11974,12366,12470,12950,13587,14205,(...TRUNCATED) | [2,974,1219,1858,1920,5484,5538,6708,6718,7201,7632,9822,9883,11974,12366,12474,12950,13587,14205,14(...TRUNCATED) | [1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,1,-1(...TRUNCATED) | ["AC","IKKLRAMTGAGLADVKKALTEAEGDMDKAKEILRQRGQAIAAKRADRETSNGCVLAKVGEGFAAIIALKCETDFVANGADYIKLTQEIIDAAV(...TRUNCATED) | MGnify v2.0.2 |
MGYG000301384 | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2(...TRUNCATED) | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,(...TRUNCATED) | ["DNA","AA","DNA","AA","DNA","AA","AA","AA","AA","AA","DNA","AA","DNA","AA","DNA","AA","AA","DNA","A(...TRUNCATED) | [0,458,2291,2301,4896,5102,5698,6461,7870,8709,9582,9662,9839,9864,12423,12432,14603,15227,15417,173(...TRUNCATED) | [458,2291,2301,4896,5102,5699,6478,7883,8713,9582,9662,9839,9864,12423,12432,14607,15227,15417,17403(...TRUNCATED) | [1,-1,1,-1,1,1,1,1,1,1,1,1,1,1,1,-1,-1,1,1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,1,1(...TRUNCATED) | ["CTCATCGGCGAAAGTTGTAGATGCGGGCAGGATGAGGGCCAGGGCCCCCACAGCCGCGAGAAGTCTGCTCCGTCGCATAGCTGCCTTTCCAGTCAGAG(...TRUNCATED) | MGnify v2.0.2 |
BacCorpus
BacCorpus is a large-scale bacterial genome corpus for training and evaluating genome-aware genomic language models. It contains quality-controlled bacterial genomes represented at the genome level, with predicted protein-coding sequences stored as protein translations and intergenic regions stored as DNA sequences.
Genomes were deduplicated at various sequence identity levels using genome sketching, specifically: 100, 99, 98, 95, 90, 85, 80.
BacCorpus spans approximately 6.2 million unique genomes across more than 150,000 species, and over 10,000 environments. The dataset is intended for large-scale pretraining and analysis of bacterial genomic language models.
The table below shows the number of genomes at varying level of genome sketching sequence identity threshold. The lower sequence identity implies higher diversity:
The table below summarizes the number of genomes available at each genome-sketching sequence identity threshold. Lower sequence identity thresholds correspond to more aggressively deduplicated, more diverse genome sets. Configurations are cumulative: for example, the 95 configuration includes genomes from the 80, 85, 90, and 95 directories.
| Configuration | Genome sketching identity threshold | Number of genomes |
|---|---|---|
80 |
80% | 92,257 |
85 |
85% | 124,342 |
90 |
90% | 159,152 |
95 |
95% | 213,049 |
98 |
98% | 634,467 |
99 |
99% | 1,774,943 |
100 |
100% | 6,196,770 |
all |
unfiltered/all genomes | 8,889,348 |
BacCorpus was built by combining genomes from several public bacterial genome resources, including MGnify [1], SPIRE [2], HRGM [3], GTDB [4], mOTUs DB [5], and AllTheBacteria [6]. Genomes were uniformly quality controlled and annotated.
Intended Uses
This dataset is intended for:
- pretraining bacterial genomic language models;
- studying bacterial genome organisation;
- building protein, DNA, mixed-modality, or genome-aware models;
- extracting protein or intergenic DNA sequences for representation learning;
- benchmarking model architectures that use genome context.
How to Use
Because BacCorpus is large, we recommend streaming the dataset rather than downloading it locally.
from datasets import load_dataset
ds = load_dataset(
"AllTheBacteria/BacCorpus",
name="80", # choose one of: "80", "85", "90", "95", "98", "99", "100", "all"
split="train",
streaming=True,
)
example = next(iter(ds))
print(example.keys())
Schema
BacCorpus stores one row per genome. Each row contains aligned list-valued fields describing the features extracted from that genome.
| Column | Type | Description |
|---|---|---|
genome_id |
string |
Genome identifier. |
contig_id |
list<int64> |
Contig index for each feature. |
feature_id |
list<int64> |
Feature index within a contig. |
molecule |
list<string> |
Feature type: AA for translated CDS, DNA for intergenic region. |
start |
list<int64> |
Feature start coordinate. |
end |
list<int64> |
Feature end coordinate. |
strand |
list<int64> |
Feature strand, typically 1 or -1. |
sequence |
list<string> |
Protein or DNA sequence for the feature. |
source |
string |
Source database or resource. |
The list-valued columns are aligned by position, so index i across contig_id, feature_id, molecule, start, end, strand, and sequence refers to the same genomic feature.
Other resources
For deduplicated and clustered DNA and protein sequence datasets, see:
- Protein sequences: https://huggingface.co/datasets/AllTheBacteria/BacCorpus-prot-90
- Intergenic regions (DNA): https://huggingface.co/datasets/AllTheBacteria/BacCorpus-intergenic-dna-90
Citation:
TBD
References
[1] Richardson, L. et al. MGnify: the microbiome sequence data analysis resource in 2023. Nucleic Acids Research 51(D1), D753–D759 (2023). doi:10.1093/nar/gkac1080
[2] Schmidt, T. S. B. et al. SPIRE: a Searchable, Planetary-scale mIcrobiome REsource. Nucleic Acids Research 52(D1), D777–D783 (2024). doi:10.1093/nar/gkad943
[3] Almeida, A. et al. A unified catalog of 204,938 reference genomes from the human gut microbiome. Nature Biotechnology 39, 105–114 (2021). doi:10.1038/s41587-020-0603-3
[4] Parks, D. H. et al. GTDB: an ongoing census of bacterial and archaeal diversity through a phylogenetically consistent, rank normalized and complete genome-based taxonomy. Nucleic Acids Research 50(D1), D785–D794 (2022). doi:10.1093/nar/gkab776
[5] Dmitrijeva, M. et al. The mOTUs online database provides web-accessible genomic context to taxonomic profiling of microbial communities. Nucleic Acids Research 53(D1), D797–D805 (2025). doi:10.1093/nar/gkae1004
[6] Hunt, M. et al. AllTheBacteria – all bacterial genomes assembled, available, and searchable. bioRxiv (2024). doi:10.1101/2024.03.08.584059
- Downloads last month
- 12,924