LFQDataPlotter | R Documentation |
LFQDataPlotter —- Create various visualization of the LFQdata
LFQDataPlotter —- Create various visualization of the LFQdata
lfq
LFQData object
prefix
prefix to figure names when writing, e.g. protein_
file_paths_pdf
with paths to figures
file_paths_html
with paths to figures
new()
create LFQDataPlotter
LFQDataPlotter$new(lfqdata, prefix = "ms_")
lfqdata
LFQData
prefix
will be prepended to outputs written
raster()
plot intensities in raster
LFQDataPlotter$raster( arrange = c("mean", "var"), not_na = FALSE, rownames = FALSE )
arrange
arrange by either mean or var
not_na
TRUE arrange by number of NA's, FALSE by arrange by intensity
rownames
show rownames (default FALSE - do not show.)
ggplot
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.
LFQDataPlotter$heatmap(na_fraction = 0.3, rownames = FALSE)
na_fraction
max fraction of NA's per row
rownames
show rownames (default FALSE - do not show.)
pheatmap
heatmap_cor()
heatmap of sample correlations.
The Spearman correlation among all samples is computed. Then the euclidean distance is used to compute the distances.
LFQDataPlotter$heatmap_cor()
pheatmap
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)
PC
default c(1,2) - first and second principal component
add_txt
show sample names
ggplot
pca_plotly()
pca plot
LFQDataPlotter$pca_plotly(PC = c(1, 2), add_txt = FALSE)
PC
default c(1,2) - first and second principal component
add_txt
show sample names
plotly
boxplots()
boxplots for all proteins
LFQDataPlotter$boxplots(facet = TRUE)
facet
enable facet wrap if hierarchy_depth less then hierarchy lenght.
tibble with column boxplots containing ggplot objects
missigness_histogram()
histogram of intensities given number of missing in conditions
LFQDataPlotter$missigness_histogram()
ggplot
NA_heatmap()
heatmap of features with missing values
LFQDataPlotter$NA_heatmap()
ggplot
intensity_distribution_density()
density distribution of intensities
LFQDataPlotter$intensity_distribution_density(legend = TRUE)
legend
show legend TRUE, FALSE do not show.
ggplot
intensity_distribution_violin()
Violinplot showing distribution of intensities in all samples
LFQDataPlotter$intensity_distribution_violin()
ggplot
pairs_smooth()
pairsplot of intensities
LFQDataPlotter$pairs_smooth(max = 10)
max
maximal number of samples to show
NULL
sample_correlation()
plot of sample correlations
LFQDataPlotter$sample_correlation()
NULL
upset_missing()
upset plot based on presence absence information
LFQDataPlotter$upset_missing()
plot
write_boxplots()
write boxplots to file
LFQDataPlotter$write_boxplots(path_qc, filename = NULL, width = 6, height = 6)
path_qc
path to write to
filename
file to write into
width
fig width
height
fig height
write_pltly()
write pltly figures to path_qc
LFQDataPlotter$write_pltly(fig, path_qc, fig_name)
fig
pltly figure
path_qc
path to write to
fig_name
file name (without extension)
path the file was written to.
write_pdf()
write figure to pdf
LFQDataPlotter$write_pdf(fig, path_qc, fig_name, width = 7, height = 7)
fig
ggplot or pheatmap
path_qc
path to write to
fig_name
name of figure (no extension)
width
figure width
height
figure height
path the file was written to
write()
write heatmaps and pca plots to files
LFQDataPlotter$write(path_qc)
path_qc
path to write to
clone()
The objects of this class are cloneable with this method.
LFQDataPlotter$clone(deep = FALSE)
deep
Whether to make a deep clone.
plot_heatmap_cor
plot_pca
Other LFQData:
LFQData
,
LFQDataAggregator
,
LFQDataStats
,
LFQDataSummariser
,
LFQDataToSummarizedExperiment()
,
LFQDataWriter
istar <- sim_lfq_data_peptide_config()
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()))
stopifnot("plotly" %in% class(lfqplotter$pca_plotly()))
tmp <- lfqplotter$boxplots()
stopifnot("ggplot" %in% class(tmp$boxplot[[1]]))
stopifnot("ggplot" %in% class(lfqplotter$missigness_histogram()))
stopifnot(class(lfqplotter$NA_heatmap()) == "pheatmap")
class(lfqplotter$intensity_distribution_density())
class(lfqplotter$intensity_distribution_violin())
## Not run:
stopifnot(is.null(lfqplotter$pairs_smooth()))
## End(Not run)
stopifnot(class(lfqplotter$sample_correlation()) == "list")
stopifnot(class(lfqplotter$raster()) == "pheatmap")
stopifnot("upset" == class(lfqplotter$upset_missing()))
stopifnot(class(prolfqua::plot_sample_correlation(istar$data, istar$config)) == "list")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.