Is it possible to draw e.g. 95% confidence ellipses around samples from the same group on the results from the plotMDS function under edgeR? If so, how?
I can see that there would be a three step process to doing this:
Merge counts from all samples in the group and then resample pseudo-replicates from this. If
xis a matrix with samples in the group being columns and genes being rows
s <- sample(row.names(x), n = mean(colSums(x)), probs=rowSums(x)/sum(rowSums(x)) stab <- table(s) s <- as.vector(stab) names(s) <- names(stab)
Do this thousands of times.
You would then want to project those onto your MDS plot space - i'm less clear about how you could do this without perturbing the space itself.
Calculate the parameter for an ellipise that would contain 95% of these points. Again, I'm not so sure about how to do this, but I think the
carpacakge might be a good place to start looking.