Created
February 9, 2016 15:57
-
-
Save johnbowes/80207ef45b94bfc1c44b to your computer and use it in GitHub Desktop.
SGE job array for phasing GWAS data with shapeit2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Inherit user environment from the login node | |
#$ -V | |
## Use the current directory as the working directory for SGE output and determining paths to files | |
#$ -cwd | |
## Request parallel environment and a number cores | |
#$ -pe smp.pe 12 | |
## | |
## create an array | |
#$ -t 1-22 | |
## | |
## | |
export OMP_NUM_THREADS=$NSLOTS | |
# link to latest version of shapeit2 | |
shapeit2="/mnt/iusers01/jw01/jw01-shared-resources/shapeit2/bin/shapeit.v2.r727.linux.x64" | |
# input files | |
CHR=${SGE_TASK_ID} | |
STUDY_DATA="phasing/data/Immunochip_PsA_hg19_refAligned_chr${CHR}" | |
MAP="/mnt/iusers01/jw01/jw01-shared-resources/shapeit2/genetic_maps_b37/genetic_map_chr${CHR}_combined_b37.txt" | |
# out files | |
OUT_FILE="phasing/output/Immunochip_PsA_hg19_chr${CHR}" | |
$shapeit2 -B $STUDY_DATA \ | |
-M ${MAP} \ | |
-O ${OUT_FILE}.haps.gz ${OUT_FILE}.sample \ | |
-T $NSLOTS \ | |
-L ${OUT_FILE}.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment