Description Usage Arguments Details Value See Also Examples
This function computes Rsb Statistics (standardized cross-population EHH) using two populations and target-SNPs, then performs the SNPs' annotation and generate appropriate tables and graphics.
1 2 |
pop1 |
Scalar character with the name of the first population to be compared to the second. |
pop2 |
Scalar character with the name of the second population to be compared to the first one. |
popname1 |
Scalar character with an optional name for the first population. |
popname2 |
Scalar character with an optional name for the second population. |
snp.list |
Character vector. It could be a scalar named "all" (default) for loading all SNPs present in 'snps' directory, or a character vector with the exact names from the target-SNP files (also supposed to be in 'snps' directory). |
filter |
Numerical value for filtering significant Rsb scores (default = 2). |
method |
Scalar character. Indicates if applied method must be "bilateral", "unilateral", or "both" (default). |
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 significants (defined by 'filter' argument), or 'both' (default) for both annotation outputs. |
plot |
Logical scalar. If TRUE (default), then Rsb-related plots will be generated and saved as png figures. |
R binary file named 'scanhh.RData' must be loaded before running this function. Populations going to be analyzed must be provided as 'scanhh_list$NAME', where 'NAME' is the population name (see @Examples section). This function creates a new directory in 'rehh_out' folder, named 'rsb', with two sub-directories: 'rsb/graphics' for the plots, and 'rsb/tables' for csv and xls files.
The 'method' parameter indicates which method will be applied ('bilateral', 'unilateral', or 'both'; default = 'both'). The default value for 'filter' parameter has been set to 2 accordingly the standard value described on original paper.
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.
If all parameter's arguments are used as they are by default, then a total of four simple files (.csv) containing Rsb results will be generated by analysis to both methods, as well as four .xls files from 'write.xls' parameter.
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.
Rsb files: simple result files (.csv), SNP annotation (.xls) and/or Rsb plots (.png).
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
load('scanhh.RData')
rsb(pop1 = scanhh_list$Africans, pop2 = scanhh_list$Europeans)
## End(Not run)
## Not run:
load('scanhh.RData')
rsb(pop1 = scanhh_list$Africans, pop2 = scanhh_list$Europeans), snp.list = 'all', filter = 2,
method = 'unilateral', annot = T, write.xls = 'ss.snps', plot = T)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.