| identifyRelative | R Documentation |
The function identify patients that are genetically related in the 1KG file. It generates a first RDS file with the list of unrelated patient. It also generates a second RDS file with the kinship coefficient between the patients.
identifyRelative(gds, maf = 0.05, thresh = 2^(-11/2), fileIBD, filePart)
gds |
an object of class
|
maf |
a single |
thresh |
a single |
fileIBD |
a |
filePart |
a |
NULL invisibly.
Pascal Belleau, Astrid DeschĂȘnes and Alexander Krasnitz
## Needed packages
library(withr)
library(gdsfmt)
## Path to the demo pedigree file is located in this package
data.dir <- system.file("extdata", package="RAIDS")
## Open existing 1K GDS file
GDS_file <- file.path(data.dir, "1KG_Demo.gds")
gdsFile <- snpgdsOpen(GDS_file)
## Temporary output files
## The first RDS file will contain the list of unrelated patients
## The second RDS file will contain the kinship information between patients
patientTmpFile <- local_file(file.path(data.dir,
"unrelatedPatients_TEMP.rds"))
ibdTmpFile <- local_file(file.path(data.dir,"ibd_TEMP.rds"))
## Identify unrelated patients in 1KG GDS file
identifyRelative(gds=gdsFile, maf=0.05, thresh=2^(-11/2),
fileIBD=ibdTmpFile, filePart=patientTmpFile)
## Close 1K GDS file
closefn.gds(gdsFile)
## Remove temporary files
deferred_run()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.