Commits

Giovanni Marco Dall'Olio committed b84ab0f

SIMS: added script to calculate qqplots, wilcoxon, kolmogorov-smirnov of neutral vs sele simulations

  • Participants
  • Parent commits 4c2d0de

Comments (0)

Files changed (2)

results/plots/selection_vs_neutral/sims_qqplots.pdf

Binary file added.

src/compare_neutral_selection_sims.R

 neu.glob = subset(neu, continent == 'glob')
 sel.glob = subset(sel, continent == 'glob')
 
-for (prop in c("n_vertices", "av_path_length", "n_components", "av_degree")) { print(ks.test(neu.glob[[prop]], sel.glob[[prop]]))}
+pdf("results/plots/selection_vs_neutral/sims_qqplots.pdf")
+par(mfrow=c(2,2))
+for (prop in c("n_vertices", "av_path_length", "n_components", "av_degree")) { 
+    print (prop)
+    print(ks.test(      neu.glob[[prop]], sel.glob[[prop]], alternative='less'))
+    print(wilcox.test(  neu.glob[[prop]], sel.glob[[prop]], alternative='less'))
+    qqplot(             neu.glob[[prop]], sel.glob[[prop]]                     ,
+          xlab = "Neutral scenario",
+          ylab = "Selection scenario")
 
+    title(prop)
+}
 
+dev.off()