Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Evo2 CLI

Standalone CLI repo for generating Evo2 embeddings from:

  • inline DNA sequences
  • FASTA files
  • inline genomic coordinates
  • BED files

The only external prerequisite is pixi.

Setup

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 install

That creates an environment with Evo2, FlashAttention, bedtools, samtools, pyfaidx, pysam, and the other Python dependencies needed by the CLI.

Run

Show CLI help:

pixi run help

Show extract help:

pixi run evo2 extract --help

Inline sequence:

pixi run evo2 extract \
  --sequence ACGT \
  --output ./outputs/sequence.pt

FASTA:

pixi run evo2 extract \
  --fasta ./example.fa \
  --model evo2_40b \
  --layer-name blocks.28.mlp.l3 \
  --output ./outputs/example.pt

Inline coordinate with slop:

pixi run evo2 extract \
  --coord chr1:181013-181803 \
  --reference-fasta /path/to/reference.fa \
  --slop 2000 \
  --output ./outputs/coord.pt

BED:

pixi run evo2 extract \
  --bed ./regions.bed \
  --reference-fasta /path/to/reference.fa \
  --output ./outputs/regions.pt

Output

The CLI writes one merged .pt file containing:

  • embeddings: packed tensor with shape [sum(lengths), hidden_dim]
  • offsets: per-record start offsets into embeddings
  • lengths: per-record saved lengths
  • record_ids: record ids in input order
  • records: per-record provenance and sequence metadata
  • metadata: run-level metadata such as model, layer, dtype, slop, and batch settings

For single-record runs, the output still uses this same merged schema.

Test

pixi run test

Notes

  • Coordinate parsing uses BED-like semantics: start is 0-based and end is exclusive.
  • Coordinate extraction uses bedtools slop and bedtools getfasta.
  • --output-region input keeps only the requested interval in the saved embeddings while still running Evo2 on the full context sequence.

About

get evo2 DNA embeddings

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages