# MA plot

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/MA_plot
> Markdown URL: https://mediated.wiki/source/MA_plot.md
> Source: https://en.wikipedia.org/wiki/MA_plot
> Source revision: 1290230556
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Diagram in computational biology

Within [computational biology](/source/Computational_biology), an **MA plot** is an application of a [Bland–Altman plot](/source/Bland%E2%80%93Altman_plot) for visual representation of [genomic](/source/Genomic) data. The plot visualizes the differences between measurements taken in two samples, by transforming the data onto M (log ratio) and A ([mean average](/source/Arithmetic_mean)) scales, then plotting these values. Though originally applied in the context of two channel [DNA microarray](/source/DNA_microarray) gene expression data, MA plots are also used to visualise [high-throughput sequencing](/source/High-throughput_sequencing) analysis.[1][2]

## Explanation

[Microarray](/source/DNA_microarray) data is often normalized within arrays to control for systematic biases in dye coupling and hybridization efficiencies, as well as other technical biases in the DNA probes and the print tip used to spot the array.[3] By minimizing these systematic variations, true biological differences can be found. To determine whether normalization is needed, one can plot [Cy5](/source/Cyanine#Cy3_and_Cy5) (R) intensities against [Cy3](/source/Cyanine#Cy3_and_Cy5) (G) intensities and see whether the slope of the line is around 1. An improved method, which is basically a scaled, 45 degree rotation of the R vs. G plot is an MA-plot.[4] The MA-plot is a plot of the distribution of the red/green intensity ratio ('M'), that is plotted against the average intensity ('A'). M and A are defined by the following equations.

- M = log 2 ⁡ ( R / G ) = log 2 ⁡ ( R ) − log 2 ⁡ ( G ) {\displaystyle M=\log _{2}(R/G)=\log _{2}(R)-\log _{2}(G)}

- A = 1 2 log 2 ⁡ ( R G ) = 1 2 ( log 2 ⁡ ( R ) + log 2 ⁡ ( G ) ) {\displaystyle A={\frac {1}{2}}\log _{2}(RG)={\frac {1}{2}}(\log _{2}(R)+\log _{2}(G))}

M is, therefore, the [binary logarithm](/source/Binary_logarithm) of the intensity ratio (or difference between log intensities) and A is the average log intensity for a dot in the plot. MA plots are then used to visualize intensity-dependent ratio of raw microarray data (microarrays typically show a bias here, with higher A resulting in higher |M|, i.e. the brighter the spot the more likely an observed difference between sample and control). The MA plot puts the variable *M* on the *y*-axis and *A* on the *x*-axis and gives a quick overview of the [distribution](/source/Frequency_distribution) of the data.

In many microarray gene expression experiments, an underlying assumption is that most of the genes would not see any change in their expression; therefore, the majority of the points on the *y*-axis (*M*) would be located at 0, since log(1) is 0. If this is not the case, then a [normalization](/source/Normalization_(statistics)) method such as [LOESS](/source/LOESS) should be applied to the data before statistical analysis. (On the diagram below see the red line running below the zero mark before normalization, it should be straight. Since it is not straight, the data should be normalized. After being normalized, the red line is straight on the zero line and shows as pink/black.)

## Packages

Several [Bioconductor](/source/Bioconductor) packages, for the [R software](/source/R_(programming_language)), provide the facility for creating MA plots. These include affy (ma.plot, mva.pairs), limma (plotMA), marray (maPlot), and edgeR(maPlot)

Similar ["RA" plots](/source/RA_plot) can be generated using the raPlot function in the caroline [CRAN](https://cran.r-project.org/) [R](/source/R_(programming_language)) package.

An interactive MA plot to filter genes by M, A and p-values, search by names or with a lasso, and save selected genes, is available as an [R-Shiny](https://en.wikipedia.org/w/index.php?title=R-Shiny&action=edit&redlink=1) code [Enhanced-MA-Plot](https://github.com/alisheharyar/Enhanced_MA_Plot).

### Example in the R programming language

library(affy)

if (require(affydata))
{
     data(Dilution)
}

y <- (exprs(Dilution)[, c("20B", "10A")])

x11()

ma.plot( rowMeans(log2(y)), log2(y[, 1])-log2(y[, 2]), cex=1 )

title("Dilutions Dataset (array 20B v 10A)")

library(preprocessCore)

#do a quantile normalization
x <- normalize.quantiles(y)

x11()

ma.plot( rowMeans(log2(x)), log2(x[, 1])-log2(x[, 2]), cex=1 )
title("Post Norm: Dilutions Dataset (array 20B v 10A)")

Pre Normalization

Post Normalization

MA Plots.

## See also

- [RA plot](/source/RA_plot)

- [Bland–Altman plot](/source/Bland%E2%80%93Altman_plot)

## References

1. **[^](#cite_ref-1)** Robinson, M. D.; McCarthy, D. J.; Smyth, G. K. (11 November 2009). ["edgeR: a Bioconductor package for differential expression analysis of digital gene expression data"](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2796818). *Bioinformatics*. **26** (1): 139–140. [doi](/source/Doi_(identifier)):[10.1093/bioinformatics/btp616](https://doi.org/10.1093%2Fbioinformatics%2Fbtp616). [PMC](/source/PMC_(identifier)) [2796818](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2796818). [PMID](/source/PMID_(identifier)) [19910308](https://pubmed.ncbi.nlm.nih.gov/19910308).

1. **[^](#cite_ref-2)** Love, Michael I; Huber, Wolfgang; Anders, Simon (5 December 2014). ["Moderated estimation of fold change and dispersion for RNA-seq data with DESeq2"](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4302049). *Genome Biology*. **15** (12): 550. [doi](/source/Doi_(identifier)):[10.1186/s13059-014-0550-8](https://doi.org/10.1186%2Fs13059-014-0550-8). [PMC](/source/PMC_(identifier)) [4302049](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4302049). [PMID](/source/PMID_(identifier)) [25516281](https://pubmed.ncbi.nlm.nih.gov/25516281).

1. **[^](#cite_ref-3)** [YH Yang](/source/Jean_Yang), [S Dudoit](/source/Sandrine_Dudoit), P Luu, DM Lin, V Peng, J Ngai, [TP Speed](/source/Terry_Speed). (2002). Normalization for cDNA microarray data: a robust composite method addressing single and multiple slide systematic variation. *Nucleic Acids Research* vol. 30 (4) pp. e15.

1. **[^](#cite_ref-4)** [Dudoit, S](/source/Sandrine_Dudoit), [Yang, YH](/source/Jean_Yang), Callow, MJ, [Speed, TP](/source/Terry_Speed). (2002). Statistical methods for identifying differentially expressed genes in replicated cDNA microarray experiments. *Stat. Sin.* 12:1 111–139

---
Adapted from the Wikipedia article [MA plot](https://en.wikipedia.org/wiki/MA_plot) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/MA_plot?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
