-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4_GWAS_gapit.R
More file actions
43 lines (40 loc) · 1.05 KB
/
4_GWAS_gapit.R
File metadata and controls
43 lines (40 loc) · 1.05 KB
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
# GWAS分析脚本
rm(list = ls())
library(MASS) # required for ginv
library(multtest)
library(gplots)
library(compiler) #required for cmpfun
library(scatterplot3d)
library(bigmemory)
library(ape)
library(EMMREML)
source("./01_scripts/GAPIT1.txt")
source("./01_scripts/GAPIT2.txt")
ARGS <- commandArgs(T)
print(paste0("GAPIT Working Gene ID:",ARGS[1]))
job <- ARGS[1]
myG <- read.delim(paste0("./06_out_gene/",job,".gene.hmp.txt"),
header = F)
myY <- read.table(paste0("./07_out_trait/",job,".trait.txt"),
header = T,sep = "\t")
now_dir <- getwd()
dir.create(paste0(now_dir,"/08_out_GWAS/MLM_",job))
setwd(paste0(now_dir,"/08_out_GWAS/MLM_",job))
myGAPIT <- GAPIT(
Y=myY,
G=myG,
PCA.total=3,
model="MLM",
Random.model = TRUE
)
dir.create(paste0(now_dir,"/08_out_GWAS/FarmCPU_",job))
setwd(paste0(now_dir,"/08_out_GWAS/FarmCPU_",job))
myGAPIT <- GAPIT(
Y=myY,
G=myG,
PCA.total=3,
model="FarmCPU",
Random.model = TRUE
)
setwd(now_dir)
print(paste0(job," GWAS finished!"))