Learn R Programming

CAnD (version 1.4.0)

getDiffMatrices: Calculate the Mean Ancestry Proportion Excluding Each Chromosome/Chromosomal Segment in Turn

Description

A helper function to calculate the mean ancestry proportion for a given subpopulation, excluding each chromosome/chromosomal segment in turn.

Usage

getDiffMatrices(chrAncest, diff = TRUE)

Arguments

chrAncest
A data.frame holding the ancestral proportions; each row corresponds to a sample and each column corresponds to a chromosomal/chromosomal segment ancestry proportion. Note: only include the proportions for one ancestral population at a time.
diff
A logical argment indicating whether the difference between the pooled mean and the chromosomal mean should be returned, or whether simply the pooled mean should be returned.

Value

A matrix of chromosomal ancestry differences.

Details

This function calculates the mean ancestry proportion of a given subpopulation excluding each chromosome in turn.