View source: R/batch_detection.R
box_plot | R Documentation |
This function draws side-by-side box plots for each batch.
box_plot(
df,
title = NULL,
batch.legend.title = "Batch",
ylab = "Value",
color.set = NULL,
x.angle = 0,
x.hjust = 0.5,
x.vjust = 0.5
)
df |
A data frame used to draw the box plots. |
title |
Character, the plot title. |
batch.legend.title |
Character, the legend title of batches. |
ylab |
Character, y-axis title. |
color.set |
A vector of character, indicating the set of colors to use. The colors are represented by hexadecimal color code. |
x.angle |
Numeric, angle of x axis, in the range of
|
x.hjust |
Numeric, horizontal justification of x axis, in the range of
|
x.vjust |
Numeric, vertical justification of x axis, in the range of
|
None.
Yiwen Wang, Kim-Anh LĂȘ Cao
Scatter_Density
, density_plot
,
alignment_score
and partVar_plot
as the other
methods for batch effect detection and batch effect removal assessment.
# The first example
library(TreeSummarizedExperiment) # for functions assays(),rowData()
data('AD_data')
# centered log ratio transformed data
ad.clr <- assays(AD_data$EgData)$Clr_value
ad.batch <- rowData(AD_data$EgData)$Y.bat # batch information
names(ad.batch) <- rownames(AD_data$EgData)
ad.df <- data.frame(value = ad.clr[,1], batch = ad.batch)
box_plot(df = ad.df, title = 'OTU 12', x.angle = 30)
# The second example
colorlist <- rainbow(10)
box_plot(df = ad.df, title = 'OTU 12', color.set = colorlist, x.angle = 30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.