This function extract the SNPs that pass a frequency cut-off in at least one super population from a GDS SNP information file and save the retained SNP information into a VCF file.
getMatrixPopSynthetic(pRAIDS)a matrix containing the sample identifiers and where
each column is the name of a subcontinental population. The number of
row corresponds to the number of samples for each subcontinental population.
dataDir <- system.file("extdata/demoKNNSynthetic", package="RAIDS")
# The name of the synthetic study
studyID <- "MYDATA"
studyDF <- data.frame(study.id=studyID,
study.desc=studyID,
study.platform="NotDef",
stringsAsFactors=FALSE)
pathProfileGDS <- file.path(dataDir) # , "ex1.gds"
fileReferenceGDS <- system.file("extdata/tests/ex1_good_small_1KG.gds", package="RAIDS")
pedStudy <- data.frame(Name.ID=c("ex1"),
Case.ID=c("ex1"),
Sample.Type=c("type"),
Diagnosis="NotDef",
Source=c("NotDef"),
stringsAsFactors=FALSE)
row.names(pedStudy) <- pedStudy$Name.ID
pRAIDS <- RAIDSparam(studyDF=studyDF,
pedStudy=pedStudy,
pathProfileGDS=pathProfileGDS,
fileReferenceGDS=fileReferenceGDS)
matGr <- getMatrixPopSynthetic(pRAIDS)
dim(matGr)
#> [1] 2 26