Description Usage Arguments Value
View source: R/hash_matrix_analysis.R
If cutoff values are provided, they will be used. If not, cutoffs will be determined using select_hash_cutoff()
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
)
|
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 |
A list containing two objects:
bmat: a binary sparse matrix (dgCMatrix) with dimensions equal to mat
bsummary: a data.frame with summary values for each hash tag oligo: hash_barcode, cutoff, n_pos, n_neg, frac_pos, frac_neg
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.