[BioC] Nci-60 gene expression correlation coefficients

Sean Davis sdavis2 at mail.nih.gov
Wed Nov 1 13:09:50 CET 2006


On Tuesday 31 October 2006 13:20, John Morrow wrote:

> But here it gets tricky since working with this data does not tie back
> easily with the genes.  I hope that maybe a bioconductor package can
> streamline this.

I think the usual way to do this in R is to make a new data structure (in this 
case, a matrix) rather than to print out the results, which aren't that 
useful for further computations.

So, to get your correlations if the matrix 'a' contains your gene expression 
measurements with genes as rows:

my.correlations <- cor(t(a),t(a),method='spearman')

x <- matrix(nc=ngenes,nr=ngenes)

for(i in 1:ngenes) {
  for(j in i:ngenes) {
    x[i,j] <- cor.test(a[i,],a[j,],method='spearman')$p.value
  }
}

I didn't test these, but I hope you get the idea.

Sean



More information about the Bioconductor mailing list