R/LFQDataPlotter.R
    LFQDataPlotter.RdLFQDataPlotter —- Create various visualization of the LFQdata
LFQDataPlotter —- Create various visualization of the LFQdata
lfqLFQData object
prefixprefix to figure names when writing, e.g. protein_
file_paths_pdfwith paths to figures
file_paths_htmlwith paths to figures
raster()plot intensities in raster
LFQDataPlotter$raster(
  arrange = c("mean", "var"),
  not_na = FALSE,
  rownames = FALSE
)heatmap()heatmap of intensities - columns are samples, rows are proteins or peptides.
The abundances of each protein (row) are z-scored. Afterward, the mean abundance for each protein is zero, and the standard variation is one. z-scoring allows to compare (cluster) the proteins according to the difference in the expression in the samples. Without the z-scoring, the proteins would group according to their abundance, e.g., high abundant proteins would be one cluster.
heatmap_cor()heatmap of sample correlations.
The Spearman correlation among all samples is computed. Then the euclidean distance is used to compute the distances.
pca()PCA plot
A PCA is applied and the first and second principal component are shown.
LFQDataPlotter$pca(PC = c(1, 2), add_txt = TRUE)missigness_histogram()histogram of intensities given number of missing in conditions
intensity_distribution_violin()Violinplot showing distribution of intensities in all samples
pairs_smooth()pairsplot of intensities
write_pdf()write figure to pdf
write()write heatmaps and pca plots to files
istar <- sim_lfq_data_peptide_config()
#> creating sampleName from fileName column
#> completing cases
#> completing cases done
#> setup done
lfqdata <- LFQData$new(
 istar$data,
 istar$config)
#LFQDataPlotter$debug("boxplots")
LFQDataPlotter$debug("pairs_smooth")
lfqplotter <- lfqdata$get_Plotter()
stopifnot(class(lfqplotter$heatmap()) == "pheatmap")
stopifnot(class(lfqplotter$heatmap_cor()) == "pheatmap")
stopifnot("ggplot" %in% class(lfqplotter$pca()))
#> Joining with `by = join_by(sampleName)`
stopifnot("plotly" %in%  class(lfqplotter$pca_plotly()))
#> Joining with `by = join_by(sampleName)`
tmp <- lfqplotter$boxplots()
stopifnot("ggplot" %in%  class(tmp$boxplot[[1]]))
stopifnot("ggplot" %in% class(lfqplotter$missigness_histogram()))
#> Warning: >>>> deprecated! <<<< 
#> 
#>           use summarize_stats_factors instead.
#> completing cases
#> isotopeLabel ~ group_
stopifnot(class(lfqplotter$NA_heatmap()) == "pheatmap")
#> rows with NA's: 16; all rows :28
class(lfqplotter$intensity_distribution_density())
#> [1] "gg"     "ggplot"
class(lfqplotter$intensity_distribution_violin())
#> [1] "gg"     "ggplot"
if (FALSE) { # \dontrun{
  stopifnot(is.null(lfqplotter$pairs_smooth()))
} # }
stopifnot(class(lfqplotter$sample_correlation()) == "list")
stopifnot(class(lfqplotter$raster()) == "pheatmap")
stopifnot("upset" == class(lfqplotter$upset_missing()))
#> completing cases
stopifnot(class(prolfqua::plot_sample_correlation(istar$data, istar$config)) == "list")