ihs: Computes iHS Statistics (standardized IHH)

Description Usage Arguments Details Value See Also Examples

View source: R/ihs.R

Description

This function computes iHS Statistics (standardized IHH) for all target populations and SNPs.

Usage

1
2
ihs(snp.list = NULL, pop = NULL, filter = 2, annot = T, write.xls = "both", plot = T, plot.format =  "png", 
freqbin = 0.025, minmaf = 0.05)

Arguments

snp.list

Character vector. If NULL (default), all SNPs present in 'snps' directory, or a character vector with the exact names from the target-SNP files (also supposed to be in 'populations' directory).

filter

Numeric value for filtering significant iHS scores (default = 2).

annot

Logical scalar. If TRUE (default), SNP annotation in xls files will be written with correspondent SNP's genes, as well as ancestral and derived allele present in the dataset. FALSE turns off this feature.

write.xls

Scalar character. It could be set to "all.snps" for annotating all SNPs included in this analysis, and "ss.snps" for annotating only SNPs statistically significant (defined by 'filter' argument), or 'both' (default) for both annotation outputs.

plot

Logical scalar. If TRUE (default), then distribution plots are generated and saved as png figures.

Details

All populations included in 'scanhh.RData' will be analyzed. This function creates a new directory in 'rehh_out' folder, named 'ihs', with two sub-directories: 'ihs/graphics' for plots, and 'ihs/tables' for csv and xls files.

The default value for 'filter' parameter has been set to 2 accordingly the standard value described on original paper. Two simple files (.csv) with iHS results will be generated for all included populations: one with all SNPs included on analysis, and another with only statistically significant SNPs.

The 'annot' parameter turns on or off annotation procedure (default is TRUE, meaning 'on'), while argument passed in 'write.xls' parameter tells which SNPs must be included on analysis ("all.snps", "ss.snps" or "both"). Plot argument enables the generation of two plots/figures per population.

Except by annotation argument ('annot = T'), this function usually runs very fast. However, depending on how many target-SNPs are present in the dataset, the annotation velocity may vary considerably.

Value

iHS files (csv or xls with SNP annotation) and iHS plots.

See Also

make.scanhh

Examples

1
2
3
4
5
6
## Not run: ihs()

## Not run: 
ihs(snp.list = 'all', filter = 2, annot = T, write.xls = 'ss.snps', plot = F)

## End(Not run)

cmcouto-silva/LD documentation built on Sept. 20, 2020, 2:46 p.m.