MATLAB Answers

0

Fold Change Plot in "Identifying Differentially Expressed Genes from RNA-Seq Data" Matlab example

Asked by Corrado A. on 6 Dec 2017
Latest activity Commented on by Corrado A. on 9 Dec 2017
Hello, I hope you can help me understand a part of code provided by Matlab in this example.
In particular:
% compute the mean and the log2FC
meanBase = (meanTreated + meanUntreated) / 2;
foldChange = meanTreated ./ meanUntreated;
log2FC = log2(foldChange);
% plot mean vs. fold change (MA plot)
mairplot(meanTreated, meanUntreated,'Type','MA','Plotonly',true);
Why does the comment say "plot mean vs. fold change" when only the two means are plotted? Could you also help me understand how to interpret Mairplot in this application?
Thank you.

  0 Comments

Sign in to comment.

1 Answer

Answer by Tim DeFreitas on 7 Dec 2017
 Accepted Answer

Mairplot calculates the foldChange (the Y-axis in the plot) from the meanTreated and meanUntreated samples behind the scenes; the comment is explaining that the fold change is plotted as the y-axis even though it's not being explicitly given to the mairplot function.
A mairplot shows differences between two measurements of gene expression by plotting the mean intensities (log scale, x-axis) vs fold change (log intensity ratio, y-axis). The mean intensities are calculated by multiplying the mean gene expression values of the two samples, and transforming to log10 scale. Fold change is plotted as the log2 ratio between the mean expression levels of each sample. If gene Z is expressed 4 times as much in the untreated group, it will have a Y-value of 2. If gene W is expressed half as much in the second group, it would have a Y-value of -1 This makes over & under-expressed genes have the same linear scale on the Y axis.
Data points with largely positive or negative fold changes indicate large changes in gene expression between the two groups. The default cutoff ratio (orange dashed line) is 2, which in log scale becomes +-1. Data points farther to the right tend to have a better signal-to-noise ratio, because the measurements contained higher levels of gene expression in both samples.
Hope this helps,
-Tim