readIBDs {statgenIBD}R Documentation

Read IBD probabilities from file

Description

Reads IBD probabilities from a plain text, tab-delimited .txt or .ibd file. Information about the file format can be found in the vignette ( vignette("IBDFileFormat", package = "statgenIBD")). A data.frame with the map must be specified as well.

Usage

readIBDs(infile, map)

Arguments

infile

A character string specifying the path of the input file. Compressed files with extension ".gz" or ".bz2" are supported as well.

map

A data.frame with columns chr for chromosome and pos for position. Positions should be in centimorgan (cM). They should not be cumulative over the chromosomes. Other columns are ignored. Marker names should be in the row names. These should match the marker names in the input file.

Value

An object of class IBDprob.

Examples

## Read map for Steptoe Morex.
SxMmap <- read.delim(system.file("extdata/SxM", "SxM_map.txt",
                               package = "statgenIBD"), header = FALSE)
rownames(SxMmap) <- SxMmap$V1
SxMmap <- SxMmap[, -1]
colnames(SxMmap) <- c("chr", "pos")


## Read IBD probabilities for Steptoe Morex.
SxMIBD <- readIBDs(system.file("extdata/SxM", "SxM_IBDs.txt",
                               package = "statgenIBD"),
                  map = SxMmap)

## Print summary.
summary(SxMIBD)


[Package statgenIBD version 1.0.7 Index]