### Install ggVolcano Package Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Instructions for installing the development version of the ggVolcano package from GitHub using devtools. ```R # install.packages("devtools") devtools::install_github("BioSenior/ggVolcano") ``` -------------------------------- ### Basic gradual_volcano Plot Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Demonstrates the basic usage of the `gradual_volcano` function to create a volcano plot with gradient coloring. Similar to `ggvolcano`, it requires DEG data and allows customization of labels and point sizes. The gradient coloring is applied based on the magnitude of change. ```R # plot gradual_volcano(deg_data, x = "log2FoldChange", y = "padj", label = "row", label_number = 10, output = FALSE) ``` -------------------------------- ### Customize gradual_volcano Plot Colors Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Illustrates how to customize the fill and color schemes for a gradient volcano plot using `gradual_volcano`. Users can provide color palettes from packages like `RColorBrewer` or `ggsci` to achieve desired visual effects. ```R library(RColorBrewer) # Change the fill and color manually: p1 <- gradual_volcano(data, x = "log2FoldChange", y = "padj", fills = brewer.pal(5, "RdYlBu"), colors = brewer.pal(8, "RdYlBu"), label = "row", label_number = 10, output = FALSE) p2 <- gradual_volcano(data, x = "log2FoldChange", y = "padj", label = "row", label_number = 10, output = FALSE)+ ggsci::scale_color_gsea()+ ggsci::scale_fill_gsea() library(patchwork) p1|p2 # You can adjust the size range of the points using `pointSizeRange = c(min_size,max_size)`. ``` -------------------------------- ### Basic ggvolcano Plotting Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Generates a standard volcano plot using differential expression data and GO term information. Requires 'deg_data' and 'term_data' dataframes. The plot maps log2 fold change to adjusted p-value, with gene labels. ```r data("term_data") # plot term_volcano(deg_data, term_data, x = "log2FoldChange", y = "padj", label = "row", label_number = 10, output = FALSE) ``` -------------------------------- ### Basic ggvolcano Plot Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Demonstrates the basic usage of the `ggvolcano` function to create a general volcano plot. It requires a DEG result data frame with columns for GeneName, Log2FC, pValue, and FDR. The `add_regulate` function can be used to add a 'regulate' column if it's missing. Key parameters include the data frame, x-axis (Log2FC), y-axis (FDR), label column, and the number of labels to display. ```R library(ggVolcano) ## basic example code # load the data data(deg_data) # use the function -- add_regulate to add a regulate column # to the DEG result data. data <- add_regulate(deg_data, log2FC_name = "log2FoldChange", fdr_name = "padj",log2FC = 1, fdr = 0.05) # plot ggvolcano(data, x = "log2FoldChange", y = "padj", label = "row", label_number = 10, output = FALSE) ``` -------------------------------- ### Customize ggvolcano Plot Colors Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Shows how to customize the fill and color aesthetics of a volcano plot generated by `ggvolcano`. This can be done manually by providing color vectors or by using external color scales from packages like `ggsci`. ```R # Change the fill and color manually: p1 <- ggvolcano(data, x = "log2FoldChange", y = "padj", fills = c("#e94234","#b4b4d8","#269846"), colors = c("#e94234","#b4b4d8","#269846"), label = "row", label_number = 10, output = FALSE) p2 <- ggvolcano(data, x = "log2FoldChange", y = "padj", label = "row", label_number = 10, output = FALSE)+ ggsci::scale_color_aaas()+ ggsci::scale_fill_aaas() library(patchwork) p1|p2 ``` -------------------------------- ### Customize ggvolcano Plot Appearance Source: https://github.com/biosenior/ggvolcano/blob/main/README.md Customizes the appearance of the ggvolcano plot, including point fill colors based on gene terms, general point color, and legend background. Utilizes RColorBrewer for color palettes. Dependencies include RColorBrewer. ```r library(RColorBrewer) # Change the fill and color manually: deg_point_fill <- brewer.pal(5, "RdYlBu") names(deg_point_fill) <- unique(term_data$term) term_volcano(data, term_data, x = "log2FoldChange", y = "padj", normal_point_color = "#75aadb", deg_point_fill = deg_point_fill, deg_point_color = "grey", legend_background_fill = "#deeffc", label = "row", label_number = 10, output = FALSE) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.