Documentation

syngen 0.9.4 - usage guide

Requirements

Python 3.9 or newer, with no mandatory compiled dependencies. Optional speed-ups (numpy, pyfastx) are used automatically when installed.

Installing

python -m pip install -U syngen

To try the development version:

python -m pip install git+https://example.invalid/syngen.git

Command line tour

Optimize a coding sequence for a host organism while keeping GC content inside a window:

syngen optimize --input cds.fa --host ecoli --gc 40-60 --out optimized.fa
# >optimized_CAImax_variant
# CAI 0.71, GC 48.3% (window max 61%), length 873 bp

Check a design against unwanted restriction sites and homopolymers:

syngen check --input optimized.fa --forbid EcoRI,HindIII,BsaI --max-homopolymer 8
# OK   no forbidden sites found
# WARN homopolymer run of 9 (A) at position 1142..1150

Validate assembly junctions for a Gibson plan described in a simple TSV file:

syngen junctions --plan assembly.tsv --overlap 25 --tm 55-65

Run over a whole batch and write a report:

syngen batch --input parts/ --report report.tsv --json report.json

Python API

from syngen import Sequence, optimize

seq = Sequence.from_fasta("cds.fa")
opt = optimize(seq, host="ecoli", gc_window=(40, 60), forbid=["EcoRI", "BsaI"])
opt.write("optimized.fa")
print(opt.metrics())

Outputs and exit codes

All subcommands write plain text to stdout and set a non-zero exit code when a hard check fails, so syngen slots into Makefiles and CI pipelines. The batch report contains one row per input record with CAI, GC, homopolymer runs and site counts.

Troubleshooting

If a host table is missing, export your own as CSV and pass it with --host-table mytable.csv. Run any command with -v for verbose logging. For anything else, please open an issue with the input FASTA (redacted) and the exact command line.