Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monogenea/986a26fd829e8f4038fab76cbb2fc581 to your computer and use it in GitHub Desktop.
Save monogenea/986a26fd829e8f4038fab76cbb2fc581 to your computer and use it in GitHub Desktop.
library(snpStats)
library(doParallel)
library(SNPRelate)
library(GenABEL)
library(dplyr)
source("GWASfunction.R")
load("PhenoGenoMap.RData")
# Use SNP call rate of 100%, MAF of 0.1 (very stringent)
maf <- 0.1
callRate <- 1
SNPstats <- col.summary(genData$SNP)
maf_call <- with(SNPstats, MAF > maf & Call.rate == callRate)
genData$SNP <- genData$SNP[,maf_call]
genData$MAP <- genData$MAP[maf_call,]
SNPstats <- SNPstats[maf_call,]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment