Skip to content

CLI Reference

Commands

factorforge optimize

Optimize a protein sequence into a host-compatible CDS (N. benthamiana by default; --host by2 for Tobacco BY-2).

factorforge optimize input.fasta -o output.fasta

Options:

Option Default Description
--engine, -e dp Engine: dp (feasibility) or profile (rule/profile)
--profile, -p balanced Optimization profile
--objective feasibility_best DP objective
--gc-min 55 Minimum GC% target
--gc-max 65 Maximum GC% target
--format fasta Output format: fasta or genbank
--host nbenthamiana Expression host: nbenthamiana or by2 (Tobacco BY-2)
--reference-id — Expert/research codon-reference ID; checksum-validated and not recommended for production defaults
--compare-profiles — Comma-separated profiles to compare (e.g. balanced,high_cai,gc_target)
--scan-mode full Rule scan: full or fast
--template — MoClo construct template

--reference-id is an expert/research path for replaying or comparing packaged codon-reference tables from data/reference/reference_policy_manifest.json. Each selected table is checksum-validated before use. Non-production tiers continue after printing a warning that quotes the manifest claim boundary; they are not production recommendations. Public REST API reference overrides remain unsupported.

Profile-engine FASTA files written with --output start with a self-describing metadata header:

>id|engine=profile|profile=<profile>|cai=<value>|gc=<value>|score=<value>

Profile FASTA headers intentionally omit objective; objective is a DP engine field, while profile output is identified by engine=profile and profile=<profile>.

API Endpoints

The web API (https://factorforge.eijex.com) exposes the following endpoints:

Endpoint Description
POST /api/optimize Single sequence optimization
POST /api/optimize/compare Compare multiple profiles side-by-side
POST /api/optimize/batch Optimize up to 20 sequences in one request

POST /api/optimize accepts the explicit development-candidate objective dp_v2_1_1 (current) and dp_v2_1 (comparison compatibility). Stable feasibility_best remains the default DP v2 path. DP v2.1.1 returns design_contract metadata for the active initiation-GC layer and 5-nt homopolymer ceiling, plus local-composition metrics and a separately evaluated 5′ MFE status. Calibration is complete on Target-mAb-A; the 36-protein holdout remains pending.

For AI agent access, use Eijex MCP which wraps these endpoints as MCP tools.

factorforge list-engines

List all available optimization engines.

factorforge list-engines

Examples

# Default (DP feasibility engine)
factorforge optimize input.fasta -o output.fasta

# Profile engine
factorforge optimize input.fasta -e profile -p balanced -o output.fasta

# GenBank output with MoClo template
factorforge optimize input.fasta -e profile -p balanced \
  --template standard_expression -o output.gb --format genbank

# Custom GC target range
factorforge optimize input.fasta --gc-min 45 --gc-max 60 -o output.fasta

# Fast scan (skip rare codon run detection)
factorforge optimize input.fasta --scan-mode fast -o output.fasta

# Expert/research reference replay or comparison
factorforge optimize input.fasta --reference-id nbenthamiana_qld183_v103

Direct experimental 3DP web API (paused by default)

Version 3.5.12 disables general 3DP web access by default. Structure actions and design_mode=paired_3dp return HTTP 403 / EXPERIMENTAL_STRUCTURE_DISABLED unless the server explicitly sets FACTORFORGE_EXPERIMENTAL_3DP_ENABLED=true. The public browser build separately keeps 3DP selection disabled. In an enabled research deployment, POST /api/optimize with design_mode=paired_3dp and a reviewed structure_context object. See experimental structure documentation for limits and mapping requirements. This stateless research path returns a 1DP/3DP pair without remote evidence recording. The separate local CLI is described below.

Local AlphaFold Server files and experimental 4DP

factorforge structure export-af3 -f protein.fasta -o job_request.json
factorforge structure ingest-af3 -c model.cif --chain A -o model.json
factorforge optimize protein.fasta --engine dp --pause-sidecar model.json -o design.fasta
factorforge self-update --check

Export and ingestion run locally. The JSON can contain sequence data, so check sharing permission before using any external service. The experimental optimizer requires one complete chain with exact amino acid identity and consecutive one-based model numbering. An offset is a computational hypothesis. External structure prediction and biological validation are separate steps.

The explicit update check compares eligible installations with public PyPI. For a Conda-managed installation, use the original Conda channel to check for updates. The command does not install packages.