Datasets:

Modalities:
Text
Formats:
parquet
Libraries:
Datasets
Dask
License:
OG / README.md
andrecornman's picture
Update README.md
fefca52 verified
metadata
dataset_info:
  features:
    - name: CDS_position_ids
      sequence: int32
    - name: IGS_position_ids
      sequence: int32
    - name: CDS_ids
      sequence: string
    - name: IGS_ids
      sequence: string
    - name: CDS_seqs
      sequence: large_string
    - name: IGS_seqs
      sequence: large_string
    - name: CDS_orientations
      sequence: bool
  splits:
    - name: train
      num_bytes: 219511418153
      num_examples: 6206322
  download_size: 158645205736
  dataset_size: 219511418153
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
license: cc-by-sa-4.0

OG: An Open Genomic Dataset

The OG dataset is a subset of the Open MetaGenomic dataset (OMG).
OG contains high quality prokaryotic and viral genomes with taxonomic information, and is roughly 10x smaller than OMG.
The dataset is pre-processed into a mixed-modality dataset, with translated amino acids for protein coding sequences, and nucleic acids for intergenic sequences.

Two additional datasets are available on the HuggingFace Hub:

  • OMG: The full Open Metagenomic dataset with 3.1T base pairs.
  • OMG_prot50: A protein-only dataset generated by clustering OMG at 50% sequence identity, resulting in 207M protein sequences.

See https://github.com/TattaBio/OMG for details and example tokenization script.

Use

import datasets
ds = datasets.load_dataset('tattabio/OG')

To preview the dataset without downloading, load in streaming mode:

import datasets
ds = datasets.load_dataset('tattabio/OG', streaming=True)['train']
print(next(iter(ds)))

Format

Each row of the dataset represents a genomic scaffold, as an ordered list of amino acid coding sequences (CDS) and nucleotide intergenic sequences (IGS).

Feature Description Example
CDS_seqs A list of strings representing the amino acid CDS sequences. ['MALTKVEKRNR...', 'MLGIDNIERVK...', 'MATIKVKQVR...', 'MNLSNIKPAS...']
IGS_seqs A list of strings representing the nucleotide IGS sequences. ['AATTTAAGGAA', 'TTTTAAAAGTATCGAAAT', 'TTTTTAAAGAAAA']
CDS_position_ids A list of integers representing the position of each CDS element in the scaffold. [1, 3, 5, 6]
IGS_position_ids A list of integers representing the position of each IGS element in the scaffold. [0, 2, 4]
CDS_ids A list of string identifiers for each CDS element. ['7000000126|C1821366|CDS|gene_115413|+|84:437', '7000000126|C1821366|CDS|gene_115414|+|456:977', '7000000126|C1821366|CDS|gene_115415|+|991:1167', '7000000126|C1821366|CDS|gene_115416|+|1168:1689']
IGS_ids A list of string identifiers for each IGS element. ['7000000126|C1821366|IG|IG_000001|+|73:83', '7000000126|C1821366|IG|IG_000002|+|438:455', '7000000126|C1821366|IG|IG_000003|+|978:990']
CDS_orientations A list of booleans indicating the orientation of each CDS. True represents the forward strand, and False represents the reverse strand. [True, True, True, False]

The format for the CDS and IGS id fields is: sample_accession|contig_id|feature_type|gene_id|strand|start:end

Citation

BibTeX:

@article{Cornman2024,
  title = {The OMG dataset: An Open MetaGenomic corpus for mixed-modality genomic language modeling},
  url = {https://www.biorxiv.org/content/early/2024/08/17/2024.08.14.607850},
  DOI = {10.1101/2024.08.14.607850},
  publisher = {Cold Spring Harbor Laboratory},
  author = {Cornman, Andre and West-Roberts, Jacob and Camargo, Antonio Pedro and Roux, Simon and Beracochea, Martin and Mirdita, Milot and Ovchinnikov, Sergey and Hwang, Yunha},
  year = {2024},
}