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.
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
Query Design
- Predefined Entrez queries (gene names, organism filters) identify relevant GenBank records.
Batch Retrieval
- Sequences fetched in controlled batches to respect rate limits and ensure reliability.
Quality Control & Filtering
- Records shorter than 100 bp or exhibiting parsing errors were omitted.
Metadata Extraction
For each sequence, we record:
- ID (accession number)
- Name (full FASTA description)
- Length (base-pair count)
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