virasign

Z-score background correction

Virasign can compute a background-corrected Z-score per reported virus using water controls (e.g. negative controls). This mirrors a common idea in metagenomic reporting: quantify whether a signal is unusually high compared to background contamination.


Why use a Z-score?

Some taxa show up at low levels in many runs due to:

By comparing each virus to your water controls in the same run, the Z-score answers:

“Is this virus higher than what we typically see in water controls?”


When Virasign computes it

# Sample IDs (recommended when running via Metatropics samplesheet / POD5.csv)
virasign -i input_dir --zscore-controls H20_1,H20_2,BG_1,BG_2

# Exact FASTQ paths
virasign -i input_dir --zscore-controls /path/to/water1.fastq.gz,/path/to/water2.fastq.gz

# Or a text file (one sample ID or path per line)
virasign -i input_dir --zscore-controls water_controls.txt

When --zscore-controls is provided, Virasign does not use auto-detection (so you can exclude some “H2O_*” samples intentionally). Control samples themselves show - in the Z-score column; numeric Z-scores are only reported for non-control samples.


What signal is used

Virasign computes the Z-score using the per-hit remapped mapped_reads (the same value reported in the final per-sample JSON).


Formula

Virasign computes, for each virus, a Z-score as the number of standard deviations that the sample’s log-transformed mapped_reads signal is above/below the mean of the log-transformed mapped_reads values in the selected water controls.

This follows the same background-correction idea used by CZ ID / IDseq background models. For more information, see:


How to interpret Z-scores

Z-scores are “standard deviation units” above/below background. Practical interpretation depends on context and other evidence (coverage breadth/depth, identity, NOGR, etc.), but the table below is a useful starting point.

Z-score SD interpretation Practical interpretation
-3 3 SD below mean Below background
-1 1 SD below mean Background-like
0 At mean Background-like
1 1 SD above mean Slightly above background
2 2 SD above mean Above background
3 3 SD above mean Strongly above background
10 10 SD above mean Strongly above background
50 Extreme outlier Strongly above background
100 Extreme outlier typically only in non-water samples

Where it appears in outputs