Difference between revisions of "Genome-wide Association-Quality Control Exercise"

From Statistical Genetics Courses

Jump to: navigation, search
(Created page with "__NOTITLE__ ==Genome-wide Association-Quality Control Exercise== plink --file GWAS plink --file GWAS --mind 0.10 --recode --out GWAS_clean_mind plink --file GWAS_clean_mi...")
(No difference)

Revision as of 17:04, 24 January 2019

Genome-wide Association-Quality Control Exercise

plink --file GWAS
plink --file GWAS --mind 0.10 --recode --out GWAS_clean_mind
plink --file GWAS_clean_mind --maf 0.05 --recode --out MAF_greater_5
plink --file GWAS_clean_mind --exclude MAF_greater_5.map --recode --out MAF_less_5
plink --file MAF_greater_5 --geno 0.05 --recode --out MAF_greater_5_clean
plink --file MAF_less_5 --geno 0.01 --recode --out MAF_less_5_clean
plink --file MAF_greater_5_clean --merge MAF_less_5_clean.ped MAF_less_5_clean.map --recode --out GWAS_MAF_clean
plink --file GWAS_MAF_clean --mind 0.03 --recode --out GWAS_clean2
plink --file GWAS_clean2 --check-sex --out GWAS_sex_checking
R
sexcheck = read.table("GWAS_sex_checking.sexcheck", header=T) names(sexcheck)
sex_problem = sexcheck[which(sexcheck$STATUS=="PROBLEM"),] sex_problem
q()
plink --file GWAS_clean2 --genome --out duplicates
R
dups = read.table("duplicates.genome", header = T)
problem_pairs = dups[which(dups$PI_HAT > 0.4),] 
problem_pairs
problem_pairs = dups[which(dups$PI_HAT > 0.05),] 
myvars = c("FID1", "IID1", "FID2", "IID2", "PI_HAT") 
problem_pairs[myvars]