Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,115 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- biology
|
5 |
+
- protien-sequences
|
6 |
+
- dna-database
|
7 |
+
- raw-fasta
|
8 |
+
- dna
|
9 |
+
size_categories:
|
10 |
+
- 10M<n<100M
|
11 |
+
---
|
12 |
+
|
13 |
+
## DNA Sequence Database from NCBI
|
14 |
+
|
15 |
+
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.
|
16 |
+
|
17 |
+
## 📋 Dataset Overview
|
18 |
+
|
19 |
+
* **Scope**
|
20 |
+
|
21 |
+
* A collection of topic-specific DNA sequence sets (e.g., BRCA1, TP53, CFTR) sourced directly from NCBI’s Nucleotide database.
|
22 |
+
* **Curation Process**
|
23 |
+
|
24 |
+
1. **Query Design**
|
25 |
+
|
26 |
+
* Predefined Entrez queries (gene names, organism filters) identify relevant GenBank records.
|
27 |
+
2. **Batch Retrieval**
|
28 |
+
|
29 |
+
* Sequences fetched in controlled batches to respect rate limits and ensure reliability.
|
30 |
+
3. **Quality Control & Filtering**
|
31 |
+
|
32 |
+
* Records shorter than 100 bp or exhibiting parsing errors were omitted.
|
33 |
+
4. **Metadata Extraction**
|
34 |
+
|
35 |
+
* For each sequence, we record:
|
36 |
+
|
37 |
+
* **ID** (accession number)
|
38 |
+
* **Name** (full FASTA description)
|
39 |
+
* **Length** (base-pair count)
|
40 |
+
5. **Export**
|
41 |
+
|
42 |
+
* Data saved in both CSV and Parquet formats for seamless integration with Python, R, and big-data frameworks.
|
43 |
+
|
44 |
+
## 📂 Dataset Structure
|
45 |
+
|
46 |
+
Each topic is stored in its own file under the `datasets/` directory:
|
47 |
+
|
48 |
+
```
|
49 |
+
datasets/
|
50 |
+
├── BRCA1_Gene_AND_Homo_sapiens_Organism.csv
|
51 |
+
├── BRCA1_Gene_AND_Homo_sapiens_Organism.parquet
|
52 |
+
├── TP53_Gene_AND_Homo_sapiens_Organism.csv
|
53 |
+
├── TP53_Gene_AND_Homo_sapiens_Organism.parquet
|
54 |
+
…
|
55 |
+
```
|
56 |
+
|
57 |
+
**File contents** (4 columns):
|
58 |
+
|
59 |
+
| Column | Description |
|
60 |
+
| ---------- | ---------------------------------------------- |
|
61 |
+
| `id` | NCBI accession ID |
|
62 |
+
| `name` | Full FASTA-style description |
|
63 |
+
| `length` | Original sequence length (in base pairs) |
|
64 |
+
| `sequence` | Raw DNA string (A/C/G/T; no alignment padding) |
|
65 |
+
|
66 |
+
## 🚀 How to Use
|
67 |
+
|
68 |
+
```python
|
69 |
+
from enigma2 import Database, EntrezQueries, convert_fasta
|
70 |
+
|
71 |
+
queries = EntrezQueries() # contains about 20 queries
|
72 |
+
db = Database(topics=queries(), out_dir="./data/", mode='csv', email="[email protected]", retmax=500, max_rate=10, raw=True)
|
73 |
+
db.build_raw()
|
74 |
+
|
75 |
+
# inspect first record
|
76 |
+
print(ds[0])
|
77 |
+
# → {'id': 'NM_007294.3', 'name': 'Homo sapiens BRCA1 transcript …', 'length': 1863, 'sequence': 'ATGGATT…'}
|
78 |
+
```
|
79 |
+
|
80 |
+
Or, in a Unix shell:
|
81 |
+
|
82 |
+
```bash
|
83 |
+
pip install datasets
|
84 |
+
datasets-cli download -d shivendrra/dna-ncbi -s BRCA1_Gene_AND_Homo_sapiens_Organism.csv
|
85 |
+
```
|
86 |
+
|
87 |
+
## 🔍 Recommended Workflows
|
88 |
+
|
89 |
+
* **Feature Engineering**: k-mer counting, GC content analysis
|
90 |
+
* **Sequence Modeling**: RNNs, Transformers on raw DNA
|
91 |
+
* **Phylogenetic Studies**: distance matrices from sequence distances
|
92 |
+
|
93 |
+
## 🔗 Source Code
|
94 |
+
|
95 |
+
The full data-gathering and processing pipeline is open-source:
|
96 |
+
[Enigma2](https://github.com/shivendrra/enigma2)
|
97 |
+
|
98 |
+
|
99 |
+
## 📖 Citation
|
100 |
+
|
101 |
+
If you use this dataset in your work, please cite:
|
102 |
+
|
103 |
+
```
|
104 |
+
@misc{shivendrra_enigma2_2025,
|
105 |
+
author = {Shivendrra, Harsh and contributors},
|
106 |
+
title = {Enigma2 NCBI DNA Dataset},
|
107 |
+
year = {2025},
|
108 |
+
howpublished = {\\url{https://huggingface.co/datasets/shivendrra/EnigmaDataset}}
|
109 |
+
}
|
110 |
+
```
|
111 |
+
|
112 |
+
## 📝 License
|
113 |
+
|
114 |
+
This dataset is released under the [MIT License](LICENSE).
|
115 |
+
Feel free to reuse and adapt—with attribution.
|