cleanuprvals: Discard non-desired pairwise relatedness values.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/related.R

Description

This function removes non-informative pairwise relatedness values from simulated data sets.

Usage

1
cleanuprvals(simdata, ninds)

Arguments

simdata

A data frame containing pairwise relatedness values for a simulated data set (generated by the familysim function).

ninds

A single value representing the number of simulated pairs that were generated for each degree of relatedness. For example, this value would be 100 if you similated 100 parent-offspring pairs, 100 full-sib pairs, 100 half-sib pairs, and 100 unrelated pairs.

Details

The familysim function will generate the defined number of pairs of individuals of known relatedness. However, the coancestry function calculates relatedness for all pairwise comparisons. We are not interested in most of these. For example, for parent-offspring we are only interested in the relatedness of individuals 1 and 2, 3 and 4, 5 and 6, and so on. We don't care about the relatedness of 1 and 3, 1 and 4, etc. To deal with this, the cleanuprvals function will remove the unwanted relatedness values, resulting in a data frame containing only the relatedness values of interest (those for the simulated number of pairs for each relatedness value).

Value

A data frame containing pairwise relatedness values for simulated pairs of known relatedness.

Author(s)

Tim Frasier <timothy.frasier@smu.ca>

See Also

familysim, coancestry

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
	## Not run: 	
		#---Load Genotype Data---#
		data(GenotypeData)
		input <- readgenotypedata(GenotypeData)

		#---Create a data set of simulated individuals based on observed allele frequencies---#
		sim <- familysim(input$freqs, 100)

		#---Calculate pairwise relatedness---#
		output <- coancestry(sim, wang = 1)

		#---Clean up results to contain only desired relatedness values---#
		simrel <- cleanuprvals(output$relatedness, 100)
	
## End(Not run)	

related documentation built on May 2, 2019, 6:49 p.m.