Learn R Programming

rehh (version 2.0.4)

ies2rsb: Compute Rsb (standardized ratio of iES between two populations)

Description

Compute Rsb (standardized ratio of iES between two populations).

Usage

ies2rsb(hh_pop1, hh_pop2, popname1 = NA, popname2 = NA,
            method = "bilateral")

Arguments

hh_pop1

A matrix with nsnps rows and six columns (Chromosome name, position of the SNP, Frequency of the ancestral allele, iHH for the ancestral allele, iHH for the derived allele and iES) obtained after performing a scan on the first population.

hh_pop2

A matrix with nsnps rows and six columns (Chromosome name, position of the SNP, Frequency of the ancestral allele, iHH for the ancestral allele, iHH for the derived allele and iES) obtained after performing a scan on the second population.

popname1

Name of the first population compared (character string).

popname2

Name of the second population compared (character string).

method

Either "bilateral" or "unilateral". If bilateral (resp. unilateral), the pvalue (assuming Rsb follows a standard Gaussian distribution under neutrality) corresponds to a bilateral (resp. unilateral) tests

Value

The returned value is a matrix with nsnps rows and four columns (Chromosome name, position of the SNP, Rsb and Pvalue)

Details

Ratio of iES (population 1 over population 2) computed and standardized as described in Tang et al. (2007)

References

Gautier, M. and Naves, M. (2011). Footprints of selection in the ancestral admixture of a New World Creole cattle breed. Molecular Ecology, 20, 3128--3143.

Tang, K. and Thornton, K.R. and Stoneking, M. (2007). A New Approach for Using Genome Scans to Detect Recent Positive Selection in the Human Genome. Plos Biology, 7, e171.

See Also

calc_ehhs,scan_hh,distribplot,rsbplot

Examples

Run this code
# NOT RUN {
data(wgscan.cgu) ; data(wgscan.eut)
## results from a genome scan (44,057 SNPs)
##see ?wgscan.eut and ?wgscan.cgu for details
res.rsb<-ies2rsb(wgscan.cgu,wgscan.eut,"CGU","EUT")
# }

Run the code above in your browser using DataLab