-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmanhattan.sb
42 lines (38 loc) · 1.28 KB
/
manhattan.sb
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
#!/bin/bash
#SBATCH --ntasks=1
#SBATCH --job-name=Manhattan
#SBATCH --time=8:00:00
#SBATCH --cpus-per-task=8
#SBATCH --partition=short
#SBATCH --array=1-92
#SBATCH --output=work/manhattan_%A_%a.out
#SBATCH --error=work/manhattan_%A_%a.err
#SBATCH --export ALL
. /etc/profile.d/modules.sh
module load default-cardio
module load slurm
module load use.own
export p=$(cut -f1 manhattan.list | awk 'NR==ENVIRON["SLURM_ARRAY_TASK_ID"]')
export TMPDIR=/scratch/jhz22/tmp
export rt=$HOME/INF/METAL
echo ${p}
export protein=${p};
R --no-save -q <<END
protein <- Sys.getenv("protein");
print(protein);
gz <- gzfile(paste0("/home/jhz22/INF/sumstats/INTERVAL/INTERVAL.",protein,".gz"));
.libPaths("/home/jhz22/R:/home/jhz22/R-3.5.3/library")
library(qqman,lib.loc="/home/jhz22/R");
tbl <- read.delim(gz,as.is=TRUE);
tbl <- within(tbl,{
SNP <- SNPID
CHR <- as.numeric(CHR)
BP <- as.numeric(POS)
P <- as.numeric(PVAL)
})
tbl <- subset(tbl,!is.na(CHR)&!is.na(BP)&!is.na(P))
manhattan <- paste0("INTERVAL.",protein,".manhattan.png");
png(manhattan,width=12,height=10,units="in",pointsize=4,res=300)
manhattan(tbl,main=protein,genomewideline=-log10(5e-10),cex=0.8, col=c("blue","orange"),suggestiveline=FALSE,ylim=c(0,25));
dev.off();
END