| normalise | R Documentation |
(Re)normalise a nacho object
normalise(
nacho_object,
housekeeping_genes = nacho_object@settings[["housekeeping_genes"]],
housekeeping_predict = nacho_object@settings[["housekeeping_predict"]],
housekeeping_norm = nacho_object@settings[["housekeeping_norm"]],
normalisation_method = nacho_object@settings[["normalisation_method"]],
background = nacho_object@settings[["background"]],
background_mode = nacho_object@settings[["background_mode"]],
ruv_k = nacho_object@settings[["ruv_k"]],
n_comp = nacho_object@settings[["n_comp"]],
outliers_thresholds = nacho_object@thresholds,
...
)
nacho_object |
A |
housekeeping_genes |
[character] A vector of names of the miRNAs/mRNAs
that should be used as housekeeping genes. Default is |
housekeeping_predict |
[logical] Boolean to indicate whether the housekeeping genes
should be predicted ( |
housekeeping_norm |
[logical] Boolean to indicate whether the housekeeping normalisation
should be performed.
The default is the setting stored in |
normalisation_method |
[character] |
background |
[character] How to estimate each sample's background
from its negative controls: |
background_mode |
[character] What to do with that background:
|
ruv_k |
[numeric] The number of unwanted factors RUVg removes.
|
n_comp |
[numeric] Number indicating the number of principal components to compute.
Cannot be more than n-1 samples. Default is |
outliers_thresholds |
A list of quality-control thresholds, as
returned by |
... |
Must be empty. |
When only the limits in outliers_thresholds change and the preset stays
the same, normalise() keeps the counts and stores the new thresholds; the flags follow them whenever you
read nacho_qc().
Otherwise it computes the quality-control metrics, the normalisation
factors, the normalised counts and the PCA again.
nacho_qc() lists the flags, and exclude_outliers() drops the flagged
samples.
With normalisation_method = "GLM", each sample's positive and negative
control counts plus 1 are fitted against their known concentrations
with a Poisson GLM and an identity link, and the positive factor is the
mean slope over the sample's slope.
When the fit fails for any sample, NACHO warns and uses the geometric
mean for every sample, so all samples stay on the same scale.
The recorded normalisation_method then becomes "GEO", and the failed
samples are listed in provenance$glm_fallback.
The normalisation runs in this order: raw counts, negative probe
exclusion, background (background and background_mode), positive
control factor (normalisation_method), then content factor
(housekeeping genes when housekeeping_norm is TRUE).
RUVg works on log2(count + 1) after the positive factor and returns
counts on the count scale, floored at 0.
It replaces the housekeeping scaling, so housekeeping_norm has no effect
and House_factor is not computed, and it corrects only the endogenous
and housekeeping probes.
The miRNA methods "stable_mirna", "total_mirna", "spike_in" and
"ligation" also ignore housekeeping_norm, housekeeping_genes and
housekeeping_predict.
They store their factor in House_factor, which is judged against the
House_factor threshold, and the probes they used in
provenance$content_probes.
Normalised counts are otherwise neither rounded nor floored; use
nacho_counts(x, normalised = TRUE, log2 = TRUE) for log2(count + 1).
A nacho object.
data(GSE74821)
GSE74821_geo <- normalise(GSE74821, normalisation_method = "GEO")
nacho_qc(GSE74821_geo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.