-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathqpcr_nondetect_lod_fallback.Rd
More file actions
34 lines (32 loc) · 1.21 KB
/
Copy pathqpcr_nondetect_lod_fallback.Rd
File metadata and controls
34 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/singlesample-nondetects.R
\name{qpcr_nondetect_lod_fallback}
\alias{qpcr_nondetect_lod_fallback}
\title{Limit-of-detection fallback imputation for qPCR non-detects}
\usage{
qpcr_nondetect_lod_fallback(expr_mat, lod_ct = 40, log_handler = message)
}
\arguments{
\item{expr_mat}{Numeric matrix of Ct values; NAs represent non-detects.}
\item{lod_ct}{Numeric scalar; the Ct value used to impute NAs.
Default 40.}
\item{log_handler}{Function used to emit progress messages. Default
\code{message}.}
}
\value{
Matrix of the same shape as \code{expr_mat}, with NAs filled by
\code{lod_ct}. Carries attributes \code{nondetect_method} and
\code{n_imputed}.
}
\description{
Replaces every NA in \code{expr_mat} with the supplied \code{lod_ct}
value (default 40). Used by the single-sample pipeline when Bayesian
hierarchical imputation via \code{nondetects} is unavailable or fails.
Sets \code{nondetect_method = "lod_fallback"} and \code{n_imputed}
attributes.
}
\examples{
m <- matrix(c(20, NA, 25, 30, NA, NA), nrow = 2,
dimnames = list(c("miR-1", "miR-2"), c("S1", "S2", "S3")))
qpcr_nondetect_lod_fallback(m, log_handler = function(...) invisible())
}