This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Expression Matrix And Pearson'S Correlation Coefficient

I have an expression matrix : Gene ids on 1st column followed by the expression values across control(first 3 ) and disease samples(last 3)

4325938 202.27 312.55 245.61 1.86 55.45 31.71
4330851 181.01 406.12 272.17 73.65 155.02 108.06
...etc

I want to code for finding the correlation values between the genes using Pearson correlation using numpy or scipy module in Python as given in the following reference:
stackoverflow

scipy docs

I am not able to understand what is array x and array y here. What should be the parameter that I should pass to the modules in this case ?..do I have to take a row mean of the expression values for each gene and then pass ? Kindly Help..

microarray matrix correlation programming

1 answer

Hi,

for every row of your matrix

  x is the array made of 6 case-control values

  for every row following x

     y is the array made of 6 case-control values

     compute correlation of x and y

     save result

  end loop over y

end loop over x

Thank you so much..it worked fine!

Did you make an R script for this? Do you mind sharing it?

Log in to answer this question.