Execute the core EM algorithm for transcript quantification with full parameter control. This is the main quantification phase that integrates short-read and optional long-read data.
mpaqt_postquant(
index,
sr_counts,
lr_counts = NULL,
prequant = NULL,
prior_model = NULL,
do_umi_correction = FALSE,
umi_correction_timing = "post",
normalize = "tpm",
max_iter = 100L,
tolerance = 1e-04,
prior_start = 50L,
convergence_start = 25L,
compute_uncertainty = FALSE,
verbose = TRUE
)An mpaqt_index object
An mpaqt_counts_sr object with short-read EC counts
An mpaqt_counts_lr object with long-read counts (optional)
An mpaqt_prequant object with positional weights (optional)
Prior specification: NULL (none), "shrinkage" (empirical),
"long_read" (from LR data), or a list with mean and precision vectors
Normalize each transcript P matrix so its x values
sum to 1 before running EM. This is mainly intended for UMI-based
single-cell data.
When do_umi_correction = TRUE and positional
weights are used, normalize transcript probabilities either before applying
positional weights ("pre") or after weighting ("post", default).
Normalization method: "tpm" (default), "depth", or "none"
Maximum EM iterations (default: 100)
Convergence tolerance (default: 1e-4)
Iteration to start using prior (default: 25)
Iteration to start checking convergence (default: 25)
Compute uncertainty estimates (default: FALSE)
Print progress messages (default: TRUE)
An mpaqt_quant_result object with full quantification results
Post-quantification performs the main EM algorithm that estimates transcript abundances. It can optionally use:
Positional weights from pre-quantification to correct for positional bias
Long-read data for improved isoform disambiguation
Prior information for regularization
UMI correction to renormalize P matrices for single-cell data
if (FALSE) { # \dontrun{
# Basic quantification
result <- mpaqt_postquant(
index = idx,
sr_counts = sr
)
# With long reads and bias correction
result <- mpaqt_postquant(
index = idx,
sr_counts = sr,
lr_counts = lr,
prequant = prequant
)
# With custom prior
result <- mpaqt_postquant(
index = idx,
sr_counts = sr,
prior_model = list(
mean = gene_means,
precision = 1/gene_vars
)
)
} # }