Description Usage Arguments Details Value See Also Examples
View source: R/make.input.files.R
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).
1 | make.input.files(populations = "all", chrs = 1:22, haps.subset = F, output)
|
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. |
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.
Input files for rehh package: .thap, .sample, and .inp .
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.