wiki:generateArtificialGwas

This page describes how to create random GWAS data for plink. A fake phenotype is generated for which significantly associated SNPs are present in the data.

Required tools

Required data

Genotypes on which generated data is based. For instance: https://mathgen.stats.ox.ac.uk/impute/impute_v1.html#Using_IMPUTE_with_the_HapMap_Data

Procedure

For this analysis we used chr 22 of the hapmap data:

Generate the artificial GWAS data

hapgen2 -h hapmap_r24_b36_fwd.consensus.qc.poly.chr22_ceu.phased -l chr22.ceu.r24.legend -m genetic_map_chr22_CEU_b36.txt -o test -dl 14431347 0 2 10 -n 2000 2000

Merging case and control

gtool -M --g test.cases.gen test.controls.gen --s test.cases.sample test.controls.sample --og test.gen --os test.samples

Convert to ped/map

gtool -G --g test.gen --s test.samples --ped test.ped --map test.map --phenotype pheno --chr 22 --snp

Test with GWAS

plink --noweb --file test --assoc --maf 0.05 --hwe -0.001 --1 --allow-no-sex

plink.assoc should now contain the SNPs with p-values. There should be one really significant hit and server lower significant hits that are in LD with 'causal' SNP

Last modified 12 years ago Last modified on 2012-09-06T15:16:27+02:00