Fast, self-contained NLR immune-receptor locus annotation for plant genomes
Install · Quick start · Features · Performance · Interfaces · Website · Citation
FastNLR scans the six reading frames of a genome assembly for amino-acid motifs and assembles them into NLR (Nucleotide-binding, Leucine-rich Repeat) immune-receptor loci. It combines multithreading, memory-mapped FASTA input, embedded default motif profiles, checkpoint resume, and coordinate-consistent multi-format outputs.
NLR genes encode a major class of plant intracellular immune receptors and are a key target of disease-resistance breeding. FastNLR identifies complete and partial NLR loci directly from an assembled genome, or uses an optional GFF3 annotation to translate and classify gene proteins. It is distributed through bioconda as well as prebuilt release binaries and source.
conda install bioconda::fastnlrcurl -L -o fastnlr-v1.9.2-x86_64-unknown-linux-gnu.tar.gz \
https://github.com/CropCoder/FastNLR/releases/download/v1.9.2/fastnlr-v1.9.2-x86_64-unknown-linux-gnu.tar.gz
tar -xzf fastnlr-v1.9.2-x86_64-unknown-linux-gnu.tar.gz
./fastnlr --versionRelease assets follow the fastnlr-<tag>-<target>.tar.gz naming scheme (Windows builds use
.zip, macOS assets are also .tar.gz). Linux x86_64 binaries target glibc 2.17, so they run
on CentOS 7, RHEL 8, Debian 11, Ubuntu 20.04 and newer; on older systems use the bioconda
package or build from source.
FastNLR desktop builds provide genome-only and GFF3-guided workflows in a native application. Download them from the latest GitHub Release.
| Platform | Download | Requirements |
|---|---|---|
| Windows GUI | NSIS .exe installer |
Windows 10/11 x64, WebView2 |
| macOS GUI | .dmg installer |
macOS 12+, Apple Silicon |
| Linux CLI | x86_64 .tar.gz |
glibc 2.17+ |
The initial desktop builds are not yet signed with a commercial Windows certificate or notarized with an Apple Developer ID. Windows SmartScreen and macOS Gatekeeper may therefore show a warning; these packages are suitable for evaluation while signing credentials are being prepared.
# Requires Rust 1.85+
git clone https://github.com/CropCoder/FastNLR.git
cd FastNLR
cargo build --release --locked
# binary: target/release/fastnlrPackage page: https://anaconda.org/bioconda/fastnlr · Packaging recipe: conda/
# 1. Genome (DNA) mode — built-in motif library, 8 threads
# -> results/<genome>.nlr.txt, .nlr.gff, .nlr.bed, .motifs.bed, .nbarc.fasta,
# .loci.fasta, .stats.tsv, .summary.txt, .summary.json
fastnlr -i genome.fasta -o results -t 8
# 2. GFF3 mode — translate the longest CDS transcript per annotated gene,
# then classify the proteins with ordered HMM evidence only.
# -> annotation_results/<genome>.gff.{cds.fasta,proteins.fasta,domains.tsv,
# genes.tsv,nlr.tsv,nlr.gff3,skipped.tsv,summary.txt,summary.json}
fastnlr -i genome.fasta --gff annotation.gff3 -o annotation_results
# 3. Resume a run (skips the expensive scan)
fastnlr -i genome.fasta -o results --checkpoint ckpt/Run fastnlr --help for the full flag reference, or see the
project page for annotated examples, output-format
details and benchmark results.
- Zero-config, self-contained binary — the standard
mot.txt(PWM) andstore.txt(CDF) configs are embedded at compile time; override with-x/-yfor custom motifs. - High performance — Rust + rayon multithreading, memory-mapped FASTA parsing and SIMD scoring; throughput holds at roughly 3.7 Mb/s across the benchmarked 197 Mb–4.7 Gb range.
- Flexible seeding, on by default — category/rank-based seeding runs out of the box and
recovers divergent NLR/RNL loci. It is additive: it never drops a locus that the exact
motif-id combinations would have found (
--no-flexible-seedrestores the strict behaviour). - HMM-assisted N-terminal domains — when the PWM library does not identify a CC/TIR domain,
the locus is checked with the same bundled HMMER profiles used in GFF3-guided protein mode. HMM hits fill
that missing N-terminal domain instead of leaving a bare
NBARC-LRR. - Tandem-repeat aware assembly — repeated or duplicated domain units and trailing NB-ARC segments are merged back into their parent locus, so one gene is not reported as several loci.
- High-precision defaults — TIR motifs use a stricter acceptance threshold
(
--tir-accept-p, default1e-7), and post-assembly filtering removes unsupported partial loci. Use--keep-partial-locito restore legacy behaviour. - RNL-aware default library — the default profile includes the classic 20 motifs plus
RNL/helper-CC profiles 21 and 23 and conservative
CC,1seeds. This recovers ADR1-L1 without relaxing the global PWM p-value threshold. An optional 28-motif RNL/TIR library remains available for broader exploratory scans. - GFF3-guided protein mode — with
--gff, FastNLR selects the longest CDS transcript per annotated gene, streams the genome to extract and translate CDS, then classifies the proteins with 23 bundled Pfam HMMs. The 18 LRR models are scanned only for NB-ARC/TIR candidates. LRR must lie after NB-ARC to count as C-terminal evidence. The output reports gene/transcript coordinates, protein/CDS/genomic domain coordinates, structural class, completeness and biological family (TNL/RNL/CNL/NB-only/TIR-only). - Genome-only remainder — direct protein FASTA input is no longer supported. Without GFF3, FastNLR runs the original six-frame motif assembly pipeline.
- Strict resumable runs — checkpoints include input/profile/configuration fingerprints and are reused only when the current run is compatible. Incomplete or stale checkpoints fail explicitly; every run writes human-readable and JSON summaries plus per-chromosome/per-motif TSV statistics.
Benchmarked on 18 plant genomes from 197 Mb to 4.7 Gb, 8 threads, warm cache, median of 3 runs:
| Genome | Size | Wall time | Peak RSS |
|---|---|---|---|
| Cucumis sativus (cucumber) | 197 Mb | 53.5 s | 210 MB |
| Glycine max (soybean) | 991 Mb | 269.5 s | 968 MB |
| Hordeum vulgare (barley) | 4.3 Gb | 1174 s | 4159 MB |
| Zanthoxylum bungeanum (pepper) | 4.7 Gb | 1230 s | 4625 MB |
Peak memory stays close to 1:1 with genome size (ratios 0.97–1.15), so budget RAM of the same
order as the assembly. Multithreading scales 13–19× from 4 to 128 threads on the largest genomes;
keep -t at or below the physical core count. The sensitive recall preset
(--motif-accept-p/--motif-prelim-p relaxed) is diagnostic only: it inflates runtime by
roughly 40× and is not intended for production runs.
TAIR12 reference validation: FastNLR 1.7.2 completed the standard DNA-mode workflow on
Arabidopsis thaliana TAIR12 (GCA_978657495.1, 142.5 Mb) with the built-in motif profiles
and 8 threads. It scanned 7,918 fragments, assembled 4,929 motif hits into 210 NLR loci, and
finished in 43.6 s with 162 MB peak RSS.
Accuracy (RefPlantNLR, 400 curated NLR CDS): 99.75% gene recall and 96.49%
domain-architecture agreement — rising to 98.19% when the 12 reference entries whose
Structure and Subclass columns contradict each other are excluded. Per-domain F1 is
1.000 (NB-ARC), 0.999 (LRR), 0.995 (TIR) and 0.989 (CC).
- Web server —
fastnlr-serveris a self-contained axum service with an embedded UI and a job-oriented REST API. Build withcargo build --release -p nlr-server, then runfastnlr-server --port 8787. It is also packaged as a local TBtools web plugin viapackaging/Build-TBtools-Plugin-V1.sh. - Desktop app — the Tauri 2 application in
app/provides native Windows and macOS workflows, live progress and cancellation, persistent run history, result tables, summary charts, and an interactive chromosome panorama with locus filtering and density curves while reusing the samenlr-serviceexecution layer. - AI agents — the
skills/fastnlr/directory provides a portable Agent Skill for Codex and Claude Code. - Publication plots — the
visualization/R scripts turnsummary.jsoninto chromosome maps and statistics PDFs plus an HTML report.
cargo build --release --locked # optimized build
cargo test --workspace --locked # run all Rust tests
cargo fmt --all -- --check # formatting
cargo clippy --workspace --all-targets -- -D warningsDesktop development requires Node.js 22+ and Rust 1.90+:
cd app
npm ci
npm run typecheck
npm test
npm run tauri buildThe release profile uses opt-level=3, lto="fat", codegen-units=1 and panic="abort".
CI (.github/workflows/rust.yml) builds and tests pushes to main and pull requests; pushing a
vX.Y.Z tag builds the Linux CLI plus Windows/macOS GUI installers and uploads them to GitHub
Releases.
A dedicated manuscript is in preparation. Until then, please cite this repository:
FastNLR: a high-speed, accurate NLR annotation tool. https://github.com/CropCoder/FastNLR
GPL-3.0-only. See LICENSE.