Dataset Viewer (First 5GB)
Auto-converted to Parquet
The dataset viewer is not available for this split.
Rows from parquet row groups are too big to be read: 549.35 MiB (max=286.10 MiB)
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.

DNA Sequence Database from NCBI

Welcome to the curated DNA sequence dataset, automatically gathered from NCBI using the Enigma2 pipeline. This repository provides ready-to-use CSV and Parquet files for downstream machine-learning and bioinformatics tasks.

πŸ“‹ Dataset Overview

  • Scope

    • A collection of topic-specific DNA sequence sets (e.g., BRCA1, TP53, CFTR) sourced directly from NCBI’s Nucleotide database.
  • Curation Process

    1. Query Design

      • Predefined Entrez queries (gene names, organism filters) identify relevant GenBank records.
    2. Batch Retrieval

      • Sequences fetched in controlled batches to respect rate limits and ensure reliability.
    3. Quality Control & Filtering

      • Records shorter than 100 bp or exhibiting parsing errors were omitted.
    4. Metadata Extraction

      • For each sequence, we record:

        • ID (accession number)
        • Name (full FASTA description)
        • Length (base-pair count)
    5. Export

      • Data saved in both CSV and Parquet formats for seamless integration with Python, R, and big-data frameworks.

πŸ“‚ Dataset Structure

Each topic is stored in its own file under the datasets/ directory:

datasets/
β”œβ”€β”€ BRCA1_Gene_AND_Homo_sapiens_Organism.csv
β”œβ”€β”€ BRCA1_Gene_AND_Homo_sapiens_Organism.parquet
β”œβ”€β”€ TP53_Gene_AND_Homo_sapiens_Organism.csv
β”œβ”€β”€ TP53_Gene_AND_Homo_sapiens_Organism.parquet
…  

File contents (4 columns):

Column Description
id NCBI accession ID
name Full FASTA-style description
length Original sequence length (in base pairs)
sequence Raw DNA string (A/C/G/T; no alignment padding)

πŸš€ How to Use

from enigma2 import Database, EntrezQueries, convert_fasta

queries = EntrezQueries()  # contains about 20 queries
db = Database(topics=queries(), out_dir="./data/", mode='csv', email="[email protected]", retmax=500, max_rate=10, raw=True)
db.build_raw()

# inspect first record
print(ds[0])
# β†’ {'id': 'NM_007294.3', 'name': 'Homo sapiens BRCA1 transcript …', 'length': 1863, 'sequence': 'ATGGATT…'}

Or, in a Unix shell:

pip install datasets
datasets-cli download -d shivendrra/dna-ncbi -s BRCA1_Gene_AND_Homo_sapiens_Organism.csv

πŸ” Recommended Workflows

  • Feature Engineering: k-mer counting, GC content analysis
  • Sequence Modeling: RNNs, Transformers on raw DNA
  • Phylogenetic Studies: distance matrices from sequence distances

πŸ”— Source Code

The full data-gathering and processing pipeline is open-source: Enigma2

πŸ“– Citation

If you use this dataset in your work, please cite:

@misc{shivendrra_enigma2_2025,
  author = {Shivendrra, Harsh and contributors},
  title = {Enigma2 NCBI DNA Dataset},
  year = {2025},
  howpublished = {\\url{https://huggingface.co/datasets/shivendrra/EnigmaDataset}}
}

πŸ“ License

This dataset is released under the MIT License. Feel free to reuse and adaptβ€”with attribution.

Downloads last month
157