forked from Biometris/statgenHTP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestScript_Emilie_metabo.R
70 lines (51 loc) · 2.15 KB
/
testScript_Emilie_metabo.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
setwd(paste0("~/Documents/PostDoc/Pipeline_Biometris/statgenHTP/"))
# devtools::load_all(".")
#_________________ EXAMPLE 1 _____________________________________________________________
#### DATASET-SPECIFIC FORMATING #######
inDat <- read.table("~/Documents/PostDoc/DROPS_Metabo/dataMetabo_ZB13_forSpatialModel_long_statgenHTP.csv",
h=T,sep=",")
#### BEGINING FUNCTION USE #######
inTP <- createTimePoints(dat = inDat[inDat$condition=="WW",],
genotype = "hybrid",
timePoint = "time",
repId = "Rep",
plotId = "pot",
rowNum = "y", colNum = "x",
addCheck = FALSE)
plot(inTP, plotType = "layout",
timePoints = 1,
highlight = c("B73_H","Oh43_H","PH207_H","B14a_H","Mo17_H"))
plot(inTP, plotType = "cor",
traits = "value",
timePoints = c(1:100))
plot(inTP, plotType = "box",
traits = "value",
timePoints = c(1:10))#,
colorBy = "repId")
plot(inTP, plotType = "raw",
traits = "value",
timePoints = c(1:10), #c("2018-05-31 16:37:00", "2018-06-01 09:07:00"),
genotypes = c("B73_H","Oh43_H","PH207_H","B14a_H","Mo17_H"))
pdf("Phenovator_Rene_raw_data_na.pdf", height = 8, width = 12)
dev.off()
fitMods <- fitModels(TP = inTP,
trait = "value",
timePoints = c(1:10),
covariates = c("repId"))
genoPreds <- getGenoPred(fitMods, outFile = "BLUPs_PAM_modRep.csv")
colPreds <- getColPred(fitMods)
genoPreds1b <- getGenoPred(fitMods1b)
genoPreds1c <- getGenoPred(fitMods1c)
colPreds1c <- getColPred(fitMods1c)
spatCorr <- getCorrected(fitMods, outFile = "Corrected_PAM_modRep.csv")
variance <- getVar(fitMods)
h2 <- getHerit(fitMods)
genoBLUPS <- getBLUPsGeno(fitMods)
plot(fitMods, plotType = "corrPred",
genotypes = c("col", "ely", "evo1", "ler"), outFile = "test.pdf")
plot(fitMods, plotType = "rawPred")
plot(fitMods, plotType = "herit")
plot(fitMods, plotType = "variance")
plot(fitMods, plotType = "effDim")
plot(fitMods, plotType = "effDim")
plot(fitMods, plotType = "timeLapse", outFile = "spatialtrends.gif")