rivas-lab / ukbb-tools

Tools for preprocessing, QC, and preliminary analyses from raw UK BioBank data
8 stars 0 forks source link

GWAS freeze #36

Closed yk-tanigawa closed 4 years ago

yk-tanigawa commented 4 years ago

GWAS freeze version 2020/8/15

Output dir:

/oak/stanford/groups/mrivas/ukbb24983/array-combined/gwas/freeze/20200815

yk-tanigawa commented 4 years ago

tar ball of the GWAS sumstats

freeze_1_tar.sh

The pre-computed PheWAS file.

1. Apply filter (1e-3)

sbatch -p mrivas --qos=high_p --time=6:00:00 --mem=8000 --nodes=1 --cores=1 --job-name=freeze_2a_filter --output=logs/freeze_2a_filter.%A_%a.out --error=logs/freeze_2a_filter.%A_%a.err --array=1-520 $parallel_sbatch_sh freeze_2a_filter.sh line.count.input.lst 50

--> job 5920082

yk-tanigawa commented 4 years ago

2. sort and combine

for pop in 'white_british' 'non_british_white' 'african' 's_asian' 'e_asian' 'related' 'others' 'metal' ; do echo $pop ; sbatch -p mrivas --qos=high_p --nodes=1 --mem=64000 --cores=6 --time=2-0:00:00 --job-name=freeze_2b_combine.${pop} --output=logs/freeze_2b_combine.${pop}.%A.out --error=logs/freeze_2b_combine.${pop}.%A.err --dependency=afterok:5920082 freeze_2b_combine.sh ${pop} ; done
white_british
Submitted batch job 5920545
non_british_white
Submitted batch job 5920546
african
Submitted batch job 5920547
s_asian
Submitted batch job 5920548
e_asian
Submitted batch job 5920549
related
Submitted batch job 5920550
others
Submitted batch job 5920551
metal
Submitted batch job 5920552
yk-tanigawa commented 4 years ago

There was an error in the filtering step (for pop=african).

The other 6 + 1 pops were not affected.

submitted the sort & combine jobs.

[ytanigaw@sh02-09n53 ~/repos/rivas-lab/ukbb-tools/04_gwas/check_gwas/202007]$ for pop in 'white_british' 'non_british_white' 's_asian' 'e_asian' 'related' 'others' 'metal' ; do echo $pop ; sbatch -p mrivas --qos=high_p --nodes=1 --mem=64000 --cores=6 --time=2-0:00:00 --job-name=freeze_2b_combine.${pop} --output=logs/freeze_2b_combine.${pop}.%A.out --error=logs/freeze_2b_combine.${pop}.%A.err freeze_2b_combine.sh ${pop} ; done
white_british
Submitted batch job 5923873
non_british_white
Submitted batch job 5923875
s_asian
Submitted batch job 5923877
e_asian
Submitted batch job 5923879
related
Submitted batch job 5923881
others
Submitted batch job 5923882
metal
Submitted batch job 5923884
yk-tanigawa commented 4 years ago

filtering step bug (data type cast error) was fixed and the filtering was completed.

$ for pop in 'african' 's_asian' 'e_asian' ; do echo $pop ; sbatch -p mrivas --qos=high_
p --nodes=1 --mem=64000 --cores=6 --time=2-0:00:00 --job-name=freeze_2b_combine.${pop} --output=logs/freeze_2b_combine.${pop}.%A.out --error=logs/freeze_2b_combine.
${pop}.%A.err freeze_2b_combine.sh ${pop} ; done
african
Submitted batch job 5927193
s_asian
Submitted batch job 5927195
e_asian
Submitted batch job 5927197
yk-tanigawa commented 4 years ago

It turned out that empty file (no associations with p <= 1e-3) caused error in the script.

I added -size +68c in the find command and re-submitted the script.

$ for pop in 'african' 's_asian' 'e_asian' ; do echo $pop ; sbatch -p mrivas --qos=high_p --nodes=1 --mem=64000 --cores=6 --time=2-0:00:00 --job-name=freeze_2b_combine.${pop} --output=logs/freeze_2b_combine.${pop}.%A.out --error=logs/freeze_2b_combine.${pop}.%A.err freeze_2b_combine.sh ${pop} ; done
african
Submitted batch job 5927253
s_asian
Submitted batch job 5927254
e_asian
Submitted batch job 5927255

Freeze files were generated :)

yk-tanigawa commented 4 years ago

Done: https://github.com/rivas-lab/ukbb-tools/tree/master/04_gwas/check_gwas/202007#gwas-freeze