# NOT RUN {
## WGScan.prelim does the preliminary data management.
# Input: Y, X (covariates)
## WGScan.Region scans a region.
# Input: G (genetic variants), pos (position) Z (weights) and result of WGScan.prelim
library(WGScan)
# Load data example
# Y: outcomes, n by 1 matrix where n is the total number of observations
# X: covariates, n by d matrix
# G: genotype matrix, n by p matrix where n is the total number of subjects
# pos: positions of genetic variants, p dimention vector
# Z: functional annotation matrix, p by q matrix
data(WGScan.example)
Y<-WGScan.example$Y;X<-WGScan.example$X
G<-WGScan.example$G;pos<-WGScan.example$pos
Z<-WGScan.example$Z
# Preliminary data management
result.prelim<-WGScan.prelim(Y,X=X,out_type="C",B=5000)
# Scan the region with functional annotations defined in Z
result<-WGScan.SingleWindow(result.prelim,G,Z=Z)
# }
Run the code above in your browser using DataLab