TODO

runADMIXTURE(pathOut, fileBed, seedAdmix = 3435L, pRAIDS)

Arguments

pathOut

a character representing path where the file for ADMIXTURE (BED,BIM, FAM, and P.in) are located and where the output of ADMIXTURE will be generated.

fileBed

a character represented the BED file name (without path) for a

seedAdmix

a integer representing the seed pass to ADMIXTURE. Default: 3435L.

pRAIDS

a RAIDSparam an object with all the RAIDS parameters

Value

0L when successful.

Details

TODO

Author

Pascal Belleau, Astrid Deschênes and Alexander Krasnitz

Examples


if (FALSE) { # \dontrun{
## Load the known ancestry for the demo 1KG reference profiles
data(demoKnownSuperPop1KG)

## Path to the demo Profile GDS file is located in this package
dataDir <- system.file("extdata/demoAncestryCall", package="RAIDS")

pathOut <- file.path(tempdir(), "out.tmp")
if(!dir.exists(pathOut)){
    dir.create(pathOut)
}

# 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

## Path to admixture
## pathADMIXTURE <- "PATH/admixture"

pRAIDS <- RAIDSparam(studyDF=studyDF,
                      pedStudy=pedStudy,
                      pathProfileGDS=pathProfileGDS,
                      fileReferenceGDS=fileReferenceGDS,
                      fieldPopInfAnc="SuperPop",
                      pathADMIXTURE=pathADMIXTURE)
matPIndex <- RAIDS:::computePmatrix(pathOut=pathOut, pRAIDS=pRAIDS)
RAIDS:::generateProfilePlinkFiles(pathOut, pRAIDS)

profileQ <- runADMIXTURE(pathOut = file.path(pathOut, "profileAdmixture"),
    fileBed = paste0(pedStudy(pRAIDS)$Name.ID[1], ".bed"),
    seedAdmix=seedADMIXTURE(pRAIDS), pRAIDS)


dir(file.path(pathOut,"profileAdmixture"))
print(profileQ)
unlink(file.path(pathOut), recursive = TRUE)
} # }