Commits

Giovanni Marco Dall'Olio committed 99d2e53

CORR: obtaining the p-values, and moving the position of the R coefficient in the figure

Comments (0)

Files changed (2)

results/plots/whole_chromosomes/correlations/chr22_correlations.pdf

Binary file modified.

src/plot_chromosome_correlations.R

     # write the coefficient coefficient, and highlights significant correlations >= 0.80
 
     correlation_coefficient = cor.test(x, y,use="pairwise")
+    print(correlation_coefficient)
 #    qdata <- qqplot(x, y, plot.it=F)
     if (correlation_coefficient$p.value < 0.05 && abs(correlation_coefficient$estimate) >= 0.80) {
         text_color = 'red'
 #    interp.data = lsfit(x, y)
 #    abline(interp.data$coefficients)
     lines(x, correlation_coefficient$df.residuals)
-#    text(x=0.6, y=0.15, paste("r:", correlation_coefficient.txt, "\n", correlation_coefficient.txt.pvalue, sep=''), adj=0, col=text_color)
-    text(x=0.45, y=0.1, paste("r:", correlation_coefficient.txt, sep=''), adj=0, col=text_color)
+#    text(x=0.2, y=0.8, paste("r:", correlation_coefficient.txt, "\n", correlation_coefficient.txt.pvalue, sep=''), adj=0, col=text_color)
+    text(x=0.65, y=0.8, paste("r:", correlation_coefficient.txt, sep=''),                                           adj=0, col=text_color)
 }
 panel.cor.scale <- function(x, y, digits=2, cex.cor)
 {
 
 pdf(arg_values$outputfile)
 for (dataset_name in names(datafiles)) {
+    print("global_noAMR")
+    print(dataset_name)
     filename = datafiles[[dataset_name]][1]
     dataset_type = datafiles[[dataset_name]][2]
     print(dataset_name)
     plot_PairPanels(dataset_name, filename, population)
 }
 for (dataset_name in names(datafiles)) {
+    print("EUR")
+    print(dataset_name)
     filename = datafiles[[dataset_name]][1]
     dataset_type = datafiles[[dataset_name]][2]
     print(dataset_name)