Skip to content

Instantly share code, notes, and snippets.

@adiamb
Forked from explodecomputer/run_snptest.sh
Created February 8, 2017 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiamb/d1bb793f215669fac473188551532ac1 to your computer and use it in GitHub Desktop.
Save adiamb/d1bb793f215669fac473188551532ac1 to your computer and use it in GitHub Desktop.
SNPTEST GWAS script
#!/bin/bash
#PBS -N sleepgwas
#PBS -o sleepsnptest-output
#PBS -e sleepsnptest-error
#PBS -t 1-22
#PBS -l walltime=24:00:00
#PBS -l nodes=1:ppn=2
#PBS -S /bin/bash
set -e
echo "Running on ${HOSTNAME}"
if [ -n "${1}" ]; then
echo "${1}"
PBS_ARRAYID=${1}
fi
i=${PBS_ARRAYID}
module add apps/snptest.2.5.0
genfile="/panfs/panasas01/shared/alspac/studies/latest/alspac/genetic/variants/arrays/gwas/imputed/1000genomes/released/27Feb2015/data/genotypes/dosage/data_chr${i}"
samplefile="/panfs/panasas01/shared/alspac/studies/latest/alspac/genetic/variants/arrays/gwas/imputed/1000genomes/released/27Feb2015/data/data.sample"
# Change this file to point to where you want
outfile="${HOME}/results_chr${i}"
snptest_v2.5 \
-data ${genfile} ${samplefile} \
-missing_code -9 \
-pheno plink_pheno \
-cov_all \
-use_raw_phenotypes \
-frequentist 1 \
-method em \
-o ${outfile}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment