volcano_plot | R Documentation |
Generate Volcano plot base on Deseq_analysis or indicator_analysis results
volcano_plot(inputframe, cutoff = NULL, aes_col = c("#FE5C5C", "#75ABDE"))
inputframe |
A data frame containing the results based on |
cutoff |
A numeric value specifying the fold change cutoff,should be the same as in |
aes_col |
A named vector of colors to be used in the plots |
A list of two ggplot objects, one for the fold change versus adjusted p-value plot and another for the mean abundance versus fold change or enrichment factor plot.
Wang Ningqi 2434066068@qq.com
###data prepration###
{
# Load data
data("Two_group")
# Define color based on treatment column
mycolor <- Two_group$configuration$treat_col
### DESeq analysis ###
deseq_results <- Deseq_analysis(
taxobj = Two_group,
taxlevel = "Genus",
cutoff = 1,
control_name = "Control"
)
### Or indicator analysis ###
indicator_results <- indicator_analysis(
taxobj = Two_group,
taxlevel = "Genus"
)
# Create volcano plot for DESeq results
volcano_plot <- volcano_plot(
inputframe = deseq_results,
cutoff = 1,
aes_col = mycolor
)
print(volcano_plot$FC_FDR) # Fold Change and FDR values
print(volcano_plot$Mean_FC) # Mean Fold Change values
# Create volcano plot for indicator results
volcano_plot <- volcano_plot(
inputframe = indicator_results,
cutoff = 1,
aes_col = mycolor
)
print(volcano_plot$FC_FDR) # Fold Change and FDR values
print(volcano_plot$Mean_FC) # Mean Fold Change values
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.