-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIBDslopes.R
92 lines (79 loc) · 3.25 KB
/
IBDslopes.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
get_slope <- function(sim_genind_object){
sim_genind_object_geo_dist <- as.matrix(dist(sim_genind_object@other$xy))
sim_genind_object_geo_dist[sim_genind_object_geo_dist==0] <- NA
sim_genind_object_Loiselle_EcoGenetics <- eco.kin.loiselle(genind2ecogen(sim_genind_object))
IBDsim <- lm(c(as.dist(sim_genind_object_Loiselle_EcoGenetics))~log(c(as.dist(sim_genind_object_geo_dist))))
return(summary(IBDsim))
}
alllow <- readRDS("sim_subs_genind_ALLRES_LOWIBD1.rds")
alllow2 <- readRDS("sim_subs_genind_ALLRES_LOWIBD2.rds")
alllow3 <- readRDS("sim_subs_genind_ALLRES_LOWIBD3.rds")
get_slope(alllow)
get_slope(alllow2)
get_slope(alllow3)
allmid <- readRDS("sim_subs_genind_ALLRES_MIDIBD1.rds")
allmid2 <- readRDS("sim_subs_genind_ALLRES_MIDIBD2.rds")
allmid3 <- readRDS("sim_subs_genind_ALLRES_MIDIBD3.rds")
get_slope(allmid)
get_slope(allmid2)
get_slope(allmid3)
allhigh <- readRDS("sim_subs_genind_ALLRES_HIGHIBD1.rds")
allhigh2 <- readRDS("sim_subs_genind_ALLRES_HIGHIBD2.rds")
allhigh3 <- readRDS("sim_subs_genind_ALLRES_HIGHIBD3.rds")
get_slope(allhigh)
get_slope(allhigh2)
get_slope(allhigh3)
twolow <- readRDS("sim_subs_genind_TWORES_LOWIBD1.rds")
twolow2 <- readRDS("sim_subs_genind_TWORES_LOWIBD2.rds")
twolow3 <- readRDS("sim_subs_genind_TWORES_LOWIBD3.rds")
get_slope(twolow)
get_slope(twolow2)
get_slope(twolow3)
twomid <- readRDS("sim_subs_genind_TWORES_MIDIBD1.rds")
twomid2 <- readRDS("sim_subs_genind_TWORES_MIDIBD2.rds")
twomid3 <- readRDS("sim_subs_genind_TWORES_MIDIBD3.rds")
get_slope(twomid)
get_slope(twomid2)
get_slope(twomid3)
twohigh <- readRDS("sim_subs_genind_TWORES_HIGHIBD1.rds")
twohigh2 <- readRDS("sim_subs_genind_TWORES_HIGHIBD2.rds")
twohigh3 <- readRDS("sim_subs_genind_TWORES_HIGHIBD3.rds")
get_slope(twohigh)
get_slope(twohigh2)
get_slope(twohigh3)
alllow <- readRDS("sim_subs_genind_3.2.15.30.1RES_LOWIBD1.rds")
alllow2 <- readRDS("sim_subs_genind_3.2.15.30.1RES_LOWIBD2.rds")
alllow3 <- readRDS("sim_subs_genind_3.2.15.30.1RES_LOWIBD3.rds")
get_slope(alllow)
get_slope(alllow2)
get_slope(alllow3)
allmid <- readRDS("sim_subs_genind_3.2.15.30.1RES_MODIBD1.rds")
allmid2 <- readRDS("sim_subs_genind_3.2.15.30.1RES_MODIBD2.rds")
allmid3 <- readRDS("sim_subs_genind_3.2.15.30.1RES_MODIBD3.rds")
get_slope(allmid)
get_slope(allmid2)
get_slope(allmid3)
allhigh <- readRDS("sim_subs_genind_3.2.15.30.1RES_HIGHIBD1.rds")
allhigh2 <- readRDS("sim_subs_genind_3.2.15.30.1RES_HIGHIBD2.rds")
allhigh3 <- readRDS("sim_subs_genind_3.2.15.30.1RES_HIGHIBD3.rds")
get_slope(allhigh)
get_slope(allhigh2)
get_slope(allhigh3)
twolow <- readRDS("sim_subs_genind_1.1.15.30.1RES_LOWIBD1.rds")
twolow2 <- readRDS("sim_subs_genind_1.1.15.30.1RES_LOWIBD2.rds")
twolow3 <- readRDS("sim_subs_genind_1.1.15.30.1RES_LOWIBD3.rds")
get_slope(twolow)
get_slope(twolow2)
get_slope(twolow3)
twomid <- readRDS("sim_subs_genind_1.1.15.30.1RES_MODIBD1.rds")
twomid2 <- readRDS("sim_subs_genind_1.1.15.30.1RES_MODIBD2.rds")
twomid3 <- readRDS("sim_subs_genind_1.1.15.30.1RES_MODIBD3.rds")
get_slope(twomid)
get_slope(twomid2)
get_slope(twomid3)
twohigh <- readRDS("sim_subs_genind_1.1.15.30.1RES_HIGHIBD1.rds")
twohigh2 <- readRDS("sim_subs_genind_1.1.15.30.1RES_HIGHIBD2.rds")
twohigh3 <- readRDS("sim_subs_genind_1.1.15.30.1RES_HIGHIBD3.rds")
get_slope(twohigh)
get_slope(twohigh2)
get_slope(twohigh3)