I have gene expression data in triplicates (four genes say g1,g2,g3,g4) in two conditions control and treatment.
i would like to calculate correlation between genes of control and treatment. i have written code in R to calculate correlation and plot correlation heat map. i have given the data in the following format to calculate correlation.
in the above picture, the rows colored in pink are triplicate values of control genes and the rows colored in green are triplicate values of treatment genes. This is the format in which i gave the input data to calculate correlation and create correlation heat map. My question is, i don't get how this allows us to calculate correlation between genes of control and treatment. Any help or suggestion will be appreciated. Thank you!