ihh2ihs: Compute iHS (standardized iHH)

Description Usage Arguments Details Value References See Also Examples

View source: R/ihh2ihs.R

Description

Compute iHS (standardized iHH).

Usage

1
ihh2ihs(res_ihh,freqbin=0.025,minmaf=0.05)

Arguments

res_ihh

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 population of interest.

freqbin

Size of the bin to standardize log(iHH1/iHH2) according to the underlying Derived Allele frequency. Allele frequency bins vary from minmaf to 1-minmaf per step of size freqbin. If freqbin is set to 0 (e.g. in the case of a large number of SNPs and few haplotypes), standardization is performed considering each observed frequency as a frequency class.

minmaf

SNPs with a MAF (Minor Allele Frequency) lower than minmaf are discarded from the analysis

Details

iHS (standardized iHH) are standardized as described in Voight et al. (2006)

Value

The returned value is a list containing two elements

res.ihs

matrix with nsnps rows and four columns (Chromosome name, position of the SNP, Rsb and Pvalue)

summary.class

matrix with nclasses rows and four columns (Class, Number of SNPs belonging to this class,position of the SNP, mean iHH in this class, standard deviation of iHH in this class)

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.

Voight, B.F. and Kudaravalli, S. and Wen, X. and Pritchard, J.K. (2006). A map of recent positive selection in the human genome. Plos Biology, 4, e72.

See Also

calc_ehh,scan_hh,distribplot,ihsplot

Examples

1
2
3
4
data(wgscan.cgu) 
## results from a genome scan (44,057 SNPs)
##see ?wgscan.eut and ?wgscan.cgu for details
res.ihs<-ihh2ihs(wgscan.cgu)

Example output

Loading required package: rehh.data
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

rehh documentation built on May 2, 2019, 5:17 p.m.