Add ColiFormer training and evaluation dataset
Browse files- finetune_set.json: 4,300 high-CAI E. coli sequences for fine-tuning
- test_set.json: 100 evaluation sequences
- ecoli_processed_genes.csv: 50k+ E. coli genes with CAI annotations
- CAI.csv: Raw CAI calculation data
- Database 3_4300 gene.csv: High-quality gene subset
- organism_tai_weights.json: tAI weights for multiple organisms
- Comprehensive README with usage examples and metrics info
- .gitattributes +2 -0
- CAI.csv +3 -0
- Database 3_4300 gene.csv +3 -0
- README.md +219 -0
- ecoli_processed_genes.csv +3 -0
- finetune_set.json +3 -0
- organism_tai_weights.json +3 -0
- test_set.json +3 -0
.gitattributes
CHANGED
|
@@ -57,3 +57,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 57 |
# Video files - compressed
|
| 58 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
*.webm filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
*.csv filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
*.json filter=lfs diff=lfs merge=lfs -text
|
CAI.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9a35b4c57033796246025cc4ceac6fc66ecc17c3783f0f7ad082d279cb317c7
|
| 3 |
+
size 46840230
|
Database 3_4300 gene.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adb0008db8077a60b5b2296fff4d519bd9afa1b0c0b481e3183120336beaf1c9
|
| 3 |
+
size 5179738
|
README.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: ColiFormer Training and Evaluation Dataset
|
| 3 |
+
license: mit
|
| 4 |
+
tags:
|
| 5 |
+
- biology
|
| 6 |
+
- codon-optimization
|
| 7 |
+
- e-coli
|
| 8 |
+
- protein-synthesis
|
| 9 |
+
- bioinformatics
|
| 10 |
+
- synthetic-biology
|
| 11 |
+
size_categories:
|
| 12 |
+
- 10K<n<100K
|
| 13 |
+
task_categories:
|
| 14 |
+
- text-generation
|
| 15 |
+
- sequence-modeling
|
| 16 |
+
language:
|
| 17 |
+
- en
|
| 18 |
+
pretty_name: E. coli Codon Optimization Dataset for ColiFormer
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# ColiFormer Training and Evaluation Dataset
|
| 22 |
+
|
| 23 |
+
This dataset contains the training and evaluation data used for the **ColiFormer** model - a specialized codon optimization transformer fine-tuned for *Escherichia coli* sequences. The model achieves 6.2% better CAI (Codon Adaptation Index) scores compared to the base CodonTransformer model.
|
| 24 |
+
|
| 25 |
+
## 🔗 Related Resources
|
| 26 |
+
|
| 27 |
+
- **Model**: [saketh11/ColiFormer](https://huggingface.co/saketh11/ColiFormer)
|
| 28 |
+
- **Base Model**: [adibvafa/CodonTransformer](https://huggingface.co/adibvafa/CodonTransformer)
|
| 29 |
+
- **Paper**: [CodonTransformer: The Global Codon Optimization Benchmark](https://www.biorxiv.org/content/10.1101/2023.09.09.556981v1)
|
| 30 |
+
|
| 31 |
+
## 📁 Dataset Contents
|
| 32 |
+
|
| 33 |
+
### Core Dataset Files
|
| 34 |
+
|
| 35 |
+
#### 1. `finetune_set.json` (9.0MB)
|
| 36 |
+
**Training data for fine-tuning the ColiFormer model**
|
| 37 |
+
- **Format**: JSONL with codon-tokenized sequences
|
| 38 |
+
- **Size**: ~4,300 high-CAI E. coli gene sequences
|
| 39 |
+
- **Fields**:
|
| 40 |
+
- `idx`: Sequence identifier
|
| 41 |
+
- `codons`: Codon-tokenized DNA sequence (format: `AMINO_CODON`)
|
| 42 |
+
- `organism`: Organism ID (51 = *Escherichia coli* general)
|
| 43 |
+
- **Usage**: Fine-tuning CodonTransformer for E. coli-specific optimization
|
| 44 |
+
|
| 45 |
+
#### 2. `test_set.json` (103KB)
|
| 46 |
+
**Evaluation dataset for model testing**
|
| 47 |
+
- **Format**: JSON array of test sequences
|
| 48 |
+
- **Size**: 100 sequences
|
| 49 |
+
- **Fields**:
|
| 50 |
+
- `codons`: DNA sequence for evaluation
|
| 51 |
+
- `organism`: Organism ID (51)
|
| 52 |
+
- **Usage**: Performance evaluation and benchmarking
|
| 53 |
+
|
| 54 |
+
### Reference Data for Metrics Calculation
|
| 55 |
+
|
| 56 |
+
#### 3. `ecoli_processed_genes.csv` (55MB)
|
| 57 |
+
**Comprehensive E. coli gene dataset with CAI annotations**
|
| 58 |
+
- **Size**: ~50,000 validated E. coli gene sequences
|
| 59 |
+
- **Fields**:
|
| 60 |
+
- `gene_id`: Gene identifier from NCBI
|
| 61 |
+
- `dna_sequence`: Complete coding DNA sequence
|
| 62 |
+
- `protein_sequence`: Translated amino acid sequence
|
| 63 |
+
- `cai_score`: Calculated Codon Adaptation Index
|
| 64 |
+
- `is_high_cai`: Boolean flag for high-CAI sequences (used for filtering training data)
|
| 65 |
+
- **Usage**: CAI weight calculation, reference sequences for evaluation metrics
|
| 66 |
+
|
| 67 |
+
#### 4. `CAI.csv` (45MB)
|
| 68 |
+
**Raw CAI scores and sequences**
|
| 69 |
+
- **Fields**:
|
| 70 |
+
- `gene_id`: Gene identifier
|
| 71 |
+
- `cai_score`: CAI score
|
| 72 |
+
- `dna_sequence`: DNA sequence
|
| 73 |
+
- **Usage**: Original CAI calculation data
|
| 74 |
+
|
| 75 |
+
#### 5. `Database 3_4300 gene.csv` (4.9MB)
|
| 76 |
+
**High-CAI gene subset**
|
| 77 |
+
- **Size**: 4,300 high-quality E. coli genes
|
| 78 |
+
- **Fields**:
|
| 79 |
+
- `dna_sequence`: High-CAI DNA sequences
|
| 80 |
+
- **Usage**: Identifying high-quality sequences for training
|
| 81 |
+
|
| 82 |
+
#### 6. `organism_tai_weights.json`
|
| 83 |
+
**Organism-specific tRNA Adaptation Index (tAI) weights**
|
| 84 |
+
- **Format**: JSON with organism-specific tAI coefficients
|
| 85 |
+
- **Coverage**: Multiple organisms including *E. coli*
|
| 86 |
+
- **Usage**: Calculating tAI scores for evaluation metrics
|
| 87 |
+
|
| 88 |
+
## 📊 Metrics and Evaluation
|
| 89 |
+
|
| 90 |
+
The dataset enables calculation of multiple codon optimization metrics:
|
| 91 |
+
|
| 92 |
+
### Primary Metrics
|
| 93 |
+
- **CAI (Codon Adaptation Index)**: Measures codon usage bias relative to highly expressed genes
|
| 94 |
+
- **tAI (tRNA Adaptation Index)**: Reflects tRNA availability for translation
|
| 95 |
+
- **GC Content**: Nucleotide composition analysis
|
| 96 |
+
|
| 97 |
+
### Secondary Metrics
|
| 98 |
+
- **Restriction Sites**: Count of restriction enzyme recognition sites
|
| 99 |
+
- **Negative Cis Elements**: Regulatory sequence analysis
|
| 100 |
+
- **Homopolymer Runs**: Repetitive sequence detection
|
| 101 |
+
- **ENC (Effective Number of Codons)**: Codon usage diversity
|
| 102 |
+
- **CPB (Codon Pair Bias)**: Codon pair preferences
|
| 103 |
+
- **SCUO (Synonymous Codon Usage Order)**: Codon usage ordering
|
| 104 |
+
|
| 105 |
+
## 🔬 Model Performance
|
| 106 |
+
|
| 107 |
+
### ColiFormer vs Base Model Results
|
| 108 |
+
- **CAI Improvement**: +6.2% average improvement
|
| 109 |
+
- **Training Data**: 4,300 high-CAI E. coli sequences
|
| 110 |
+
- **Architecture**: BigBird Transformer with Adaptive Learning Methods (ALM)
|
| 111 |
+
- **Specialization**: Optimized specifically for *E. coli* codon usage patterns
|
| 112 |
+
|
| 113 |
+
### Benchmarking
|
| 114 |
+
The dataset includes comprehensive evaluation protocols comparing:
|
| 115 |
+
1. **Fine-tuned ColiFormer**: E. coli-specialized model
|
| 116 |
+
2. **Base CodonTransformer**: General-purpose model
|
| 117 |
+
3. **Naive HFC**: High-frequency codon baseline
|
| 118 |
+
|
| 119 |
+
## 🧬 Data Processing Pipeline
|
| 120 |
+
|
| 121 |
+
### 1. Data Collection
|
| 122 |
+
- Source: NCBI *E. coli* genome annotations
|
| 123 |
+
- Quality filtering: Valid ORFs, proper start/stop codons
|
| 124 |
+
- CAI calculation using relative adaptiveness
|
| 125 |
+
|
| 126 |
+
### 2. Training Set Creation
|
| 127 |
+
- Filter for `is_high_cai == True` sequences
|
| 128 |
+
- Remove duplicates based on DNA sequence
|
| 129 |
+
- Format conversion to codon-tokenized representation
|
| 130 |
+
|
| 131 |
+
### 3. Test Set Creation
|
| 132 |
+
- Sample 100 sequences from lower-CAI pool
|
| 133 |
+
- Ensure diversity and representative coverage
|
| 134 |
+
- Format for evaluation pipeline
|
| 135 |
+
|
| 136 |
+
## 📈 Usage Examples
|
| 137 |
+
|
| 138 |
+
### Loading the Dataset
|
| 139 |
+
|
| 140 |
+
```python
|
| 141 |
+
from datasets import load_dataset
|
| 142 |
+
|
| 143 |
+
# Load the complete dataset
|
| 144 |
+
dataset = load_dataset("saketh11/ColiFormer-Data")
|
| 145 |
+
|
| 146 |
+
# Load specific files
|
| 147 |
+
import pandas as pd
|
| 148 |
+
import json
|
| 149 |
+
|
| 150 |
+
# Training data
|
| 151 |
+
with open("finetune_set.json", "r") as f:
|
| 152 |
+
finetune_data = [json.loads(line) for line in f]
|
| 153 |
+
|
| 154 |
+
# Reference sequences for CAI calculation
|
| 155 |
+
processed_genes = pd.read_csv("ecoli_processed_genes.csv")
|
| 156 |
+
reference_sequences = processed_genes['dna_sequence'].tolist()
|
| 157 |
+
|
| 158 |
+
# Calculate CAI weights
|
| 159 |
+
from CAI import relative_adaptiveness
|
| 160 |
+
cai_weights = relative_adaptiveness(sequences=reference_sequences)
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
### Calculating Metrics
|
| 164 |
+
|
| 165 |
+
```python
|
| 166 |
+
from CAI import CAI
|
| 167 |
+
import json
|
| 168 |
+
|
| 169 |
+
# Load tAI weights
|
| 170 |
+
with open("organism_tai_weights.json", "r") as f:
|
| 171 |
+
tai_weights = json.load(f)["Escherichia coli general"]
|
| 172 |
+
|
| 173 |
+
# Calculate metrics for a sequence
|
| 174 |
+
dna_sequence = "ATGAAAGAACTG..." # Your sequence
|
| 175 |
+
cai_score = CAI(dna_sequence, weights=cai_weights)
|
| 176 |
+
tai_score = calculate_tAI(dna_sequence, tai_weights)
|
| 177 |
+
```
|
| 178 |
+
|
| 179 |
+
## 📚 Citation
|
| 180 |
+
|
| 181 |
+
If you use this dataset in your research, please cite:
|
| 182 |
+
|
| 183 |
+
```bibtex
|
| 184 |
+
@article{coliformer2024,
|
| 185 |
+
title={ColiFormer: Enhanced E. coli Codon Optimization with Adaptive Learning Methods},
|
| 186 |
+
author={Your Name},
|
| 187 |
+
journal={bioRxiv},
|
| 188 |
+
year={2024},
|
| 189 |
+
note={Fine-tuned model achieving 6.2\% CAI improvement over base CodonTransformer}
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
@article{codontransformer2023,
|
| 193 |
+
title={CodonTransformer: The Global Codon Optimization Benchmark},
|
| 194 |
+
author={Adibvafa Fallahpour and Bartosz Grzybowski and Seyed Pooya Alavizadeh and Ali Emami},
|
| 195 |
+
journal={bioRxiv},
|
| 196 |
+
year={2023},
|
| 197 |
+
doi={10.1101/2023.09.09.556981}
|
| 198 |
+
}
|
| 199 |
+
```
|
| 200 |
+
|
| 201 |
+
## 🔄 Data Updates
|
| 202 |
+
|
| 203 |
+
This dataset represents the training and evaluation data used for the initial ColiFormer model. Future updates may include:
|
| 204 |
+
- Additional E. coli strains and conditions
|
| 205 |
+
- Extended metric calculations
|
| 206 |
+
- Comparative analysis with other organisms
|
| 207 |
+
- Integration with experimental validation data
|
| 208 |
+
|
| 209 |
+
## ⚖️ License
|
| 210 |
+
|
| 211 |
+
This dataset is released under the MIT License. See LICENSE file for details.
|
| 212 |
+
|
| 213 |
+
## 🤝 Contributing
|
| 214 |
+
|
| 215 |
+
For questions, issues, or contributions related to this dataset, please contact the maintainers or open an issue in the associated model repository.
|
| 216 |
+
|
| 217 |
+
---
|
| 218 |
+
|
| 219 |
+
**Keywords**: codon optimization, E. coli, synthetic biology, protein expression, CAI, tAI, transformer model, bioinformatics
|
ecoli_processed_genes.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ba914cb86cc7e95dccb69eb1e66316fc1acef5959e43ecda76bcd2624df24ed
|
| 3 |
+
size 57968059
|
finetune_set.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:739cc17e78ab790af8a92590475e6e81bddc1436b2e9bb00eaad0829f89ccddf
|
| 3 |
+
size 9409765
|
organism_tai_weights.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a077add9cbb49b706c5ed4b39821dd7fd0b60804639f4c9d4ab75c0cbeddee72
|
| 3 |
+
size 6507
|
test_set.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d9676c1c9d0c9e29b5b44b62907f4193c297643fa4741b5c0c8f1138340c18b
|
| 3 |
+
size 105129
|