confidence ellipses for MDS plot in edgeR? 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 x is a matrix with samples in the group being columns and genes being rows



s &lt;- sample(row.names(x), n = mean(colSums(x)), probs=rowSums(x)/sum(rowSums(x))
stab &lt;- table(s)
s &lt;- as.vector(stab)
names(s) &lt;- 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 car pacakge might be a good place to start looking.