The autospillwin package implements the AutoSpill algorithm for calculating
spillover coefficients, used to compensate or unmix flow cytometry data. Please
note that this was developed for conventional flow cytometry. Calculation of
spillover (spectral) matrices for unmixing spectral flow cytometry samples is
dealt with better in AutoSpectral, which is not out yet.
This fork is intended to be Windows-compatible. For Mac, Unix or cluster usage, we recommend the original version.
For more details, please see:
Roca et al: AutoSpill is a principled framework that simplifies the analysis
of multichromatic flow cytometry data
Nature Communications 2021.05.17;
doi:10.1038/s41467-021-23126-8
(2021).
And Colibri Cytometry:
How does AutoSpill work?
To install autospillwin from this GitHub repository,
use the function install_github in the
devtools package.
library( devtools )
install_github( "DrCytometer/autospillwin" )You can use the standard help in R.
library( autospillwin )
? get.marker.spillover
? refine.spillovercalculate_compensation_minimal.r
Runs a calculation of compensation with autospill, without creating any figures or tables.
Requires assigning proper values to the variables: control.dir directory with the set of single-color controls control.def.file csv file defining the names and channels of the single-color controls
The creation of the fcs_control_file is critical. See the example provided.
You may also use the control_file_prep.r script to get started. Both are in the
examples folder.
library( autospillwin )
# set parameters
asp <- get.autospill.param()
# read flow controls
control.dir <- "../fcs_control_data/"
control.def.file <- "../fcs_control_data/fcs_control.csv"
flow.control <- read.flow.control( control.dir, control.def.file, asp )
# gate events before calculating spillover
flow.gate <- gate.flow.data( flow.control, asp )
# get initial spillover matrices from untransformed data
marker.spillover.unco.untr <- get.marker.spillover( TRUE, flow.gate,
flow.control, asp )
# refine spillover matrix iteratively
refine.spillover.result <- refine.spillover( marker.spillover.unco.untr,
NULL, flow.gate, flow.control, asp )
For more example scripts, see the batch folder after installing the
package.
The scripts calculate_compensation_paper.r and
calculate_compensation_paper.sh can be used to reproduce the results of
AutoSpill for single-color controls appearing in the paper above.
For this, you will need to download the datasets (FCS files and auxiliary
fcs_control.csv files) from FlowRepository:
MM1 dataset,
HS1 & HS2 datasets, and
Be1 dataset.