why important snps remove in --geno 0.2 filter steps ? i have gwas study in plink but remove important snps in alzheimer disease ( rs429358) --geno step. pls explain @Sam
I want to run analysis to filter out SNPs based on the following criteria: (a) <5% missingness rate per SNP (b) MAF >10% (c) <20% missingness rate per subject (d) HWE significance at p<.001
# Load the ped and map files
library(snpStats)
dat <- snpStats::read.pedfile(file = "./data/ped_final_re_MHC_mod.ped", snps = "./data/ped_final_re_MHC_mod.map")
library(plink)
plink --noweb --file ped_final_re_MHC_mod --geno 0.05 --maf 0.1 --mind 0.2 --hwe 0.001 --recode
Traceback:
Error: unexpected symbol in "plink --noweb --file ped_final_re_MHC_mod"
1 answer
Why don't you just run the script with bash instead of using it in R? Pretty sure you can't just type the plink code in R (unless you are just extracting part of your code, which make it difficult for us to know what's going on).
As for the error message, assuming your code is calling the plink execution via the command line, it is likely that your plink executable is not available in ${PATH} so you might need to either install plink in your ${PATH} or give the full path of plink to your command.
Side note: Your plink version is also very old (don't think --noweb is required for 1.9 onwards). Latest plink can be downloaded here: https://www.cog-genomics.org/plink/1.9/
Log in to answer this question.