-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRunRMVP.R
More file actions
21 lines (17 loc) · 883 Bytes
/
RunRMVP.R
File metadata and controls
21 lines (17 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
library(rMVP)
phenotype1<-read.csv("../input/Phenotypes.csv",head=TRUE)
genotype<-attach.big.matrix("../input/Genotype/SAP.geno.desc")
map<-read.table("../input/Genotype/SAP.geno.map", head = TRUE)
kinship<-attach.big.matrix("../input/Genotype/SAP.kin.desc")
covariates_PC<-bigmemory::as.matrix(attach.big.matrix("../input/Genotype/SAP.pc.desc"))
#Run a single GWAS
phenotype2<-phenotype1[1:2]
imMVP <- MVP(phe=phenotype2,geno=genotype,map=map,K=kinship,CV.FarmCPU=covariates_PC,CV.MLM=covariates_PC,priority="speed",maxLoop=10,ncpus=64,method.bin="FaST-LMM",method=c("FarmCPU","MLM"))
#A loop to run all phenotypes
#for(i in 2:ncol(phenotype1)){
# imMVP <- MVP(phe=phenotype1[,c(1,i)],geno=genotype,map=map,K=kinship,CV.MLM=covariates_PC,
# CV.FarmCPU=covariates_PC,priority="speed",maxLoop=10,ncpus=64,
# method.bin="FaST-LMM",method=c("FarmCPU","MLM")
# )
# gc()
#}