AutoFFinder is a runtime-reconfigurable hardware-software co-design for multi-gRNA CRISPR/Cas9 off-target search:
- ReLev (FPGA stage): high-throughput Levenshtein automata candidate generation.
- PostAutoFFinder (CPU stage): exact alignment reconstruction and biological filtering.
This repository stores the project code and is organized as a two-stage pipeline. It is not a single one-command tool.
ReLev/– FPGA code and host code for candidate generation (submodule).PostAutoFFinder/– Java post-processing code that consumes ReLev outputs and produces final off-target CSV results.
Use the ReLev documentation for build and execution details:
If cloning from scratch, make sure the submodule is available:
git submodule update --init --recursive- Java 17 (tested with OpenJDK 17)
javac -d bin PostAutoFFinder/*.javajava -cp bin PostAutoFFinder.AutoOffTargetSearchAlign \
<Genome reference FASTA> \
<gRNA file path> \
<Output prefix> \
<maxE> <maxM> <maxMB> <maxB> \
<Threads> \
<Best-in-window> <Best-window-size> \
<PAM> <Allow PAM edits> \
<ReLev output folder>
AutoOffTargetSearchAlignexpects 13 positional arguments in exactly this order.
- Multi-FASTA is supported.
- Each record is split into per-chromosome text files internally by
PostAutoFFinder.
- Plain text file, one guide per line.
- Each line should include the guide with PAM suffix (for example,
NNNNNNNNNNNNNNNNNNNNNGG). - Allowed characters are DNA bases and
N(see sgRNAs.txt for an example).
This folder must contain ReLev candidate matches per chromosome and strand in text files named:
<chromosome>_fw.txtfor forward strand<chromosome>_rc.txtfor reverse-complement strand
where <chromosome> must match the chromosome filenames generated from the FASTA headers.
Each file must contain one candidate match per line in this format:
<end_position>:<target_id>
<end_position>: integer genomic end position reported by ReLev.<target_id>: zero-based index of the gRNA in the input gRNA file.
- Genome reference FASTA: Path to the FASTA genome.
- gRNA file path: Path to text file containing guides (one per line, including PAM).
- Output prefix: Output prefix. Final file is written as
<Output prefix>.csv. - maxE: Maximum total edits (integer).
- maxM: Maximum mismatches when no bulges are used (integer).
- maxMB: Maximum mismatches when bulges are used (integer).
- maxB: Maximum bulges (integer).
- Threads: Number of CPU threads for post-processing (integer).
- Best-in-window:
trueorfalse. - Best-window-size: Window size used when argument 9 is
true(integer). - PAM: PAM sequence, e.g.
NGG. - Allow PAM edits:
trueorfalse. - ReLev output folder: Folder containing ReLev candidate files (
*_fw.txt,*_rc.txt).
PostAutoFFinder writes one CSV file (<Output prefix>.csv) with columns:
ChromosomeStrandEndPositionTargetSiteSeqPlusMaxEditsBefore#EditAlignedTargetAlignedText#Mismatches#Bulges