-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoveralleQTL.R
48 lines (40 loc) · 1.21 KB
/
overalleQTL.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
#Code to run a single overall MatrixEQTL (without covariates)
#3/8/13
#NWK
#Usage CANCER TYPE
library(MatrixEQTL)
oargs <- commandArgs(trailingOnly=T)
snp.type <- "unimputed"
cancer.type <- oargs[1]
root.dir <- paste0("/scratch/nwk2/pancan/")
out.dir <- paste0(root.dir,"output/")
setwd(root.dir)
annofile <- paste0("rnaseq_snp_anno.Rdata")
snp.expdata <- paste0(oargs[1],".Rdata")
MEQTL.params <- list(
output.file.name.tra=paste(out.dir,snp.type,"_",cancer.type,"_trans",sep=""),
output.file.name.cis=paste(out.dir,snp.type,"_",cancer.type,"_cis",sep=""),
useModel=modelLINEAR,
verbose=T,
pvOutputThreshold.tra=1e-8,
pvOutputThreshold.cis=1e-8,
cisDist=1e6,
pvalue.hist=F
)
load(snp.expdata)
load(annofile)
with(MEQTL.params,Matrix_eQTL_main(
snps=snp.exp$snps,
gene=snp.exp$gene,
output_file_name=paste(output.file.name.tra,".txt",sep=""),
output_file_name.cis=paste(output.file.name.cis,".txt",sep=""),
useModel=useModel,
verbose=verbose,
pvOutputThreshold=pvOutputThreshold.tra,
pvOutputThreshold.cis=pvOutputThreshold.cis,
snpspos=annolist$snp.anno,
genepos=annolist$exp.anno,
cisDist=cisDist,
pvalue.hist=pvalue.hist
)
)