Calculating Correlation between genes of different treatments

135 views Asked by At

I have gene expression data in triplicates (four genes say g1,g2,g3,g4) in two conditions control and treatment. enter image description here

i would like to calculate correlation between genes of control and treatment. i have written code in R to calculate correlation and plot correlation heatmap. i have given the data in the following format to calculate correlation. enter image description here

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!

1

There are 1 answers

0
Míriam Muñoz Lapeira On

I am not sure if I would calculate correlation between the two sets of genes, as it implies that you are wondering if there is a linear relationship between the variables.

Instead, I would perform a simple one-way anova in order to know wheter the expressions gathered correspond to a shared population or, on the contrary, they correspond to separate populations, that meaning the treatment has an effect on the genes.

# First I enter the dataset (only for one gene)    
g1 <- data.frame("treatment" = factor(rep(c("control","treatment"), 3)),
            "value" = c(23.1,22.5,23.9,20.7,20.6,20.2))
# Then I perform the anova test and display the results
summary(aov(value ~ treatment, data=g1))

In this case, the anova test could not discard that the populations were the same.

In case you would want to know wheter gene1 is related to the other genes, then calculating the correlation would be acceptable, and I would use all the data (not distinguishing between treatment and control).

In case you would want to know if the overall expression is changed in the treatment I would use a MANOVA test.

I hope I could help.