ResidMatFile <- system.file("extdata", "ResidMat.txt", package = "GRAB")
SparseGRMFile <- system.file("extdata", "SparseGRM.txt", package = "GRAB")
PairwiseIBDFile <- system.file("extdata", "PairwiseIBD.txt", package = "GRAB")
GenoFile <- system.file("extdata", "simuPLINK.bed", package = "GRAB")
OutputFile <- file.path(tempdir(), "resultSPAGRM.txt")
# Step 2a: pre-calculate genotype distributions
obj.SPAGRM <- SPAGRM.NullModel(
ResidMatFile = ResidMatFile,
SparseGRMFile = SparseGRMFile,
PairwiseIBDFile = PairwiseIBDFile,
control = list(ControlOutlier = FALSE)
)
# Step 2b: perform association tests
GRAB.Marker(obj.SPAGRM, GenoFile, OutputFile)
head(data.table::fread(OutputFile))
Run the code above in your browser using DataLab