Learn R Programming

ibdreg (version 0.2.2)

create.ibd.dat: 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

Value

  • An object with class ibd.dat, which contains the following elements:
  • ped.idpedigree identifier code
  • person1.ididentifier to person 1 of the relative pair
  • person2.ididentifier to person 2 of the relative pair
  • post0data.frame with probability of sharing zero (0) alleles ibd between relative pairs (rows) at each position (columns)
  • post1data.frame with probability of sharing one (1) alleles ibd between relative pairs (rows) at each position (columns)
  • post2data.frame with probability of sharing two (2) alleles ibd between relative pairs (rows) at each position (columns)
  • prior0vector with probability of sharing zero (0) alleles ibd between relative pairs, given no genotype data
  • prior1vector with probability of sharing one (1) alleles ibd between relative pairs, given no genotype data
  • prior2vector with probability of sharing two (2) alleles ibd between relative pairs, given no genotype data

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.

See Also

ibdreg, ibd.df.merlin, mergeIBD

Examples

Run this code
## 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)

Run the code above in your browser using DataLab