
FastNLR scans the six reading frames of a genome assembly for amino-acid motifs and assembles them into complete and partial NLR loci with multithreading, memory-mapped input, checkpoint resume, and coordinate-consistent output.
# recommended: install from bioconda conda install bioconda::fastnlr # add channels explicitly if they are not in your conda config # (conda-forge must come before bioconda) conda install -c conda-forge -c bioconda bioconda::fastnlr # then annotate a genome fastnlr -i genome.fasta -o result
The -o directory contains the full result set prefixed by the genome
filename: *.nlr.txt, *.nlr.gff, *.nlr.bed,
*.motifs.bed, *.nbarc.fasta, *.loci.fasta,
*.stats.tsv, *.summary.txt, and *.summary.json.
Package page:
anaconda.org/bioconda/fastnlr.
One flag, one job. Compose exactly the outputs you need.
fastnlr -i genome.fasta -o results
fastnlr -i genome.fasta -o results -t 8
fastnlr -i genome.fasta -o results --no-flexible-seed # opt out
fastnlr -i genome.fasta -x custom_mot.txt -y custom_store.txt -o results
source data/motif_library_rnl_tir/flags.sh # adds 8 motifs
fastnlr -i genome.fasta --gff annotation.gff3 -o annotation_results
Browse options by task. Short flags are -i/-x/-y/-o/-t/-n; run
fastnlr --help for the command-line reference.
-i <genome.fasta>RequiredGenome FASTA input, optionally gzip-compressed.
--gff <annotation.gff3>OptionalUse GFF3 gene models instead of six-frame scanning. The longest CDS transcript is selected per gene.
-o <OUTPUT.DIR>RequiredOutput directory. It is created if missing, and the input filename becomes the output prefix.
-x <mot.txt>Built-inOptional PWM profile. The standard profile is embedded when omitted.
-y <store.txt>Built-inOptional CDF profile paired with the custom PWM file.
--flank <bp>2000Flanking bases included on each side of an extracted locus sequence.
-t <n>AutoWorker threads. Use no more than the number of physical CPU cores.
-n <n>1000Number of fragments processed per batch.
--checkpoint <dir>ResumeSave and reload validated motif results. Input, profiles, thresholds and assembly settings are fingerprinted.
--progress <mode>autoSelect auto, bar, simple or off progress reporting.
--log-level <level>infoSet trace, debug, info, warn or error logging.
--flexible-seed <n>3Seed when at least n distinct NB-ARC motifs appear in strictly increasing rank order. Enabled by default.
--no-flexible-seedStrictUse exact motif-id seed combinations only.
--require-ploopPrecisionRequire motif_1 for flexible seeding.
--relaxed-seed <n>AlternativeAccept a consecutive run containing at least n NB-ARC motifs. Requires --no-flexible-seed.
--motif-accept-p <p>1e-5Final motif acceptance p-value threshold.
--motif-prelim-p <p>1e-4Cheap prefilter threshold applied before full p-value evaluation.
--motif-category ID=CATMetadataDeclare categories outside the built-in rules, for example 21=CC,25=TIR. Repeatable or comma-separated.
--seed-combination IDSSeedsAdd an exact seed combination such as 21,4; separate multiple combinations with semicolons.
--signature IDSFilterAdd a local fragment signature such as 25,26; separate multiple signatures with semicolons.
--gff <FILE>ModeParse plain or gzipped GFF3, extract CDS and classify translated proteins with ordered HMM-only evidence. PWM and DNA-only flags are rejected.
--hmm <FILE>RepeatableAdd or override HMM models by accession; each file may contain multiple models.
Files are written into -o by default and prefixed by the input genome
filename after removing .fa, .fasta, .fna or .gz.
<prefix>.nlr.txtSix-column NLR report: sequence, name, class, start, end and strand.
<prefix>.nlr.gffGFF2 locus intervals with the live run timestamp and FastNLR as source.
<prefix>.nlr.bedBED12 motif blocks with completeness and stop-codon colours.
<prefix>.motifs.bedPer-motif intervals, scores and p-values.
<prefix>.nbarc.fastaP-loop-anchored NB-ARC multiple alignment.
<prefix>.loci.fastaLocus sequences with flanking bases and strand-aware orientation.
<prefix>.stats.tsvGlobal, per-chromosome and per-motif statistics.
<prefix>.summary.txtHuman-readable counts, class breakdown and output inventory.
<prefix>.summary.jsonMachine-readable results for GUIs, web services and R reporting.
##gff-version 2 ##source-version FastNLR V1.9.2 ##date 2026-11-09 14:53:40 ##Type DNA
<prefix>.gff.cds.fastaLongest-transcript CDS sequences in gene direction.
<prefix>.gff.proteins.fastaTranslated proteins used for ordered HMM scanning.
<prefix>.gff.domains.tsvDomain evidence with protein, CDS and genomic coordinates.
<prefix>.gff.genes.tsvAll translated gene/transcript classifications.
<prefix>.gff.nlr.tsvNLR candidate subset with class, family and domain layout.
<prefix>.gff.nlr.gff3Gene-level NLR annotations in GFF3.
<prefix>.gff.skipped.tsvModels skipped because of missing contigs or invalid structures.
<prefix>.gff.summary.txtHuman-readable run and classification summary.
<prefix>.gff.summary.jsonMachine-readable counts and domain model metadata.
A self-contained pipeline that installs from bioconda and runs out of the box on any FASTA — no extra config files, no setup.
Rust with rayon multithreading, memory-mapped FASTA parsing, and SIMD (wide) cross-window scoring. Plant genomes finish in seconds to minutes.
The standard mot.txt (PWM) and store.txt (CDF) configs are embedded at compile time. Run on any FASTA with no extra files.
Loci FASTA headers match the sliced sequence after applying --flank and contig-boundary clamping. GFF/BED report the unflanked core locus, so the intervals are equal only when --flank 0.
Add --gff to select the longest CDS transcript per annotated gene, translate it from the genome, and classify the protein with 23 bundled Pfam HMMs. LRR is accepted as C-terminal evidence only when it lies after NB-ARC. --hmm adds your own models.
--checkpoint saves motif results atomically after a complete scan; reruns skip the expensive scanning step and go straight to assembly. A versioned manifest rejects stale inputs, profiles, thresholds or runtime rules instead of silently reusing mismatched results.
Human-readable summary and TSV statistics (global / per-chromosome / per-motif) out of the box — no external tools.
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 seed combinations would have found (--no-flexible-seed restores the strict behaviour).
When the PWM library does not identify a CC/TIR domain, the locus is checked with the bundled HMMER profiles also used in GFF3-guided protein mode. HMM hits fill the missing N-terminal domain instead of leaving a bare NBARC-LRR.
Repeated or duplicated domain units and trailing NB-ARC segments are merged back into their parent locus, so a single gene is not reported as several split loci.
The default build ships 22 motif profiles: the classic 20 plus conservative RNL/helper-CC profiles 21 and 23. The repository also contains the full optional 28-motif RNL/TIR library.
| Motifs | What they add |
|---|---|
| 21–24 | RNL / helper-NLR N-terminal CC motifs (ADR1, NRG1 and Solanaceous NRC); 21 and 23 are also present in the conservative default profile. |
| 25–28 | TIR-family motifs, covering short and TIR-only loci that the standard [18,15,13] seed could miss. |
# enable the extended library (declares categories, seeds and signatures) source data/motif_library_rnl_tir/flags.sh fastnlr -i genome.fasta -o out \ -x data/motif_library_rnl_tir/mot.txt \ -y data/motif_library_rnl_tir/store.txt \ --motif-category "$TIS_MOTIF_CATEGORY" \ --seed-combination "$TIS_SEED_COMBINATION" \ --signature "$TIS_SIGNATURE"
Because these motifs live outside the built-in rule tables they must be enabled together with
their declared categories, seeds and signatures; flags.sh holds the complete
parameter lists. Historical Wm82 testing showed improved RNL/helper-NLR coverage; current
RefPlantNLR measurements are reported in the performance table below. See the
library README
for the design rationale and regeneration workflow.
Each crate owns a single responsibility; the dependency graph flows bottom-up.
mot.txt (PWM) and store.txt (CDF); embedded default config support.fastnlr.Memory-mapped FASTA parsing and SIMD scoring keep throughput flat across two orders of magnitude of genome size. Measured on 18 plant genomes, 8 threads, median of 3 runs.
| Genome | Size | Threads | Wall time | Peak RSS |
|---|---|---|---|---|
| Cucumis sativus | 197 Mb | 8 | 53.5 s | 210 MB |
| Glycine max | 991 Mb | 8 | 269.5 s | 968 MB |
| Hordeum vulgare | 4.3 Gb | 8 | 1174 s | 4159 MB |
| Zanthoxylum bungeanum | 4.7 Gb | 8 | 1230 s | 4625 MB |
Throughput holds at roughly 3.7 Mb/s end to end, and peak memory stays close to 1:1
with genome size (ratios 0.97–1.15 in the benchmark) — 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, since oversubscription costs performance.
| Recall on RefPlantNLR (400 curated NLR CDS) | Gene recall | RNL / helper NLR |
|---|---|---|
| Default (22 motifs; flexible on) | 99.75% | 8 / 8 |
| Flexible seed (explicit; same semantics) | 99.75% | 8 / 8 |
| Extended (28 motifs) | 99.75% | 6 / 8 |
| Protein mode (HMM) | 99.50% | 6 / 8 |
DNA mode reaches 96.49% domain-architecture agreement with the curated annotation —
98.19% once the 12 reference entries whose Structure and
Subclass columns contradict each other are excluded — with per-domain F1 of
1.000 (NB-ARC), 0.999 (LRR), 0.995 (TIR) and 0.989 (CC). LRR calls reach 99.7% sensitivity
at 100% specificity, and no gene is reported as split loci.
Unit, integration and documentation tests cover coordinate mapping, six-frame translation, motif scanning, three-step assembly with tandem-repeat absorption, protein-mode domain classification, seeding rules, checkpoint integrity, strict profile parsing, and every output format.
_.##date uses the current system time; checkpoint resumes retain the first-run timestamp for byte-identical output.##source-version and source column relabeled FastNLR.FastNLR is developed and maintained by the project contributors. A dedicated manuscript is in preparation; until then, please cite this repository:
FastNLR: a high-speed, accurate NLR annotation tool. github.com/CropCoder/FastNLR
Release timeline of FastNLR with a short summary of what changed in each version.
HMM filtering, completeness finalization, and deterministic motif output now share the same result path across fresh runs and checkpoint recovery. Release assets use the platform-specific Windows installer name and omit separate SHA256 summary files.
GFF3-guided gene protein annotation with longest-transcript selection, CDS translation, streaming multithreaded HMM/PWM scanning, protein/CDS/genomic domain coordinates, and an optional annotation workflow across CLI, desktop, and Web APIs.
Native Windows and Apple Silicon desktop applications with live progress, cancellation, persistent history, result tables, summary charts, and automated GitHub release packaging.
Linux x86_64 release binaries now build against glibc 2.17, restoring compatibility with CentOS 7, RHEL 8, Debian 11, Ubuntu 20.04, and newer.
TIR-specific significance threshold, evidence-weighted N-terminal arbitration, and completeness reporting temporarily disabled.
Web server, service layer, desktop scaffold, and visualization; loci extraction restricted to the matching contig; release asset naming adjustments.
Decouple plot generation from CLI outputs and ship runtime fixes.
Correct version-sensitive documentation.
Require strictly increasing rank for flexible seeding.
Document the relaxed-seeding mutual exclusion in CLI help.
Colourise logs only when attached to a terminal.
Accurate domain calls, tandem-repeat-aware assembly, and slimmed output.
Add PF12061 (R1-type CC) HMM and apply workspace-wide rustfmt/clippy cleanup.
Add protein input mode with bundled HMMER domain scanning.
Validate motif profiles and stop fabricating significant hits when the CDF is incomplete.
Make NB-ARC alignment robust to extra motifs and deduplicate motifs in assembled loci.
Add flexible seeding, a unified output directory, and plotting fixes.
Improve CLI UX by surfacing the repository, author, issues, releases, and license.
Require explicit input/output flags and align CLI and source versions.
Support motif libraries beyond 20 motifs with CLI-declared categories, seeds, and signatures; add TIR-only seeding and the optional extended RNL/TIR library; streaming chop with fragment-level parallelism.
First public release — six-frame translation, PWM+CDF motif scanning, three-step locus assembly, and multi-format output.