getLocusProportion: XIBD Proportion of Pairs IBD

Description Usage Arguments Value Examples

Description

Calculate the proportion of pairs IBD at each SNP.

Usage

1
getLocusProportion(ped.genotypes, locus.matrix, groups = NULL)

Arguments

ped.genotypes

a named list containing pedigree, genotypes and model. See Value description in getGenotypes for more details. The family IDs and individual IDs in pedigree must match the family IDs and individual IDs in the header of genotypes.

locus.matrix

a data frame containing the binary IBD information for each SNP and each pair. See value description in getLocusMatrix for more details.

groups

a data frame with three columns of information:

  1. Family ID

  2. Sample ID

  3. Group ID

Group ID, for example, can be affection status. If groups is specified, each sample in the pedigree should belong to a group, and locus proportions will be calculated for each group. The default is groups=NULL.

Value

A data frame the following 5 columns:

  1. Chromosome (type "character", "numeric" or "integer")

  2. SNP identifiers (type "character")

  3. Genetic map distance (centi morgans, cM) (type "numeric")

  4. Base-pair position (type "integer")

  5. Proportion of pairs IBD (type "integer")

where each row describes a unique SNP. The data frame is headed chr, snp_id, pos_M, pos_bp and prop respectively. If groups is specified then there will be one column of proportions of each combination of groups with these column header by group IDs and the number of pairs in the group.

Examples

1
2
3
4
5
6
7
8
# generate a binary IBD matrix
my_locus_matrix <- getLocusMatrix(ped.genotypes = example_genotypes,
                                  ibd.segments = example_ibd)

# calculate the proportion of pairs IBD at each SNP
my_locus_prop <- getLocusProportion(ped.genotypes = example_genotypes,
                                    locus.matrix = my_locus_matrix,
                                    groups = NULL)

bahlolab/XIBD documentation built on May 11, 2019, 5:24 p.m.