Skip to content

Commit d406856

Browse files
munkyukim86claude
andcommitted
docs: add MkDocs site and slim README
- mkdocs.yml: Material theme, GitHub Pages deployment - docs/: index, getting-started, how-it-works, profiles, cli, output, validation, changelog - .github/workflows/docs.yml: auto-deploy on main push - README.md: slimmed down, full docs link added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 345859d commit d406856

11 files changed

Lines changed: 476 additions & 249 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.11"
27+
28+
- name: Install MkDocs
29+
run: pip install mkdocs-material
30+
31+
- name: Build docs
32+
run: mkdocs build
33+
34+
- name: Upload Pages artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: site/
38+
39+
- id: deployment
40+
name: Deploy to GitHub Pages
41+
uses: actions/deploy-pages@v4

‎README.md‎

Lines changed: 14 additions & 249 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
66
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
77
[![Version](https://img.shields.io/badge/version-3.1.0-green.svg)](https://github.com/eijex/factorforge-cds/releases)
8-
[![Web App](https://img.shields.io/badge/web-factorforge-cds.vercel.app-brightgreen.svg)](https://factorforge-cds.vercel.app)
8+
[![PyPI](https://img.shields.io/pypi/v/factorforge-cds.svg)](https://pypi.org/project/factorforge-cds/)
9+
[![Web App](https://img.shields.io/badge/web-factorforge--cds.vercel.app-brightgreen.svg)](https://factorforge-cds.vercel.app)
910

1011
FactorForge optimizes protein sequences into *N. benthamiana*-compatible CDS by maximizing CAI, controlling GC content, eliminating PolyA signals, and producing MoClo/Golden Gate-ready constructs.
1112

13+
**→ [Full Documentation](https://eijex.github.io/factorforge-cds/)**
14+
1215
---
1316

1417
## Quick Start
@@ -18,16 +21,7 @@ pip install factorforge-cds
1821
factorforge optimize my_protein.fasta -o output.fasta
1922
```
2023

21-
Or with Python:
22-
23-
```python
24-
from factorforge.engines.v2.pipeline import OptimizationPipeline
25-
26-
pipeline = OptimizationPipeline(profile="balanced")
27-
result = pipeline.run("MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEG...")
28-
print(result.sequence) # optimized CDS
29-
print(result.metadata) # CAI, GC%, scan results, domestication edits
30-
```
24+
Or use the **[web app](https://factorforge-cds.vercel.app)** — no installation required.
3125

3226
---
3327

@@ -37,267 +31,38 @@ print(result.metadata) # CAI, GC%, scan results, domestication edits
3731
|--------|-------------|------|
3832
| **Web App** | No installation, demo & light use | [factorforge-cds.vercel.app](https://factorforge-cds.vercel.app) |
3933
| **CLI / Python** | Local use, batch processing, data privacy | `pip install factorforge-cds` |
40-
| **Notebooks** | Training & experimentation on Colab / Kaggle | See [notebooks/](notebooks/) |
41-
42-
---
43-
44-
## How It Works
45-
46-
FactorForge runs a deterministic constraint-based pipeline in four stages:
47-
48-
```
49-
Protein sequence (FASTA or plain text)
50-
│
51-
▼
52-
1. Reverse Translation
53-
Selects synonymous codons to maximize CAI
54-
against the N. benthamiana codon usage table
55-
│
56-
▼
57-
2. Rule Scan
58-
Detects PolyA signals, homopolymers,
59-
CpG/TpA dinucleotide hotspots,
60-
repeat sequences, rare codon runs,
61-
forbidden restriction sites
62-
│
63-
▼
64-
3. Domestication
65-
Removes Golden Gate / MoClo-incompatible
66-
BsaI / BsmBI recognition sites via silent edits
67-
Optional custom restriction sites can be removed
68-
by synonymous substitution when feasible
69-
CpG/TpA reduction uses a CAI-budgeted balanced mode
70-
│
71-
▼
72-
4. Output
73-
Optimized CDS — FASTA or GenBank
74-
with full metrics and scan report
75-
```
76-
77-
### Optimization Profiles
78-
79-
| Profile | Description |
80-
|---------|-------------|
81-
| `balanced` | CAI + GC balance (default) |
82-
| `high_cai` | Maximum codon adaptation |
83-
| `gc_target` | Target GC 42.5% for N. benthamiana |
84-
| `viral_delivery` | Adjusted for viral vector delivery |
85-
86-
---
87-
88-
## Performance
89-
90-
Benchmarked on *N. benthamiana* codon usage table (v2 engine, 3,876 sequences):
91-
92-
| Metric | Value | Target |
93-
|--------|-------|--------|
94-
| CAI (mean) | 0.80 | ≥ 0.75 |
95-
| GC% (mean) | 42.54% | 40–55% |
96-
| GC% (range) | 40.36–53.81% | 40–55% |
97-
| AA identity | 100% | 100% |
98-
| Validator pass rate | 100% | 100% |
99-
100-
---
101-
102-
## Supported Hosts
103-
104-
| Host | Status |
105-
|------|--------|
106-
| *Nicotiana benthamiana* | ✅ Supported |
107-
| *Wolffia globosa* | 🔶 Codon table available, coming soon |
108-
| Other plant hosts | 📋 Planned |
109-
110-
---
111-
112-
## Installation
113-
114-
**Requirements:** Python 3.10+
115-
116-
```bash
117-
pip install factorforge-cds
118-
```
119-
120-
Experimental ML research modules are available separately:
121-
122-
```bash
123-
pip install "factorforge-cds[ml]"
124-
```
125-
126-
> These modules (ESM2 + BART decoder) are not part of the stable v3.1.0 default optimizer.
127-
> The default v3.1.0 engine is the constraint-based DP feasibility engine.
128-
129-
For development:
130-
131-
```bash
132-
git clone https://github.com/eijex/factorforge-cds.git
133-
cd factorforge
134-
pip install -e ".[dev]"
135-
```
136-
137-
### Docker (local web app)
138-
139-
Run the full web interface locally — no data leaves your machine:
140-
141-
```bash
142-
docker pull ghcr.io/eijex/factorforge-cds:latest
143-
docker run -p 8080:8080 ghcr.io/eijex/factorforge-cds:latest
144-
```
145-
146-
Then open [http://localhost:8080](http://localhost:8080).
147-
148-
Or build from source:
149-
150-
```bash
151-
git clone https://github.com/eijex/factorforge-cds.git
152-
cd factorforge
153-
docker build -t factorforge-cds .
154-
docker run -p 8080:8080 factorforge-cds
155-
```
156-
157-
### Updating
158-
159-
**PyPI (pip install):**
160-
161-
```bash
162-
pip install --upgrade factorforge-cds
163-
```
164-
165-
**Docker:**
166-
167-
```bash
168-
docker pull ghcr.io/eijex/factorforge-cds:latest
169-
```
170-
171-
**Git clone / local development:**
172-
173-
```bash
174-
git pull origin main
175-
pip install -e ".[dev]"
176-
```
177-
178-
To check your installed version:
179-
180-
```bash
181-
pip show factorforge-cds
182-
# or
183-
factorforge --version
184-
```
185-
186-
Release notes for each version are in [CHANGELOG.md](CHANGELOG.md).
187-
188-
---
189-
190-
## CLI Reference
191-
192-
```bash
193-
# Basic optimization (DP feasibility engine, default)
194-
factorforge optimize input.fasta -o output.fasta
195-
196-
# Rule-based engine with profile
197-
factorforge optimize input.fasta -e v2 -p balanced -o output.fasta
198-
199-
# With MoClo construct template, GenBank output
200-
factorforge optimize input.fasta -e v2 -p balanced \
201-
--template standard_expression -o output.gb --format genbank
202-
203-
# Custom GC target range
204-
factorforge optimize input.fasta --gc-min 40 --gc-max 50 -o output.fasta
205-
206-
# List available engines
207-
factorforge list-engines
208-
```
209-
210-
**Key options:**
211-
212-
| Option | Default | Description |
213-
|--------|---------|-------------|
214-
| `--engine`, `-e` | `dp` | Engine: `dp` (feasibility) or `v2` (rule-based) |
215-
| `--profile`, `-p` | `balanced` | Optimization profile |
216-
| `--objective` | `feasibility_best` | DP objective |
217-
| `--gc-min` / `--gc-max` | 40 / 55 | GC% target range |
218-
| `--format` | `fasta` or `genbank` | Output format |
219-
| `--scan-mode` | `full` | Rule scan: `full` or `fast` |
220-
221-
---
222-
223-
## Output
224-
225-
Each optimized sequence includes:
226-
227-
- **Optimized CDS** — synonymous codon replacements only, AA identity 100%
228-
- **CAI score** — codon adaptation index for *N. benthamiana*
229-
- **GC content** — global and first-region
230-
- **Scan report** — PolyA signals detected/fixed, CpG/TpA hotspots, homopolymers, rare codon runs, restriction sites
231-
- **Domestication report** — BsaI/BsmBI and optional custom restriction sites removed, edit count
232-
- **Construct ID** — reproducible hash for tracking
34+
| **Docker** | Full web interface locally | `docker pull ghcr.io/eijex/factorforge-cds:latest` |
23335

23436
---
23537

23638
## ⚠️ Validation Status
23739

238-
FactorForge predictions are **in-silico only** and have not been experimentally
239-
validated in wet-lab conditions.
240-
241-
We are actively seeking researchers to test these predictions. If you use
242-
FactorForge in your experiments, we'd love to hear from you:
243-
244-
- Did the optimized sequence express well?
245-
- How did CAI / GC% correlate with actual expression levels?
246-
- Any unexpected results?
247-
248-
**Share your results** → [GitHub Issues](https://github.com/eijex/factorforge-cds/issues)
249-
or email: eijex.lab@gmail.com
250-
251-
Validated results will be credited in [VALIDATION.md](VALIDATION.md) and future releases.
252-
253-
---
254-
255-
## 🛠️ Developed With
256-
257-
This project was built using the following tools and platforms:
258-
259-
| Tool | Role |
260-
|------|------|
261-
| [Claude](https://claude.ai) / [Claude Code](https://claude.ai/code) (Anthropic) | Architecture design, domain analysis, code review |
262-
| [Codex](https://github.com/openai/codex) (OpenAI) | Code generation and implementation |
263-
| [Google Colab](https://colab.research.google.com) | ML training experiments |
264-
| [Kaggle](https://www.kaggle.com) | ML training experiments |
265-
| [ESM2](https://github.com/facebookresearch/esm) (Meta) | Protein language model (encoder) |
266-
| [PyTorch](https://pytorch.org) | ML framework |
267-
| [Conda](https://docs.conda.io) / [Miniconda](https://docs.anaconda.com/miniconda/) | Environment management |
268-
| [Vercel](https://vercel.com) | Web deployment |
269-
| [GitHub](https://github.com) | Version control and open-source hosting |
270-
| [HuggingFace](https://huggingface.co) | Model ecosystem |
271-
| [BioPython](https://biopython.org) | Biological sequence processing |
40+
FactorForge predictions are **in-silico only** and have not been experimentally validated in wet-lab conditions. See [Validation](https://eijex.github.io/factorforge-cds/validation/) and [VALIDATION.md](VALIDATION.md).
27241

27342
---
27443

27544
## Citing
27645

277-
If you use FactorForge in your research, please cite:
278-
27946
```
28047
FactorForge v3.1.0 (2026). Open-source constraint-based CDS design engine.
28148
Eijex. https://github.com/eijex/factorforge-cds
28249
```
28350

284-
*A citable publication is in preparation. Until then, please cite the GitHub repository.*
51+
*A citable publication is in preparation.*
28552

28653
---
28754

288-
## License & Disclaimer
55+
## License
28956

290-
FactorForge source code is licensed under the [Apache License 2.0](LICENSE).
57+
Apache License 2.0 — see [LICENSE](LICENSE).
29158

292-
**Disclaimer:** FactorForge is provided for research purposes only. Predictions
293-
are computational and have not been experimentally validated. The authors make
294-
no warranties regarding expression outcomes in wet-lab settings. Use at your
295-
own discretion.
59+
**Disclaimer:** FactorForge is provided for research purposes only. Predictions are computational and have not been experimentally validated.
29660

29761
---
29862

29963
## Get in Touch
30064

301-
- **GitHub Issues** — bug reports, feature requests, wet-lab results: [github.com/eijex/factorforge-cds/issues](https://github.com/eijex/factorforge-cds/issues)
302-
- **Email** — collaborations, feedback, questions: eijex.lab@gmail.com
65+
- **Docs** — [eijex.github.io/factorforge-cds](https://eijex.github.io/factorforge-cds/)
66+
- **GitHub Issues** — bugs, features, wet-lab results: [github.com/eijex/factorforge-cds/issues](https://github.com/eijex/factorforge-cds/issues)
67+
- **Email** — eijex.lab@gmail.com
30368
- **Web** — [factorforge-cds.vercel.app](https://factorforge-cds.vercel.app)

‎docs/changelog.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Changelog
2+
3+
Full changelog: [CHANGELOG.md on GitHub](https://github.com/eijex/factorforge-cds/blob/main/CHANGELOG.md)
4+
5+
## v3.1.0 — 2026-05-24
6+
7+
### Added
8+
- **Custom restriction site removal** — synonymous substitution of user-specified restriction sites
9+
- **Rare codon run detection** — detects consecutive rare codons for ribosome stalling risk
10+
- **Dinucleotide reduction** — CAI-budgeted CpG/TpA reduction (aggressive / balanced / cai_preserving modes)
11+
12+
### Fixed
13+
- **Pipeline metric accuracy** — CAI/GC/score re-measured from final sequence after dinucleotide fix
14+
- **CAI guard weight consistency** — guard now uses Sharp & Li 1987 golden set reference weights
15+
16+
## v3.0.0 — 2026-05-23
17+
18+
First official release. DP Feasibility Engine, CLI, Validator, open-source under Apache 2.0.

0 commit comments

Comments
 (0)