binarize_hash_matrix: Binarize a matrix of hash counts

Description Usage Arguments Value

View source: R/hash_matrix_analysis.R

Description

If cutoff values are provided, they will be used. If not, cutoffs will be determined using select_hash_cutoff()

Usage

1
2
3
4
5
6
7
8
9
binarize_hash_matrix(
  mat,
  valid_htos = NULL,
  use_median_cut = FALSE,
  min_cut = 10,
  cutoff_vals = NULL,
  expect_equal_loading = TRUE,
  max_tries = 5
)

Arguments

mat

A matrix or sparse matrix of hash tag oligo counts. Rows must be hashes, columns must be cells

valid_htos

(optional) a character vector of valid hto sequences. Default is NULL, which will use all sequences provided as rownames(mat).

use_median_cut

a logical value indicating whether or not to use the median value of x to set a minimum threshold.

min_cut

a numeric value for the minimum number of counts to consider for select_hash_cutoff(). Default is 10.

cutoff_vals

(optional) a named numeric vector of cutoff values to apply. Length must be equal to nrow(mat), and names must exist in rownames(mat). Default is NULL, which will use select_hash_cutoff() to determine cutoff values.

expect_equal_loading

a logical value indicating if equal loading is expected. This will try to correct overrepresented hashes only (not under-represented). Default is TRUE.

max_tries

a numeric value indicating how many times to attempt adjustment if expect_equal_loading == TRUE to prevent runaway looping. Default is 5

Value

A list containing two objects:


AllenInstitute/BarMixer documentation built on Dec. 17, 2021, 8:42 a.m.