DIA-NN Tutorial (2.x): Download, Install and Run Your First DIA Analysis, Commands Tested on 2.3.2
Where to download DIA-NN (GitHub releases, Academia vs Enterprise), how to install it on Windows and Linux, and the exact 2.x commands for a library-free DIA run, each tested on DIA-NN 2.3.2.
Updated October 2026. This tutorial was first written around DIA-NN 1.8.1. I have since checked it against a real DIA-NN 2.3.2 run (210 SWATH runs from the public dataset PXD071192), and in a second pass ran every command below on DIA-NN 2.3.2 itself. Several of the original commands did not work: the main ones had no
--fasta-search, so DIA-NN reported "nothing to do". Each fix is marked [corrected 2026-10]. The biggest change in 2.x: the main report is nowreport.parquet, notreport.tsv; see the 2.x follow-up.
Why DIA-NN Has Become the Standard for DIA Proteomics
When DIA-NN was first released, many labs were skeptical. MaxQuant was the established gold standard. Why switch?
Two to three years and hundreds of samples later, here's my honest assessment: for DIA data, DIA-NN is fast, accurate, and free for academic use. For most DIA proteomics workflows, it has become my default tool.
This tutorial covers what you need to go from raw files to a quantified protein matrix — including the parameters that matter, the ones that don't, and the mistakes I made so you don't have to.
What is DIA-NN?
DIA-NN (Data-Independent Acquisition by Neural Networks) is software for analyzing DIA mass spectrometry data, developed by Vadim Demichev and colleagues. It is free to download, but it is not open-source: GitHub hosts the binaries and documentation, not the source code. [corrected 2026-10]
Key features:
- Neural network-based peptide scoring
- In silico spectral library generation (no experimental library required)
- Two-phase processing: each run first, then cross-run steps — plus an optional second pass with match-between-runs [corrected 2026-10]
- Runs on the CPU — no GPU acceleration [corrected 2026-10]
- Free Academia edition for non-profit academic research; a paid Enterprise edition for industry [corrected 2026-10]
Commands checked on: 2.3.2 (Linux), October 2026
Latest (Nov 2026): 2.7.0 — what changed vs 2.3.2: see the 2.7.0 upgrade post
Download: https://github.com/vdemichev/DiaNN
License: Academia edition (free, non-profit academic) / Enterprise edition (commercial) [corrected 2026-10]
DIA-NN 2.7.0 (November 2026 update): I reran my known-ratio benchmark with 2.7.0 and wrote up what changed against 2.3.2, a side-by-side install and the .wiff DLL trap in DIA-NN 2.7.0 vs 2.3.2: what changed on a known-ratio benchmark. The commands in this tutorial were checked on 2.3.2; the library and search commands in that post ran unchanged on 2.7.0.
System Requirements and Installation
Minimum Requirements
OS: Windows 10/11 (64-bit) or Linux (Ubuntu 18.04+)
CPU: 4 cores minimum, 8+ recommended
RAM: 16 GB minimum, 32 GB recommended
Storage: 100 GB+ for raw files and temporary files
GPU: not used — DIA-NN runs on the CPU [corrected 2026-10]
Installation (Windows)
Download the .msi installer for the Academia edition from the GitHub releases page and run it. The default folder is C:\DIA-NN\<version>\, and it contains both the GUI (DIA-NN.exe) and the command-line tool (diann.exe). Running diann.exe with no arguments prints the version banner. There is no --version flag.
For Sciex .wiff files, the DIA-NN README asks you to copy the Clearcore* and Sciex* DLLs from a 64-bit ProteoWizard install into the DIA-NN folder.
Installation (Linux)
# Linux builds are .zip files on the same releases page, e.g.
# DIA-NN-2.3.2-Academia-Linux.zip
unzip DIA-NN-2.3.2-Academia-Linux.zip -d ~/diann-2.3.2
chmod +x ~/diann-2.3.2/diann-linux
# Reading Thermo .raw on Linux needs the .NET 8 SDK (8.0.407 or later, per the README)
dotnet --list-sdks
The native Linux build reads .raw, .d, .mzML and .dia. It does not read .wiff; convert those to mzML or use the Windows build. [corrected 2026-10: an earlier version installed 1.8.1 from a tarball and fed it .raw files.]
Two Ways to Run It
The first version of this tutorial described three "modes". Two of them were the same thing, and the commands for both did nothing (no --fasta-search). There are really two ways in:
- Library-free (predicted library). No experimental library. DIA-NN digests the FASTA and predicts spectra and retention times with its neural networks, then searches your runs against that prediction. This is what most labs should start with, and what the steps below show.
- Existing spectral library. You already have a library (from DDA runs or a previous project) and want consistency with it. Pass it with
--liband skip the prediction step.
Step-by-Step: Full DIA-NN Workflow
Step 1: Prepare Your Input Files
Raw files:
- Supported formats: .raw (Thermo), .d (Bruker), .wiff (Sciex, Windows build only), .mzML, .dia
- Place all files from the same experiment in one folder
- Consistent naming convention helps downstream analysis
FASTA database:
# Download UniProt human reviewed proteins
wget "https://rest.uniprot.org/uniprotkb/stream?format=fasta&query=(reviewed:true)(organism_id:9606)" \
-O human_reviewed_2026.fasta
# Check entry count
grep -c "^>" human_reviewed_2026.fasta
# Should be ~20,000 entries
Step 2: Generate the Predicted Library
Every flag below was run on DIA-NN 2.3.2 (Linux), with no "unrecognised option" warnings. The modification and enzyme settings are the ones the DIA-NN GUI writes into its own command line (Trypsin/P, carbamidomethyl C fixed, Met oxidation variable, N-terminal Met excision).
mkdir -p /results/experiment1/lib # DIA-NN does not create output folders
diann-linux \
--fasta /databases/human_reviewed_2026.fasta \
--fasta-search --predictor --gen-spec-lib \
--out-lib /results/experiment1/lib/human.parquet \
--cut 'K*,R*' --missed-cleavages 1 --met-excision \
--unimod4 --var-mods 1 --var-mod UniMod:35,15.994915,M \
--min-pep-len 7 --max-pep-len 30 \
--min-pr-charge 2 --max-pr-charge 4 \
--min-pr-mz 300 --max-pr-mz 1800 --min-fr-mz 200 --max-fr-mz 1800 \
--threads 16 --verbose 1
Two things you only learn by running it:
- The file name changes. With
--out-lib …/human.parquet, 2.3.2 saved the library ashuman.predicted.speclib. That is the file to pass to--liblater. - On Linux, quote
'K*,R*', or the shell may expand the asterisks. The DIA-NN README says the same for*,;and!.
As a size check: 300 human proteins gave 79,260 precursors and took 8 seconds on 16 threads. A full reviewed human proteome takes minutes to tens of minutes on a desktop CPU.
Step 3: Understanding the Key Parameters
--fasta-search: digest the FASTA in silico. Without it, --fasta alone does nothing except protein annotation (see Common Errors).
--predictor + --gen-spec-lib: predict spectra and retention times with DIA-NN's deep learning models, and save them as a library.
--unimod4, --var-mod: fixed carbamidomethylation of C, plus variable modifications as UniMod:<id>,<mass>,<residues>. Met oxidation is UniMod:35,15.994915,M. [corrected 2026-10: an earlier version used UniMod:21 with mass 0.984; UniMod:21 is phosphorylation and 0.984 is deamidation.] Declaring a variable modification switches on peptidoform scoring automatically; DIA-NN tells you so in a warning.
--qvalue: precursor FDR threshold.
Default: 0.01 (1% FDR). Use 0.01 for anything you will publish.
--threads: CPU threads to use. DIA-NN parallelises well.
--missed-cleavages: 1 is the usual choice. 2 adds IDs at the cost of a bigger search space.
--reanalyse: match-between-runs (MBR). DIA-NN builds an empirical library from the first pass over all runs and searches every run again with it.
Measured in one real run (DIA-NN 2.3.2, 210 SWATH runs, median per run):
precursors 7,426 → 10,514 (+42%)
proteins 923 → 1,407 (+52%)
second pass ≈ 115 of 930 minutes in total
Your gain depends on the data. Worth it for final analysis, can skip for quick QC
[corrected 2026-10 — earlier text said ~10-15% and +50% runtime without a measurement]
--smart-profiling: a library-generation option. When DIA-NN builds a library from your data, it keeps the predicted spectra where it judges them more reliable than the experimental ones. [corrected 2026-10: an earlier version described it as retention-time profiling.] The DIA-NN GUI itself writes --rt-profiling together with --reanalyse.
Step 4: Running the Analysis
mkdir -p /results/experiment1
diann-linux \
--f /data/raw/sample1.raw --f /data/raw/sample2.raw --f /data/raw/sample3.raw \
--lib /results/experiment1/lib/human.predicted.speclib \
--fasta /databases/human_reviewed_2026.fasta \
--out /results/experiment1/report.parquet \
--qvalue 0.01 --matrices \
--reanalyse --rt-profiling \
--threads 16 --verbose 1
--fasta here is for protein annotation and inference, not for searching. --dir /data/raw instead of a list of --f processes every file in a folder. On Windows the same flags work with diann.exe and C:\ paths.
I checked this command on 2.3.2 for flag recognition and library loading, and ran the R code below verbatim on a test matrix. You can also do steps 2 and 4 in one call, as the GUI does: pass the raw files together with --fasta --fasta-search --predictor --gen-spec-lib.
Expected runtime [corrected 2026-10]
There is no reliable rule of thumb — it depends on the instrument, gradient, library size and thread count. One measured data point:
210 SWATH runs (TripleTOF 5600), predicted library of 5.47 million precursors,
16 threads, laptop i9-14900HX, 63 GB RAM: about 930 minutes (15.5 h) including the MBR second pass
The full log-derived numbers are in the 2.x follow-up. An earlier version of this section listed estimates such as "100 samples, ~1.5–2 hours". They were not measured, and the real run above is an order of magnitude slower — budget generously.
Step 5: Interpreting the Output
Key output files (DIA-NN 2.x; names follow --out):
report.parquet — main precursor-level report (1.8.x wrote report.tsv)
report.pg_matrix.tsv — protein group matrix
report.pr_matrix.tsv — precursor matrix [corrected 2026-10: not a protein matrix]
report.gg_matrix.tsv — gene group matrix
report.unique_genes_matrix.tsv — genes quantified from proteotypic peptides only
report.stats.tsv — per-run statistics
report.log.txt — the full log, command line first
lib.predicted.speclib — the predicted library, if you generated one
Quick QC check:
library(data.table)
library(ggplot2)
# Load results
report <- fread("/results/experiment1/report.tsv")
# DIA-NN 2.x: report <- arrow::read_parquet("/results/experiment1/report.parquet")
# Check identification numbers per sample
ids_per_run <- report[Q.Value < 0.01,
.(n_proteins = uniqueN(Protein.Group),
n_precursors = .N),
by = Run]
print(ids_per_run)
# Expected for good human plasma data:
# n_proteins: 500-800 (depleted) or 300-500 (neat)
# n_precursors: 5,000-20,000
# Visualize
ggplot(ids_per_run, aes(x = Run, y = n_proteins)) +
geom_bar(stat = "identity", fill = "steelblue") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = "Proteins per Run", y = "Protein Groups")
Check quantification quality:
# Load protein matrix
prot_matrix <- fread("/results/experiment1/report.pg_matrix.tsv")
# Missing value percentage per sample
# [corrected 2026-10] the old pattern grep("^/", ...) matched 0 columns on Windows paths
annot <- c("Protein.Group", "Protein.Ids", "Protein.Names", "Genes", "First.Protein.Description",
"N.Sequences", "N.Proteotypic.Sequences")
sample_cols <- setdiff(names(prot_matrix), annot)
mv_pct <- sapply(sample_cols, function(col) {
sum(is.na(prot_matrix[[col]])) / nrow(prot_matrix) * 100
})
cat("Missing values per sample:\n")
print(round(mv_pct, 1))
# Good data: <30% missing values
# Problematic: >50% missing values
Common Errors and Solutions
Each message below was reproduced on DIA-NN 2.3.2 while re-checking this tutorial [corrected 2026-10: the earlier list used flags that do not exist].
"FASTA digest not enabled: nothing to do"
WARNING: no spectral library provided, FASTA digest not enabled: nothing to do
You passed --fasta (and maybe --gen-spec-lib --predictor) but not --fasta-search. Without it DIA-NN does not digest the FASTA, so with no library there is nothing to search. Add --fasta-search. The first version of this tutorial had exactly this mistake in its main commands.
"cannot write log to …log.txt"
ERROR: cannot write log to lib/human.log.txt
The output folder does not exist. DIA-NN does not create it. mkdir -p the folder for --out and --out-lib first. In my test the predicted library was not saved either.
"unrecognised option"
WARNING: unrecognised option [--min-peptide-length 7]
DIA-NN does not stop on an unknown flag; it warns and carries on without it, so the setting you thought you applied silently is not applied. Read the warning summary at the end of the log. Flags from older guides (including the first version of this one) that 2.3.2 rejects: --min-peptide-length (the real one is --min-pep-len), --max-ram, --test-raw, --version, --peak-center, --no-ifs-removal.
"Failure reading input file"
ERROR: Failure reading input file a.mzML
ERROR: DIA-NN tried but failed to load the following files: a.mzML, b.mzML
Wrong format for the platform or a broken file. On Linux, .wiff is not supported. Convert with ProteoWizard msconvert to mzML, or run the Windows build. On Linux, Thermo .raw needs the .NET 8 SDK installed (see Installation).
"cannot find Clearcore2.Data.AnalystDataProvider.dll"
ERROR: cannot find Clearcore2.Data.AnalystDataProvider.dll, please copy .dll files as described in
https://github.com/vdemichev/DiaNN?tab=readme-ov-file#raw-data-formats. Wiff files will be skipped.
SCIEX .wiff on Windows without SCIEX's reading libraries. The DIA-NN installer does not include them: install ProteoWizard (64-bit, with vendor support) and copy every .dll whose name contains "Clearcore" or "Sciex" into the DIA-NN folder. A new version installed into a new folder needs them again. DIA-NN still exits with code 0 and reports 0 files will be processed, so check that line. Seen on 2.7.0 in November 2026 (details).
Low identification rate
- Check that the FASTA matches the organism and that
--cut,--missed-cleavagesand the modifications match how the samples were prepared. - Look at the mass accuracy DIA-NN reports in the log.
--individual-mass-acclets it calibrate each run separately, which helps when runs drift. - Keep
--qvalue 0.01. Loosening FDR to "get more IDs" adds false identifications, not biology.
Memory
There is no --max-ram option (2.3.2 rejects it). If a large library does not fit in memory, reduce the search space (fewer variable modifications, fewer missed cleavages, a reviewed-only FASTA), or generate the library once on a bigger machine and reuse it with --lib.
Downstream Analysis in R
This section is the short version. Using DIA-NN 2.x? The output files changed — see After DIA-NN 2.x: report.parquet and pg_matrix on 210 public runs. For the full statistics workflow see Differential Expression Analysis in Proteomics: A Complete R Pipeline, and for small sample sizes limma vs DEqMS.
Load and Prepare Data
library(data.table)
library(tidyverse)
# Load protein matrix
prot <- fread("report.pg_matrix.tsv")
# Extract sample columns and protein IDs
# [corrected 2026-10] the old pattern "\\.raw$|\\.mzML$" matched 0 columns on Sciex .wiff
# and Bruker .d data. Take everything that is not an annotation column instead:
annot <- c("Protein.Group", "Protein.Ids", "Protein.Names", "Genes", "First.Protein.Description",
"N.Sequences", "N.Proteotypic.Sequences")
sample_cols <- setdiff(names(prot), annot)
proteins <- prot$Protein.Group
# Create clean matrix
mat <- as.matrix(prot[, ..sample_cols])
rownames(mat) <- proteins
# Log2 transform
mat_log <- log2(mat + 1)
# Sample metadata (edit to match your column order)
metadata <- data.frame(
sample = sample_cols,
condition = factor(c(rep("control", 5), rep("treatment", 5))),
batch = factor(c(1,1,1,2,2,1,1,2,2,2)) # factor(): a numeric batch would be fitted as a slope
)
Normalization
library(limma)
# Quantile normalization
mat_norm <- normalizeBetweenArrays(mat_log, method = "quantile")
# Or median normalization (less aggressive)
mat_med <- sweep(mat_log, 2, apply(mat_log, 2, median, na.rm=TRUE))
mat_med <- mat_med + median(mat_log, na.rm=TRUE)
# Check normalization
boxplot(mat_norm, las=2, main="After Normalization")
Differential Expression
# Using limma for differential analysis
design <- model.matrix(~ condition + batch, data = metadata)
# Missing values: keep proteins quantified in at least 3 samples of EACH group,
# and let limma work with the remaining NAs. [corrected 2026-10] An earlier version
# replaced every NA with one global minimum, which creates artificial zero-variance groups.
ok <- rowSums(!is.na(mat_norm[, metadata$condition == "control"])) >= 3 &
rowSums(!is.na(mat_norm[, metadata$condition == "treatment"])) >= 3
mat_f <- mat_norm[ok, ]
fit <- lmFit(mat_f, design)
fit <- eBayes(fit)
results <- topTable(fit, coef = "conditiontreatment",
number = Inf, adjust.method = "BH")
# Significant proteins
sig <- results[results$adj.P.Val < 0.05 & abs(results$logFC) > 1, ]
cat("Significant proteins:", nrow(sig), "\n")
Volcano Plot
library(ggplot2)
library(ggrepel)
# Prepare data
volcano_data <- results %>%
mutate(
significance = case_when(
adj.P.Val < 0.05 & logFC > 1 ~ "Up",
adj.P.Val < 0.05 & logFC < -1 ~ "Down",
TRUE ~ "NS"
),
neg_log10_p = -log10(adj.P.Val),
label = ifelse(significance != "NS" & neg_log10_p > 5,
rownames(.), "")
)
ggplot(volcano_data, aes(x = logFC, y = neg_log10_p,
color = significance, label = label)) +
geom_point(alpha = 0.6, size = 1.5) +
geom_text_repel(size = 3, max.overlaps = 20) +
scale_color_manual(values = c("Up" = "#E74C3C",
"Down" = "#3498DB",
"NS" = "#95A5A6")) +
geom_vline(xintercept = c(-1, 1), linetype = "dashed", alpha = 0.5) +
geom_hline(yintercept = -log10(0.05), linetype = "dashed", alpha = 0.5) +
labs(title = "Differential Protein Expression",
x = "log2 Fold Change",
y = "-log10 Adjusted P-value") +
theme_classic()
DIA-NN vs MaxQuant: When to Use Which
The short version, after two to three years of using both:
- DIA data: DIA-NN. This is what it was built for, and on large DIA sets it is the practical choice.
- DDA data: MaxQuant or FragPipe. DIA-NN added DDA support only in version 2.3, and its own documentation calls it beta.
- Isobaric labels (TMT/iTRAQ): not DIA-NN. Its multiplexing (plexDIA) uses non-isobaric labels such as mTRAQ or dimethyl.
- Cost: both are free for academic use. DIA-NN 2.x commercial use needs the Enterprise licence.
For measured comparisons rather than opinions, see MaxQuant 2.8 scored against known ratios and FragPipe vs MaxQuant on the same six runs. An earlier version of this section had a star-rating table. The stars were opinion, not measurement, so it is gone.
Tips from Two to Three Years of Use
1. Use --reanalyse for the final analysis
In the 210-run example the second pass added about 40% more precursors per run for roughly 14% more time [corrected 2026-10], measured from the run log; see the 2.x follow-up.
2. Generate the predicted library once, then reuse it
Library prediction for a human proteome takes minutes to tens of minutes. If you run several batches of the same sample type with the same settings, generate it once and pass it with --lib. That also guarantees every batch was searched against the same library.
3. Check report.stats.tsv first
Before diving into results, check run-level statistics for outliers.
4. Keep the log
DIA-NN writes <out>.log.txt next to the report, with the full command line at the top. When a result looks odd months later, that first line tells you exactly which settings produced it.
5. FASTA database matters Use reviewed (Swiss-Prot) entries for well-studied organisms. Adding TrEMBL inflates the search space without a proportional gain in identifications.
Where to Go Next
- After DIA-NN 2.x: From report.parquet and pg_matrix to a Result — the follow-up: a real 210-run DIA-NN 2.3.2 analysis, including why 12% of the protein matrix failed a global 1% FDR
- DIA-NN quantification modes scored on known ratios — QuantUMS vs legacy MaxLFQ vs fragment-level re-quantification, with and without MBR
- Handling Missing Values in Proteomics — the decision you hit right after loading the DIA-NN matrix
- From DIA-NN Output to Paper Draft — the rest of the road, including the valid-value filter mistake that fakes volcano plots
- FragPipe vs MaxQuant on the same six runs — a measured comparison scored against known ratios
- DIA vs DDA in Proteomics — if you are still deciding how to acquire the data
For downstream analysis: see our R tutorial for proteomics data visualization.
Related
DIA-NN 2.3 on a Known-Answer Benchmark: How It Compares With MaxQuant and FragPipe (and Why the Comparison Has a Catch)
Oct 13 · 11 min read
ProteomicsHow to Use MaxQuant — A Step-by-Step Tutorial for Beginners
Feb 20 · 11 min read
ProteomicsHow to Analyze Mass Spectrometry Data — A Complete Beginner's Guide
Feb 20 · 10 min read
ProteomicsDIA vs DDA in Proteomics: A Comprehensive Comparison
Feb 8 · 6 min read