MA_Plot | R Documentation |
This function creates an MA plot from a DESeq2 results object. It is like 'plotMA()' from DESeq2, but more customizable.
MA_Plot(
res,
title,
p = NULL,
pval = NULL,
FC = 1,
lab = NULL,
col = NULL,
fclim = NULL,
showNum = TRUE,
returnDEG = FALSE,
ordBy = "sig",
sigScale = FALSE,
upcol = NULL,
dncol = NULL,
labcol = "orange",
labColumn = NULL
)
res |
A DESeq2 results object obtained from 'results(dds)' or a data.frame with the same column name values as a DESeq2 results object and rownames as genes |
title |
A character vector indicating the title of the plot |
p |
A number indicating the threshold for 'padj' where padj<p are significant genes. Should not be used if using 'pval' |
pval |
A number indicating the threshold for 'pvalue' where pvalue<pval are significant genes. Should not be used if using 'p' |
FC |
A number indicating the log2FoldChange threshold where abs(log2FC)>FC are significant genes. Default is 1 - can be 0 if not using fold-change threshold. |
lab |
A character vector of genes to be labeled on the plot. Should correspond with rownames(res). Default is NULL. Enter 'labDEG' to label all DEGs given thresholds. |
col |
A character vector of genes to be coloured orange on the plot. Should correspond with rownames(res). Default is NULL. |
fclim |
A number indicating the maximum log2FoldChange value desired on the volcano plot (x-axis limits). Points outside this limit will appear as diamonds on the limits. |
showNum |
A boolean indicating whether gene numbers should be displayed on the plot. Default is TRUE. |
returnDEG |
A boolean indicating whether DEGs (using given thresholds) should be returned as a list (down, up) |
ordBy |
Character indicating how DEGs should be ordered: "l2FC" order by descending absolute log2FoldChange, "sig" order by descending significance. Default is "sig". |
sigScale |
A boolean indicating if the point size should be scaled by significance (more significant = larger point). Default=FALSE. |
upcol |
A character vector indicating the colour (colour name or hexadecimal) of 'upregulated' genes. leave NULL for default red. |
dncol |
A character vector indicating the colour (colour name or hexadecimal) of 'downregulated' genes. leave NULL for default blue. |
labcol |
A character vector indicating the colour (colour name or hexadecimal) of genes to be specifically highlighted by the 'col' and 'lab' arguments. default is "orange". |
labColumn |
A character vector indicating the column name (if left NULL, 'rownames(res)' will be used) to be used as labels. The gene names provided in the 'lab' argument must still correspond to rownames(res). |
An MA plot with x-axis indicating gene expression 'baseMean' and y-axis indicating log2FoldChange. Blue dots are downregulated genes, red dots are upregulated genes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.