Learn R Programming

CrypticIBDcheck (version 0.3-3)

countIBS: calculates counts of 0, 1 and 2 IBS

Description

Returns counts of the number of markers at which a pair of subjects shares 0, 1 or 2 alleles identical-by-state (IBS), for all possible pairs. Counts for a given pair exclude markers where either pair member is missing data.

Usage

countIBS(x)

Arguments

x

An object of type snp.matrix

Value

IBS0

An upper triangular matrix whose (i,j)th element (i<j) is the count of non-missing markers where the ith and jth subjects share 0 alleles IBS.

IBS1

An upper triangular matrix whose (i,j)th element (i<j) is the count of non-missing markers where the ith and jth subjects share 1 allele IBS.

IBS2

An upper triangular matrix whose (i,j)th element (i<j) is the count of non-missing markers where the ith and jth subjects share 2 alleles IBS.

Examples

Run this code
# NOT RUN {
data(Nhlsim)
countIBS(Nhlsim$snp.data[1:5,])
# }

Run the code above in your browser using DataLab