prepPed1KG: Prepare the pedigree file using pedigree information from 1KG

View source: R/process1KG.R

prepPed1KGR Documentation

Prepare the pedigree file using pedigree information from 1KG

Description

Using the pedigree file from 1KG, this function extracts needed information and formats it into a data.frame so in can be used in following steps of the ancestry inference process. The function also requires that the genotyping files associated to each sample be available in a specified directory.

Usage

prepPed1KG(pedFile, PATHGENO = file.path("data", "sampleGeno"), batch.v = 0L)

Arguments

pedFile

a character string representing the path and file name of the pedigree file from 1KG. The file must exist.

PATHGENO

a character string representing the path where the 1K genotyping files for each sample are located. Only the samples with associated genotyping files are retained in the creation of the final data.frame. The name of the genotyping files must correspond to the individual identification (Individual.ID) in the pedigree file. Default: "./data/sampleGeno".

batch.v

ainteger that uniquely identifies the source of the pedigree information. The 1KG is usually 0L. Default: 0L.

Value

A data.frame containing the needed pedigree information from 1K.

Author(s)

Pascal Belleau, Astrid DeschĂȘnes and Alexander Krasnitz

Examples


## Path to the demo pedigree file is located in this package
data.dir <- system.file("extdata", package="RAIDS")

## Demo pedigree file
pedDemoFile <- file.path(data.dir, "PedigreeDemo.ped")

## Create a data.frame containing the information of the retained
## samples (samples with existing genotyping files)
prepPed1KG(pedFile=pedDemoFile, PATHGENO=data.dir, batch.v=0L)



belleau/aicsPaper documentation built on Aug. 4, 2022, 1:12 a.m.