create.ibd.dat: Create an ibd.dat object

View source: R/create.ibd.dat.q

create.ibd.datR Documentation

Create an ibd.dat object

Description

Combine a posterior IBD probabilities file with a prior IBD probabilities file

Usage

create.ibd.dat(postfile, priorfile, software="merlin", x.linked=FALSE,
               cov.data=NULL, rm.noninform=TRUE)

Arguments

postfile

full path and name of the file with posterior IBD probabilities

priorfile

full path and name of the file with prior IBD probabilities

software

character string of which software was used to create IBD probability files

x.linked

logical, is the chromosome X-linked. If TRUE, cov.data is required

cov.data

name of data.frame containing covariates, specifically ped.id, person.id, and sex. Required when x.linked=TRUE.

rm.noninform

logical, if TRUE, remove relative pairs that are not informative for linkage

Details

Perl scripts are provided within ibdreg/perl/ for creating IBD probability files, and are explained in the user manual. Prior probability files are made using a homozygous marker on the pedigree structure, or a "dummy" marker. When the chromosome is X-linked, the Merlin software treats males as homozygous for their X chromosome, and thus the probability of sharing 1 and 2 alleles IBD with any other relative are switched within create.ibd.dat.

Value

An object with class ibd.dat, which contains the following elements:

ped.id

pedigree identifier code

person1.id

identifier to person 1 of the relative pair

person2.id

identifier to person 2 of the relative pair

post0

data.frame with probability of sharing zero (0) alleles ibd between relative pairs (rows) at each position (columns)

post1

data.frame with probability of sharing one (1) alleles ibd between relative pairs (rows) at each position (columns)

post2

data.frame with probability of sharing two (2) alleles ibd between relative pairs (rows) at each position (columns)

prior0

vector with probability of sharing zero (0) alleles ibd between relative pairs, given no genotype data

prior1

vector with probability of sharing one (1) alleles ibd between relative pairs, given no genotype data

prior2

vector with probability of sharing two (2) alleles ibd between relative pairs, given no genotype data

See Also

ibdreg, ibd.df.merlin, mergeIBD

Examples

## do not run example in testing
## uncomment to run for demo

## ibd file for 1 chromosome
# ibdfile.ch20 <- "post.ibd"  

## ibd file for 1 locus for prior probs.
# prior.ibdfile <- "prior.ibd"

# ibd.dat.obj <- create.ibd.dat(postfile=post.ibd, 
#                               priorfile=prior.ibd,
#                               rm.noninform=FALSE)

# names(ibd.dat.obj)

ibdreg documentation built on Nov. 16, 2022, 5:14 p.m.