Visualize imputation
plot_imputation.Rd
plot_imputation
generates density plots
of all conditions for input objects, e.g. before and after imputation.
Arguments
- se
SummarizedExperiment, Data object, e.g. before imputation (output from
normalize_vsn()
).- ...
Other SummarizedExperiment object(s), E.g. data object after imputation (output from
impute()
).
Value
Density plots of all conditions
of all conditions for input objects, e.g. before and
after imputation (generated by ggplot
).
Examples
# Load example
data(Silicosis_pg)
data <- Silicosis_pg
data_unique <- make_unique(data, "Gene.names", "Protein.IDs", delim = ";")
# Construct SE
ecols <- grep("LFQ.", colnames(data_unique))
se <- make_se_parse(data_unique, ecols,mode = "delim")
# Filter and normalization
filt <- filter_se(se, thr = 0, fraction = 0.4, filter_formula = ~ Reverse != "+" & Potential.contaminant!="+")
#> filter base on missing number is <= 0 in at least one condition.
#> filter base on missing number fraction < 0.4 in each row
#> filter base on giving formula
norm <- normalize_vsn(filt)
#> vsn2: 8762 x 20 matrix (1 stratum).
#> Please use 'meanSdPlot' to verify the fit.
# imputation
imputed <- impute(norm, fun = "MinProb", q = 0.01)
#> Imputing along margin 2 (samples/columns).
#> [1] 0.3026531
# Plot imputation
plot_imputation(filt, norm, imputed)