Version 6 (modified by 12 years ago) (diff) | ,
---|
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
- Gtool (http://www.well.ox.ac.uk/~cfreeman/software/gwas/gtool.html)
- Hapgen2 (https://mathgen.stats.ox.ac.uk/genetics_software/hapgen/hapgen2.html)
- Plink (http://pngu.mgh.harvard.edu/~purcell/plink/)
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:
- Genotype data: https://mathgen.stats.ox.ac.uk/wtccc-software/rel24_poly/haplotype+legend_files_CEU_r24.tgz
- Recombination data: https://mathgen.stats.ox.ac.uk/wtccc-software/recombination_rates/genetic_map_b36_CEU.tgz
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