EDIT: Just had to order the data frame by adjusted p-value before plotting! I'm leaving this up in case someone runs into a similar problem.
I'm using DESeq to analyze count data from RNASeq of maize and fungus during pathogenesis. I've done pairwise comparisons between all of the timepoints and their control counterparts to analyze differential expression. However, the MA plots don't look quite right. Genes with significantly differential expression with FDR < 0.10 are color coded red, but the points appear to be color coded at random, rather than on the margins of the point cloud:
These graphs show plenty of counts with a log2 fold change close to 0 and FDR < 0.10, but subsetting the count data frame by these conditions returns 0 rows:
corn3[which(abs(corn3$log2FoldChange) < .5 & corn3$padj < 0.10),] <0 rows> (or 0-length row.names)
The same happens with every pairwise comparison (four time points, maize counts compared to water inoculation, fungal counts compared to a single axenic sample). I'm trying again in DESeq2, but I'd like to know what's going on, if anyone has any pointers.
Below is a sample of code used to generate the binomial test data frames:
meta <- metadata[row.names(metadata) %in% names(counts),] cds = newCountDataSet(counts, meta$condition) cds = estimateSizeFactors(cds) cornmodel = estimateDispersions(cds) corn3 = nbinomTest(cornmodel, "3day control", "3day") plotMA(corn3)
I wonder if the problem is that the color and dataset are subset differently. What happens if you do:
It ended up just being something similar- the data had to be ordered by p-value before the color scheme worked out. Thank you for the advice!
it looks like there's a single line in the plotMA function which puts the col and x,y out of order. I've emailed the maintainer.
subsetting res[res$baseMean > 1,] should be a fix for now.
I have the same question that "Genes with significantly differential expression with FDR < 0.10 are color coded red, but the points appear to be color coded at random, rather than on the margins of the point cloud". Anyone has an answer? Thank you
As mentioned above, this is likely due to a bug in how subsetting is performed.