make.input.files: Make input files for rehh package

Description Usage Arguments Details Value See Also Examples

View source: R/make.input.files.R

Description

This function firstly extracts data according to user requirements, then convert .haps in .thap files, updating their allele codification and creating a unique map (.inp) file for all chromosomes and populations aimed by the user (files required as input in rehh package).

Usage

1
make.input.files(populations = "all", chrs = 1:22, haps.subset = F, output)

Arguments

populations

Character vector with target population's file names (assumed to be in 'populations' directory). If populations = "all" (default), then all files (populations) will be included on analysis.

chrs

Numeric vector with chromosome ID(s).

haps.subset

Logical scalar. If TRUE, new .haps & .sample files will be generated to the populations under analysis (default = FALSE).

output

A character vector containing the desired population names as output.

Details

R binary file acquired by make.binary.haplotypes.R() function is used at this function, therefore essentially necessary ('haplotypes/haps-sample.RData').

By default, all populations files in 'populations' directory are included in this function, although users can also specify the populations in a vector with the exact file names (without providing the path, which is supposed to be in 'populations' directory).

The 'haps.subset' parameter enables the user to extract data from specific populations as they are originally (.haps and .sample formats).

Be careful when using 'output' parameter while using 'populations' parameter's default argument, once you would not have control of the file names' order. If using the 'output' parameter, you'd rather specify the populations' names as well. Default values to 'output' parameter are automatically set according to acquired/loaded population's file names so that there are no issues to worry about.

Value

Input files for rehh package: .thap, .sample, and .inp .

See Also

make.binary.haplotypes

Examples

1
2
3
4
5
6
## Not run: 
make.input.files()
make.input.files(populations = c('Afr.txt', 'EUR.txt'), chrs = 1:10, haps.subset = T,
output = c('Africans','Europeans'))

## End(Not run)

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