missing-data | R Documentation |
This manual page describes the handling of missing values in
QFeatures objects. In the following functions, if object
is of
class QFeatures
, an optional assay index or name i
can be
specified to define the assay (by name of index) on which to
operate.
The following functions are currently available:
zeroIsNA(object, i)
replaces all 0 in object
by NA
. This
is often necessary when third-party software assume that
features that weren't quantified should be assigned an
intensity of 0.
infIsNA(object, i)
replaces all infinite values in object
by
NA
. This is necessary when third-party software divide
expression data by zero values, for instance during custom
normalization.
nNA(object, i)
returns a list of missing value summaries. The
first element nNA
gives a DataFrame
with the number and the
proportion of missing values for the whole assay; the second
element nNArows
provides a DataFrame
with the number and the
proportion of missing values for the features (rows) of the
assay(s); the third element nNAcols
provides the number and
the proportions of missing values in each sample of the
assay(s). When object
has class QFeatures
and additional
column with the assays is provided in each element's
DataFrame
.
filterNA(object, pNA, i)
removes features (rows) that contain
a proportion of more missing values of pNA
or higher.
See the Processing vignette for examples.
## S4 method for signature 'SummarizedExperiment,missing'
zeroIsNA(object, i)
## S4 method for signature 'QFeatures,integer'
zeroIsNA(object, i)
## S4 method for signature 'QFeatures,numeric'
zeroIsNA(object, i)
## S4 method for signature 'QFeatures,character'
zeroIsNA(object, i)
## S4 method for signature 'SummarizedExperiment,missing'
infIsNA(object, i)
## S4 method for signature 'QFeatures,integer'
infIsNA(object, i)
## S4 method for signature 'QFeatures,numeric'
infIsNA(object, i)
## S4 method for signature 'QFeatures,character'
infIsNA(object, i)
## S4 method for signature 'SummarizedExperiment,missing'
nNA(object, i)
## S4 method for signature 'QFeatures,integer'
nNA(object, i)
## S4 method for signature 'QFeatures,numeric'
nNA(object, i)
## S4 method for signature 'QFeatures,character'
nNA(object, i)
## S4 method for signature 'SummarizedExperiment'
filterNA(object, pNA = 0)
## S4 method for signature 'QFeatures'
filterNA(object, pNA = 0, i)
object |
An object of class |
i |
One or more indices or names of the assay(s) to be processed. |
pNA |
|
An instance of the same class as object
.
The impute()
for QFeautres
instances.
data(ft_na)
## Summary if missing values
nNA(ft_na, 1)
## Remove rows with missing values
assay(filterNA(ft_na, i = 1))
## Replace NAs by zero and back
ft_na <- impute(ft_na, i = 1, method = "zero")
assay(ft_na)
ft_na <- zeroIsNA(ft_na, 1)
assay(ft_na)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.