###load example data for two cohorts:
### see ?skatExample
data(skatExample)
#specify adjustment variables
adjustments <- SNPInfo[c(1:3, 20,100), ]
adjustments
####run on each cohort:
cohort1.adj <- skatCohortAdj(Z=Z1, y~sex+bmi, SNPInfo = SNPInfo,
adjustments=adjustments, data =pheno1)
cohort2.adj <- skatFamCohortAdj(Z=Z2, y~sex+bmi, SNPInfo = SNPInfo,
adjustments=adjustments, fullkins=kins, data=pheno2)
SNPInfo.sub <- subset(SNPInfo, (SNPInfo$gene %in% adjustments$gene) &
!(SNPInfo$Name %in% adjustments$Name) )
#skat
out.skat <- skatMeta(cohort1.adj,cohort2.adj, SNPInfo = SNPInfo.sub)
head(out.skat)
##T1 test
out.t1 <- burdenMeta(cohort1.adj,cohort2.adj, SNPInfo = SNPInfo.sub, mafRange = c(0,0.01))
head(out.t1)
##single snp tests:
out.ss <- singlesnpMeta(cohort1.adj,cohort2.adj, SNPInfo = SNPInfo)
head(out.ss)
Run the code above in your browser using DataLab