AnalyseExpt: A function to analyse a selection experiment, including...

Description Usage Arguments Value See Also Examples

Description

A function to analyse a selection experiment, including observed frequencies of genotype and probabilities that they are due to random picking and positive selection.

Usage

1
2
3
AnalyseExpt(gt, survival, population = NULL, min.freq.al = NULL,
  location.cols = TRUE, deltas = TRUE, p.values = TRUE,
  genotypic = FALSE, backup.path = NULL)

Arguments

gt

A genotype data frame of your original population

survival

A logical vector. TRUE survived the experiment, FALSE died

population

A logical vector. TRUE belong to pop1, FALSE belong to pop2. A M&C FST estimation will be included in the result.

min.freq.al

Optional. Numeric from 0 to 1. Variants with MAF under this threshold will be ommited.

location.cols

If TRUE, adds two columns to the result, which are the scaffold name and the locus name as factors (deafult is FALSE)

deltas

If TRUE (default), include columns of differencies between relative allelic frequencies after selection and before selection in the result. Positive value means that the allele is more common in the survivers population.

p.values

If TRUE (default), some probabilities will be included in the result, as well as frequencies

genotypic

If TRUE, will include counts of genotype in the result.

backup.path

Optionnal. A path where backup files can be stored

Value

A data frame of frequencies and probabilities from your experiment.

See Also

For more information, see AnalyseSplittedExpt which this function bind.

Examples

1
2
3
4
5
6
7
## Not run: 
AnalyseExpt(gt, survival)
AnalyseExpt(gt, survival, min.freq.al = 0.1, location.cols = FALSE)
AnalyseExpt(gt, survival, deltas = FALSE, p.values = FALSE)
AnalyseExpt(gt, survival, backup.path = "example.csv")

## End(Not run)

laurentlab-mpipz/rsurvival documentation built on May 29, 2019, 9:14 a.m.