library(dsb) # load example data cells_citeseq_mtx and empty_drop_matrix included in package
# use a subset of cells and background droplets from example data
cells_citeseq_mtx = cells_citeseq_mtx[ ,1:400]
empty_drop_matrix = empty_drop_citeseq_mtx[ ,1:400]
# example I
adt_norm = dsb::DSBNormalizeProtein(
# step I: remove ambient protein noise reflected in counts from empty droplets
cell_protein_matrix = cells_citeseq_mtx,
empty_drop_matrix = empty_drop_matrix,
# recommended step II: model and remove the technical component of each cell's protein data
denoise.counts = TRUE,
use.isotype.control = TRUE,
isotype.control.name.vec = rownames(cells_citeseq_mtx)[67:70]
)
# example II - experiments without isotype controls
adt_norm = dsb::DSBNormalizeProtein(
cell_protein_matrix = cells_citeseq_mtx,
empty_drop_matrix = empty_drop_matrix,
denoise.counts = FALSE
)
# example III - return dsb internal stats used during denoising for each cell
# returns a 2 element list - the normalized matrix and the internal stats
dsb_output = dsb::DSBNormalizeProtein(
cell_protein_matrix = cells_citeseq_mtx,
empty_drop_matrix = empty_drop_matrix,
isotype.control.name.vec = rownames(cells_citeseq_mtx)[67:70],
return.stats = TRUE
)
# the dsb normalized matrix to be used in downstream analysis is dsb_output$dsb_normalized_matrix
# protein level stats are in dsb_output$protein_stats
# cell-level stats are in dsb_output$technical_stats
Run the code above in your browser using DataLab