It takes a named list with the DE data of different contrasts and draws an horizontal barplot with the up (right) and downregulated (left) genes.
Named list of dataframes with, at least, a column named DEG with the values 'Downregulated', "Upregulated" and "NS"
Character vector of equal length to 'deg_list' names of the elements in 'deg_list'. Default: names(deg_list)
Character of length 1. Where to write the name of each contrast. One of c('min', 'left', 'right', 'none'). If 'min', the name of the contrast will be written at the side where there are less DE genes; if 'right', the name of the contrast will be written to the right side of the plot; if 'left', the name of the contrast will be written to the left side of the plot; if 'none' the name of the contrast won't be written. Default: 'min'.
Numeric of length 2 or NULL. The limits of the X axis. If NULL, the limits of the X axis are the default. Useful when 'name_pos' is 'left' or 'right'. Default: NULL
Numeric of length 1. The position of the number of DEGs in each bar and the position of the contrast label. Default = 10.
Logical of length 1. Whether to draw the text of the X axis (number of DE) or not. Default: FALSE.
Logical of length 1. Whether to draw the text of the Y axis (contrast names) or not. Default: FALSE.
Character of length 2. Colors for the downregulated and upregulated genes. Default: c("green", "red")
Numeric of length 1. Alpha (transparency) value for the vars. Deefault: 0.5.
Numeric of length 1. Size of the number of DEGs written in the bars. Default: 3.
Numeric of length 1. Size of the names of the contrasts written next to the bars. Default: 3.
Numeric of length 1 or NULL. Threshold for the log2FoldChange to define a gene as differentially expressed. Default: 1.
Numeric of length 1 or NULL. Threshold for the adjusted p-value to define a gene as differentially expressed. Default: 0.05.
Logical of length 1. If TRUE, it counts the total number of features in each elements of deg_list and writes them in the caption. Default: FALSE.
Charachter of length 1 or NULL. Title of the plot. Default: NULL.
Charachter of lenght 1 or NULL. Subtitle of the plot. Default: NULL.
Logical of length 1. Whether to do a prop.test()
to check whether the proportions of up and downregulated genes are significantly different from the expected proportions of 0.5. Default: FALSE.
A ggplot2-based barplot with the upregulated and downregulated genes in each contrast.