importPED {GenomicTools.fileHandler} | R Documentation |
importPED
Description
Import a PED/MAP file pair
Usage
importPED(file, n, snps = NULL, which, split = "\t| +", sep = ".",
na.strings = "0", lex.order = FALSE, verbose = TRUE)
Arguments
file |
ped filename |
n |
Number of samples to read |
snps |
map filename |
which |
Names of SNPS to import |
split |
Columns separator in ped file |
sep |
Character that separates Alleles |
na.strings |
Definition for missing values |
lex.order |
Logical, lexicographical order |
verbose |
Logical, verbose output |
Details
This function is to a large extend taken from snpStat::read.pedmap
, but here is internally the data.table::fread
function used
that resulted in much faster file processing.
To import the data, the ped file can be provided to the file
option and the map file to the snps
option. If no option is given to
snps
and the file
option is provided without any file extension, then the ped/map extension are automaticall added
Value
a pedmap object
Author(s)
Daniel Fischer
Examples
# Define here the location on HDD for the example file
pedPath <- system.file("extdata","example.ped", package="GenomicTools.fileHandler")
mapPath <- system.file("extdata","example.map", package="GenomicTools.fileHandler")
# Import the example ped/map files
importPED(file=pedPath, snps=mapPath)
[Package GenomicTools.fileHandler version 0.1.5.9 Index]