#$ -S /bin/bash
#$ -l h_rt=24:0:0
#$ -l h_vmem=30G,tmem=30G
#$ -cwd
#$ -j y
#$ -N strict_md_eas

WD="/SAN/ugi/mdd/trans_ethnic_ma" #path to the working directory
FileName=result_1.tbl
OFilePrefix=result_qced

#METAL
metal < METAL_IVW_script.txt

#qc and plotting
#R script accepts two arguments
#arg1: file name for the meta-analysis result
#arg2: file name prefix for output files

R --vanilla --args $WD/results/$FileName $WD/results/$OFilePrefox < $WD/scripts/fe_qc_plot.R #the R script for METAL result QC and ploting
