Standalone CLI repo for generating Evo2 embeddings from:
- inline DNA sequences
- FASTA files
- inline genomic coordinates
- BED files
The only external prerequisite is pixi.
Clone or download this folder as its own repo, then from the repo root run:
module load pixi # if your system provides Pixi as an environment module
pixi installThat creates an environment with Evo2, FlashAttention, bedtools, samtools, pyfaidx, pysam, and the other Python dependencies needed by the CLI.
Show CLI help:
pixi run helpShow extract help:
pixi run evo2 extract --helpInline sequence:
pixi run evo2 extract \
--sequence ACGT \
--output ./outputs/sequence.ptFASTA:
pixi run evo2 extract \
--fasta ./example.fa \
--model evo2_40b \
--layer-name blocks.28.mlp.l3 \
--output ./outputs/example.ptInline coordinate with slop:
pixi run evo2 extract \
--coord chr1:181013-181803 \
--reference-fasta /path/to/reference.fa \
--slop 2000 \
--output ./outputs/coord.ptBED:
pixi run evo2 extract \
--bed ./regions.bed \
--reference-fasta /path/to/reference.fa \
--output ./outputs/regions.ptThe CLI writes one merged .pt file containing:
embeddings: packed tensor with shape[sum(lengths), hidden_dim]offsets: per-record start offsets intoembeddingslengths: per-record saved lengthsrecord_ids: record ids in input orderrecords: per-record provenance and sequence metadatametadata: run-level metadata such as model, layer, dtype, slop, and batch settings
For single-record runs, the output still uses this same merged schema.
pixi run test- Coordinate parsing uses BED-like semantics:
startis 0-based andendis exclusive. - Coordinate extraction uses
bedtools slopandbedtools getfasta. --output-region inputkeeps only the requested interval in the saved embeddings while still running Evo2 on the full context sequence.