File size: 6,041 Bytes
94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de 94b0695 70307de | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | # Reproduction Guide
Step-by-step instructions to reproduce all analyses from:
> Harrizi S., Nait Irahal I., Kabine M. *Forbidden Words: How Nullomer Constraints Channel Regulatory Evolution in ABC Transporters.* (2025)
---
## Prerequisites
| Requirement | Minimum |
|---|---|
| Python | 3.8 or higher |
| RAM | 8 GB (16 GB recommended) |
| Disk space | ~5 GB (genome + results) |
| Internet | Required (genomes downloaded at runtime) |
---
## Setup
```bash
# Clone the repository
git clone https://huggingface.co/datasets/HarriziSaad/Nullomer
cd Nullomer
# Create a virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
```
---
## Running the Analysis
### Option 1 — Full pipeline (recommended)
```bash
bash run_all.sh
```
This runs all six scripts in order and takes approximately **60–90 minutes** on standard hardware. The main bottleneck is the NEM scanning in script 02 (~30–60 min depending on CPU).
### Option 2 — Individual scripts
Run from the repo root. Scripts must be run in order as each depends on outputs from the previous one.
```bash
python scripts/01_nullomer_identification.py # ~50 s
python scripts/02_nem_analysis.py # ~30–60 min
python scripts/03_stress_element_analysis.py # ~5 min
python scripts/04_thermodynamic_analysis.py # ~2 min
python scripts/05_ml_and_network_analysis.py # ~10 min
python scripts/06_statistical_synthesis.py # ~1 min
```
---
## What Each Script Does
| Script | Analysis | Key output |
|---|---|---|
| `01` | Identifies all 11-mer nullomers in the *S. cerevisiae* R64-1-1 genome | `results/nullomers_k11.txt` |
| `02` | Finds NEMs across 26 ABC transporter genes and 1000 bp promoters | `results/nem_comprehensive_summary.csv` |
| `03` | Scans promoters for PDRE/STRE/HSE/AP-1; correlates with NEM density | `results/stress_element_nem_correlation.csv` |
| `04` | Computes ΔG and Tm for 10,000 nullomers vs random controls | `results/thermodynamic_summary.json` |
| `05` | Random Forest prediction, GP fitness landscape, STRING network | `results/ml_model_performance.json` |
| `06` | Hypothesis tests H1–H4 and Fisher's meta-analysis | `results/statistical_synthesis.json` |
---
## Expected Key Results
Verify your run matches the manuscript by checking these values in the output files:
### `results/nullomers_k11.txt`
- Line count: **463,220**
### `results/nem_comprehensive_summary.csv`
- Total NEM count (sum of `nem_count`): **174,799**
- Promoter mean NEM density: **1,331.9 NEMs/kb**
- Gene body mean NEM density: **1,085.7 NEMs/kb**
- Promoter enrichment over gene body: **22.6%**
### `results/stress_element_nem_correlation.csv`
- PDRE sites total: **30** across 8 genes
- STRE sites total: **228**
- HSE sites total: **2,540**
- AP-1 sites total: **36**
### `results/thermodynamic_summary.json`
```json
{
"nullomer_Tm_mean": 41.73,
"random_Tm_mean": 35.56,
"nullomer_dG_mean": -13.96,
"random_dG_mean": -12.13,
"delta_dG_kcal_mol": 1.83,
"boltzmann_fold_disadvantage": 19.4,
"GC_Tm_pearson_r": 0.803,
"pct_very_stable_nullomers": 99.7,
"pct_hairpin": 22.4,
"pct_g4": 1.0,
"pct_imotif": 1.2
}
```
### `results/ml_model_performance.json`
```json
{
"test_r2": 0.760,
"test_rmse": 41.46,
"cv_r2_mean": 0.717,
"cv_r2_std": 0.045,
"gp_r2": 0.896
}
```
### `results/statistical_synthesis.json`
```json
{
"H2_PDRE_correlation": {
"spearman_rho": 0.685,
"spearman_p": 0.000111,
"linear_slope_nems_per_pdre": 85.5
},
"H4_promoter_vs_gene": {
"enrichment_pct": 22.6,
"wilcoxon_p": 0.003
},
"meta_analysis_fishers": {
"chi2_statistic": 51.32,
"combined_p": 2.28e-08
}
}
```
---
## Data Sources
All data is downloaded automatically at runtime. No manual downloads are needed.
| Resource | URL | Used by |
|---|---|---|
| *S. cerevisiae* genome R64-1-1 | Ensembl release 110 FASTA | scripts 01, 02, 03 |
| Gene annotations GFF3 | Ensembl release 110 GFF3 | scripts 02, 03 |
| Protein interactions | STRING v11.5 API (TaxID 4932, score ≥ 400) | script 05 |
---
## Troubleshooting
**Download failures** — If Ensembl is unreachable, retry or download manually:
```
https://ftp.ensembl.org/pub/release-110/fasta/saccharomyces_cerevisiae/dna/
https://ftp.ensembl.org/pub/release-110/gff3/saccharomyces_cerevisiae/
```
Place files in `data/` and rename to match the filenames used in the scripts.
**Memory errors during NEM scanning** — Script 02 holds the genome and nullomer set in memory simultaneously (~2–3 GB). Close other applications or run on a machine with more RAM.
**STRING API timeout** — Script 05 will catch the error and proceed with an empty network. The network results will be absent from `network_topology.csv` but all other outputs are unaffected.
**Missing dependencies** — Reinstall cleanly:
```bash
pip install --upgrade --force-reinstall -r requirements.txt
```
---
## Runtime Estimates
| Script | Approximate time |
|---|---|
| 01 Nullomer identification | 50 seconds |
| 02 NEM analysis | 30–60 minutes |
| 03 Stress element analysis | 5 minutes |
| 04 Thermodynamic analysis | 2 minutes |
| 05 ML and network analysis | 10 minutes |
| 06 Statistical synthesis | 1 minute |
| **Total** | **~60–90 minutes** |
Times measured on a standard laptop (8-core CPU, 16 GB RAM).
---
## Getting Help
If results do not match expected values:
1. Confirm you are running Python 3.8+ and have installed all packages from `requirements.txt`
2. Check that scripts are run from the **repo root**, not from inside `scripts/`
3. Open an issue at [https://huggingface.co/datasets/HarriziSaad/Nullomer/discussions](https://huggingface.co/datasets/HarriziSaad/Nullomer/discussions) with your Python version, OS, and the full error output
---
## Citation
```
Harrizi S., Nait Irahal I., Kabine M. (2025). Forbidden Words: How Nullomer
Constraints Channel Regulatory Evolution in ABC Transporters.
```
|