Learn R Programming

IBDhaploRtools (version 1.8)

ibdhap.summary.calls: ibdhap summary of called states

Description

Summarizes the data created by ibdhap.make.states by giving mean lengths of ibd segments, mean proportions of ibd shared, and counts on ibd segments. This gives information on the group of sets of haplotypes/genotypes or on an individual pairing.

Usage

ibdhap.summary.calls(calls, data.type = c("h", "g", "r"), position = NA)

Arguments

calls
The data.frame created from running ibdhap.make.calls on ibd_haplo output.
data.type
"h" : haplotypic data "g" : genotypic data (or hap data ran as genotypic) "r" : reduced data (output from running ibdhap.reduce.states and then ibdhap.make.states)
position
A position vector, with the same length as nrow(states.dat) describing the positions (in cM, M, or any other metric) of each marker. If positions is not included, "segment length" refers to number of SNPs making up a segment.

Value

Returns a list consisting of:
mean.prop
mean proportion of chromosomes called in any ibd shared, no ibd shared, and no calls
mean.length
mean lengths of segments of chromosome called in any ibd shared, no ibd shared, and no calls. Length is measured by the position vector (see above).
seg.counts
total counts of segments of chromosome called in any ibd shared, no ibd shared, and no calls

Details

ibdhap.summary analyzes all the data it is given.If states.dat consists of more than one column, means are calculated across all sets of haplotypes. For summaries on only one set of haplotypes/pair of genotypes, just pass this function the column of data corresponding to the specific set on which you want summary statistics.

Examples

Run this code

## this example is taken from the package vignette.
##See vignette(IBDhaploRtools_tutorial)

data(qibd_phased)
data(ids_phased)
data(trueibd_phased)

phased.gold <- ibdhap.make.calls( qibd.file  = qibd_phased,
                   ids.file= ids_phased, cutoff = 0.8)

summary.phased <- ibdhap.summary.calls( phased.gold, data.type="h")

Run the code above in your browser using DataLab