# Threshold gRNA count matrix

`threshold_gRNA_matrix.Rd`

Thresholds a gRNA count matrix, producing a perturbation matrix.

    threshold_gRNA_matrix(gRNA_matrix, threshold = 3)

## Arguments

gRNA_matrix

  a gRNA-by-cell expression matrix; the matrix can be represented as a sparse matrix (as implemented by the Matrix package) or a dense matrix (as implemented by base R)

threshold

  the threshold used to assign perturbation indicators to cells; counts above the threshold are set to 1 (indicating "perturbed"), and counts below the threshold are set to 0 (indicating "unperturbed")

## Value

a binary matrix of perturbation assignments

## Examples

    data(gRNA_matrix)
    perturbation_matrix <- threshold_gRNA_matrix(gRNA_matrix)