From 6fa7aab9cba87d94a475e59a3058dabb8f4fed37 Mon Sep 17 00:00:00 2001 From: chorscroft <c.horscroft@soton.ac.uk> Date: Wed, 26 Feb 2020 17:50:33 +0000 Subject: [PATCH] Fixed typos and grammar --- R/LDprofile-data.R | 6 +++--- R/LR.R | 2 +- R/L_plus_R.R | 2 +- R/Zalpha_BetaCDF.R | 8 ++++---- R/Zalpha_Zscore.R | 8 ++++---- R/Zalpha_all.R | 4 ++-- R/Zalpha_expected.R | 6 +++--- R/Zalpha_log_rsq_over_expected.R | 8 ++++---- R/Zalpha_rsq_over_expected.R | 8 ++++---- R/Zbeta.R | 4 ++-- R/Zbeta_BetaCDF.R | 8 ++++---- R/Zbeta_Zscore.R | 8 ++++---- R/Zbeta_expected.R | 6 +++--- R/Zbeta_log_rsq_over_expected.R | 8 ++++---- R/Zbeta_rsq_over_expected.R | 8 ++++---- R/zalpha.R | 4 ++-- man/LDprofile.Rd | 6 +++--- man/LR.Rd | 2 +- man/L_plus_R.Rd | 2 +- man/Zalpha_BetaCDF.Rd | 8 ++++---- man/Zalpha_Zscore.Rd | 8 ++++---- man/Zalpha_all.Rd | 4 ++-- man/Zalpha_expected.Rd | 6 +++--- man/Zalpha_log_rsq_over_expected.Rd | 8 ++++---- man/Zalpha_rsq_over_expected.Rd | 8 ++++---- man/Zbeta.Rd | 4 ++-- man/Zbeta_BetaCDF.Rd | 8 ++++---- man/Zbeta_Zscore.Rd | 8 ++++---- man/Zbeta_expected.Rd | 6 +++--- man/Zbeta_log_rsq_over_expected.Rd | 8 ++++---- man/Zbeta_rsq_over_expected.Rd | 8 ++++---- man/zalpha.Rd | 4 ++-- 32 files changed, 98 insertions(+), 98 deletions(-) diff --git a/R/LDprofile-data.R b/R/LDprofile-data.R index 25f1e0d..8b8e869 100644 --- a/R/LDprofile-data.R +++ b/R/LDprofile-data.R @@ -1,6 +1,6 @@ #' Dataset containing an example LD profile #' -#' A simulated LD profile, containing example LD statisics for +#' A simulated LD profile, containing example LD statistics for #' genetic distances of 0 to 0.0049, in bins of size 0.0001. #' #' @docType data @@ -10,8 +10,8 @@ #' @format A data frame with 50 rows and 5 variables: #' \describe{ #' \item{bin}{the lower bound of each bin} -#' \item{rsq}{the expected rsq value for a pair of snps, where the genetic distance between them falls in the given bin} -#' \item{sd}{the standard deviation of the expected rsq value} +#' \item{rsq}{the expected \eqn{r^2}{r^2} value for a pair of SNPs, where the genetic distance between them falls in the given bin} +#' \item{sd}{the standard deviation of the expected \eqn{r^2}{r^2} value} #' \item{Beta_a}{the first shape parameter for the Beta distribution fitted for this bin} #' \item{Beta_b}{the second shape parameter for the Beta distribution fitted for this bin} #' } diff --git a/R/LR.R b/R/LR.R index a1ef827..7c437ee 100644 --- a/R/LR.R +++ b/R/LR.R @@ -2,7 +2,7 @@ #' Runs the LR function #' #' Returns the \code{|L||R|} value for each SNP location supplied to the function. -#' For more information about the \code{|L||R|} diversity statistic please see Jacobs (2016). +#' For more information about the \code{|L||R|} diversity statistic, please see Jacobs (2016). #' #' @param pos A numeric vector of SNP locations #' @param ws The window size which the \code{LR} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. diff --git a/R/L_plus_R.R b/R/L_plus_R.R index 44425d3..5bb83ef 100644 --- a/R/L_plus_R.R +++ b/R/L_plus_R.R @@ -2,7 +2,7 @@ #' Runs the L_plus_R function #' #' Returns the \eqn{{|L| \choose 2} + {|R| \choose 2}}{(|L| choose 2) + (|R| choose 2)} value for each SNP location supplied to the function. -#' For more information about the \code{L_plus_R} diversity statistic please see Jacobs (2016). +#' For more information about the \code{L_plus_R} diversity statistic, please see Jacobs (2016). #' #' #' diff --git a/R/Zalpha_BetaCDF.R b/R/Zalpha_BetaCDF.R index f07cf3f..35e37d6 100644 --- a/R/Zalpha_BetaCDF.R +++ b/R/Zalpha_BetaCDF.R @@ -4,7 +4,7 @@ #' #' Returns a \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic is defined as: #' \deqn{{Z_{\alpha}^{BetaCDF}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}\frac{B(r^2_{i,j};a,b)}{B(a,b)} + {|R| \choose 2}^{-1}\sum_{i,j \in R}\frac{B(r^2_{i,j};a,b)}{B(a,b)}}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -12,14 +12,14 @@ #' the estimated a and b parameters from the LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor pbeta #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zalpha_Zscore.R b/R/Zalpha_Zscore.R index 65977b0..43f738f 100644 --- a/R/Zalpha_Zscore.R +++ b/R/Zalpha_Zscore.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\alpha}^{Zscore}}{Zalpha} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic is defined as: #' \deqn{{Z_{\alpha}^{Zscore}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]} + {|R| \choose 2}^{-1}\sum_{i,j \in R}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]}}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile, and \eqn{\sigma[r^2]}{\sigma[r^2]} is the standard deviation. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zalpha_all.R b/R/Zalpha_all.R index eed6e3c..2ec094f 100644 --- a/R/Zalpha_all.R +++ b/R/Zalpha_all.R @@ -11,12 +11,12 @@ #' \item For \code{\link{Zalpha_Zscore}} and \code{\link{Zbeta_Zscore}} to be calculated, the parameter \code{LDprofile_sd} must also be supplied. #' \item For \code{\link{Zalpha_BetaCDF}} and \code{\link{Zbeta_BetaCDF}} to be calculated, the parameters \code{LDprofile_Beta_a} and \code{LDprofile_Beta_b} must also be supplied. #' } -#' For more information about the statistics please see Jacobs (2016). +#' For more information about the statistics, please see Jacobs (2016). #' #' @importFrom stats cor pbeta #' #' @param pos A numeric vector of SNP locations -#' @param x Optional. A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x Optional. A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param ws The window size which the statistics will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param dist Optional. A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param LDprofile_bins Optional. A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zalpha_expected.R b/R/Zalpha_expected.R index 108d966..cc97349 100644 --- a/R/Zalpha_expected.R +++ b/R/Zalpha_expected.R @@ -4,15 +4,15 @@ #' #' Returns a \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}^{E[r^2]}} statistic is defined as: #' \deqn{{Z_{\alpha}^{E[r^2]}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}E[r^2_{i,j}] + {|R| \choose 2}^{-1}\sum_{i,j \in R}E[r^2_{i,j}]}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, #' and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @param pos A numeric vector of SNP locations diff --git a/R/Zalpha_log_rsq_over_expected.R b/R/Zalpha_log_rsq_over_expected.R index 643bc95..608860a 100644 --- a/R/Zalpha_log_rsq_over_expected.R +++ b/R/Zalpha_log_rsq_over_expected.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic is defined as: #' \deqn{{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}log_{10}(r^2_{i,j}/E[r^2_{i,j}]) + {|R| \choose 2}^{-1}\sum_{i,j \in R}log_{10}(r^2_{i,j}/E[r^2_{i,j}])}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zalpha_rsq_over_expected.R b/R/Zalpha_rsq_over_expected.R index baf6f30..4f2f28c 100644 --- a/R/Zalpha_rsq_over_expected.R +++ b/R/Zalpha_rsq_over_expected.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic is defined as: #' \deqn{{Z_{\alpha}^{r^2/E[r^2]}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j}/E[r^2_{i,j}] + {|R| \choose 2}^{-1}\sum_{i,j \in R}r^2_{i,j}/E[r^2_{i,j}]}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zbeta.R b/R/Zbeta.R index 8470364..cfd8593 100644 --- a/R/Zbeta.R +++ b/R/Zbeta.R @@ -2,7 +2,7 @@ #' Runs the Zbeta function #' #' Returns a \eqn{Z_{\beta}}{Zbeta} value for each SNP location supplied to the function. -#' For more information about the \eqn{Z_{\beta}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}=\frac{\sum_{i \in L,j \in R}r^2_{i,j}}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, and \eqn{r^2}{r^2} is equal to the squared correlation between a pair of SNPs @@ -10,7 +10,7 @@ #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param ws The window size which the \eqn{Z_{\beta}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param minRandL Minimum number of SNPs in each set R and L for the statistic to be calculated. Default is 4. #' @param minRL Minimum value for the product of the set sizes for R and L. Default is 25. diff --git a/R/Zbeta_BetaCDF.R b/R/Zbeta_BetaCDF.R index 958b74d..fa09a27 100644 --- a/R/Zbeta_BetaCDF.R +++ b/R/Zbeta_BetaCDF.R @@ -4,7 +4,7 @@ #' #' Returns a \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}^{BetaCDF}=\frac{\sum_{i \in L,j \in R}\frac{B(r^2_{i,j};a,b)}{B(a,b)}}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -12,14 +12,14 @@ #' the estimated a and b parameters from the LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor pbeta #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zbeta_Zscore.R b/R/Zbeta_Zscore.R index b386747..82e3978 100644 --- a/R/Zbeta_Zscore.R +++ b/R/Zbeta_Zscore.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\beta}^{Zscore}}{Zbeta} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}^{Zscore}=\frac{\sum_{i \in L,j \in R}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]}}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile, and \eqn{\sigma[r^2]}{\sigma[r^2]} is the standard deviation. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zbeta_expected.R b/R/Zbeta_expected.R index e4a1332..9b8f250 100644 --- a/R/Zbeta_expected.R +++ b/R/Zbeta_expected.R @@ -4,15 +4,15 @@ #' #' Returns a \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}^{E[r^2]}=\frac{\sum_{i \in L,j \in R}E[r^2_{i,j}]}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, #' and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @param pos A numeric vector of SNP locations diff --git a/R/Zbeta_log_rsq_over_expected.R b/R/Zbeta_log_rsq_over_expected.R index 2ad4b87..238df9d 100644 --- a/R/Zbeta_log_rsq_over_expected.R +++ b/R/Zbeta_log_rsq_over_expected.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}=\frac{\sum_{i \in L,j \in R}log_{10}(r^2_{i,j}/E[r^2_{i,j}])}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/Zbeta_rsq_over_expected.R b/R/Zbeta_rsq_over_expected.R index 5afa73e..2fe6cbb 100644 --- a/R/Zbeta_rsq_over_expected.R +++ b/R/Zbeta_rsq_over_expected.R @@ -4,21 +4,21 @@ #' #' Returns a \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} value for each SNP location supplied to the function, based on #' the expected \eqn{r^2} values given an LD profile and genetic distances. -#' For more information about the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic, please see Jacobs (2016). #' The \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic is defined as: #' \deqn{Z_{\beta}^{r^2/E[r^2]}=\frac{\sum_{i \in L,j \in R}r^2_{i,j}/E[r^2_{i,j}]}{|L||R|}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to #' the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a pair of SNPs, given an LD profile. #' #' The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -#' real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -#' profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +#' real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +#' profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower #' bound of the bin. #' #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param dist A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}. #' @param ws The window size which the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param LDprofile_bins A numeric vector containing the lower bound of the bins used in the LD profile. These should be of equal size. diff --git a/R/zalpha.R b/R/zalpha.R index d744760..7414560 100644 --- a/R/zalpha.R +++ b/R/zalpha.R @@ -2,7 +2,7 @@ #' Runs the Zalpha function #' #' Returns a \eqn{Z_{\alpha}}{Zalpha} value for each SNP location supplied to the function. -#' For more information about the \eqn{Z_{\alpha}}{Zalpha} statistic please see Jacobs (2016). +#' For more information about the \eqn{Z_{\alpha}}{Zalpha} statistic, please see Jacobs (2016). #' The \eqn{Z_{\alpha}}{Zalpha} statistic is defined as: #' \deqn{Z_{\alpha}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j} + {|R| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j}}{2}} #' where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, and \eqn{r^2}{r^2} is equal to the squared correlation between a pair of SNPs @@ -10,7 +10,7 @@ #' @importFrom stats cor #' #' @param pos A numeric vector of SNP locations -#' @param x A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. +#' @param x A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic. #' @param ws The window size which the \eqn{Z_{\alpha}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector. #' @param minRandL Minimum number of SNPs in each set R and L for the statistic to be calculated. Default is 4. #' @param minRL Minimum value for the product of the set sizes for R and L. Default is 25. diff --git a/man/LDprofile.Rd b/man/LDprofile.Rd index b3c23d9..a0ee7da 100644 --- a/man/LDprofile.Rd +++ b/man/LDprofile.Rd @@ -7,8 +7,8 @@ \format{A data frame with 50 rows and 5 variables: \describe{ \item{bin}{the lower bound of each bin} - \item{rsq}{the expected rsq value for a pair of snps, where the genetic distance between them falls in the given bin} - \item{sd}{the standard deviation of the expected rsq value} + \item{rsq}{the expected \eqn{r^2}{r^2} value for a pair of SNPs, where the genetic distance between them falls in the given bin} + \item{sd}{the standard deviation of the expected \eqn{r^2}{r^2} value} \item{Beta_a}{the first shape parameter for the Beta distribution fitted for this bin} \item{Beta_b}{the second shape parameter for the Beta distribution fitted for this bin} }} @@ -16,7 +16,7 @@ data(LDprofile) } \description{ -A simulated LD profile, containing example LD statisics for +A simulated LD profile, containing example LD statistics for genetic distances of 0 to 0.0049, in bins of size 0.0001. } \keyword{datasets} diff --git a/man/LR.Rd b/man/LR.Rd index 690e369..2aec83f 100644 --- a/man/LR.Rd +++ b/man/LR.Rd @@ -18,7 +18,7 @@ A list containing the SNP positions and the \code{LR} values for those SNPs } \description{ Returns the \code{|L||R|} value for each SNP location supplied to the function. -For more information about the \code{|L||R|} diversity statistic please see Jacobs (2016). +For more information about the \code{|L||R|} diversity statistic, please see Jacobs (2016). } \examples{ ## load the snps example dataset diff --git a/man/L_plus_R.Rd b/man/L_plus_R.Rd index eb3cd74..1567e72 100644 --- a/man/L_plus_R.Rd +++ b/man/L_plus_R.Rd @@ -18,7 +18,7 @@ A list containing the SNP positions and the \code{L_plus_R }values for those SNP } \description{ Returns the \eqn{{|L| \choose 2} + {|R| \choose 2}}{(|L| choose 2) + (|R| choose 2)} value for each SNP location supplied to the function. -For more information about the \code{L_plus_R} diversity statistic please see Jacobs (2016). +For more information about the \code{L_plus_R} diversity statistic, please see Jacobs (2016). } \examples{ ## load the snps example dataset diff --git a/man/Zalpha_BetaCDF.Rd b/man/Zalpha_BetaCDF.Rd index 682b59f..b921b5a 100644 --- a/man/Zalpha_BetaCDF.Rd +++ b/man/Zalpha_BetaCDF.Rd @@ -10,7 +10,7 @@ Zalpha_BetaCDF(pos, x, dist, ws, LDprofile_bins, LDprofile_Beta_a, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -34,7 +34,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} v \description{ Returns a \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}^{BetaCDF}}{Zalpha} statistic is defined as: \deqn{{Z_{\alpha}^{BetaCDF}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}\frac{B(r^2_{i,j};a,b)}{B(a,b)} + {|R| \choose 2}^{-1}\sum_{i,j \in R}\frac{B(r^2_{i,j};a,b)}{B(a,b)}}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -43,8 +43,8 @@ the estimated a and b parameters from the LD profile. } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zalpha_Zscore.Rd b/man/Zalpha_Zscore.Rd index 8c0e88e..d65fa1e 100644 --- a/man/Zalpha_Zscore.Rd +++ b/man/Zalpha_Zscore.Rd @@ -10,7 +10,7 @@ Zalpha_Zscore(pos, x, dist, ws, LDprofile_bins, LDprofile_rsq, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -34,7 +34,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} va \description{ Returns a \eqn{Z_{\alpha}^{Zscore}}{Zalpha} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}^{Zscore}}{Zalpha} statistic is defined as: \deqn{{Z_{\alpha}^{Zscore}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]} + {|R| \choose 2}^{-1}\sum_{i,j \in R}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]}}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -42,8 +42,8 @@ the squared correlation between a pair of SNPs, \eqn{E[r^2]}{E[r^2]} is equal to } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zalpha_all.Rd b/man/Zalpha_all.Rd index 5040d38..3b2f531 100644 --- a/man/Zalpha_all.Rd +++ b/man/Zalpha_all.Rd @@ -11,7 +11,7 @@ Zalpha_all(pos, x = NULL, ws, dist = NULL, LDprofile_bins = NULL, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{Optional. A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{Optional. A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{ws}{The window size which the statistics will be calculated over. This should be on the same scale as the \code{pos} vector.} @@ -48,7 +48,7 @@ This includes the statistics: \code{\link{Zalpha_expected}}, \code{\link{Zalpha_ \item For \code{\link{Zalpha_Zscore}} and \code{\link{Zbeta_Zscore}} to be calculated, the parameter \code{LDprofile_sd} must also be supplied. \item For \code{\link{Zalpha_BetaCDF}} and \code{\link{Zbeta_BetaCDF}} to be calculated, the parameters \code{LDprofile_Beta_a} and \code{LDprofile_Beta_b} must also be supplied. } -For more information about the statistics please see Jacobs (2016). +For more information about the statistics, please see Jacobs (2016). } \examples{ ## load the snps and LDprofile example datasets diff --git a/man/Zalpha_expected.Rd b/man/Zalpha_expected.Rd index c15446d..cfcf21f 100644 --- a/man/Zalpha_expected.Rd +++ b/man/Zalpha_expected.Rd @@ -30,7 +30,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} va \description{ Returns a \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}^{E[r^2]}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}^{E[r^2]}} statistic is defined as: \deqn{{Z_{\alpha}^{E[r^2]}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}E[r^2_{i,j}] + {|R| \choose 2}^{-1}\sum_{i,j \in R}E[r^2_{i,j}]}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, @@ -38,8 +38,8 @@ and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zalpha_log_rsq_over_expected.Rd b/man/Zalpha_log_rsq_over_expected.Rd index 07f410a..3fe024a 100644 --- a/man/Zalpha_log_rsq_over_expected.Rd +++ b/man/Zalpha_log_rsq_over_expected.Rd @@ -10,7 +10,7 @@ Zalpha_log_rsq_over_expected(pos, x, dist, ws, LDprofile_bins, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -32,7 +32,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2] \description{ Returns a \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}{Zalpha} statistic is defined as: \deqn{{Z_{\alpha}^{log_{10}(r^2/E[r^2])}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}log_{10}(r^2_{i,j}/E[r^2_{i,j}]) + {|R| \choose 2}^{-1}\sum_{i,j \in R}log_{10}(r^2_{i,j}/E[r^2_{i,j}])}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -40,8 +40,8 @@ the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equa } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zalpha_rsq_over_expected.Rd b/man/Zalpha_rsq_over_expected.Rd index 5a77013..52846dc 100644 --- a/man/Zalpha_rsq_over_expected.Rd +++ b/man/Zalpha_rsq_over_expected.Rd @@ -10,7 +10,7 @@ Zalpha_rsq_over_expected(pos, x, dist, ws, LDprofile_bins, LDprofile_rsq, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -32,7 +32,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha \description{ Returns a \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}^{r^2/E[r^2]}}{Zalpha} statistic is defined as: \deqn{{Z_{\alpha}^{r^2/E[r^2]}}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j}/E[r^2_{i,j}] + {|R| \choose 2}^{-1}\sum_{i,j \in R}r^2_{i,j}/E[r^2_{i,j}]}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -40,8 +40,8 @@ the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equa } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zbeta.Rd b/man/Zbeta.Rd index 7fab5d6..f411b5f 100644 --- a/man/Zbeta.Rd +++ b/man/Zbeta.Rd @@ -9,7 +9,7 @@ Zbeta(pos, x, ws, minRandL = 4, minRL = 25, X = NULL) \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{ws}{The window size which the \eqn{Z_{\beta}}{Zbeta} statistic will be calculated over. This should be on the same scale as the \code{pos} vector.} @@ -24,7 +24,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}}{Zbeta} values for th } \description{ Returns a \eqn{Z_{\beta}}{Zbeta} value for each SNP location supplied to the function. -For more information about the \eqn{Z_{\beta}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}=\frac{\sum_{i \in L,j \in R}r^2_{i,j}}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, and \eqn{r^2}{r^2} is equal to the squared correlation between a pair of SNPs diff --git a/man/Zbeta_BetaCDF.Rd b/man/Zbeta_BetaCDF.Rd index e1b6517..8fa974b 100644 --- a/man/Zbeta_BetaCDF.Rd +++ b/man/Zbeta_BetaCDF.Rd @@ -10,7 +10,7 @@ Zbeta_BetaCDF(pos, x, dist, ws, LDprofile_bins, LDprofile_Beta_a, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -34,7 +34,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} val \description{ Returns a \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}^{BetaCDF}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}^{BetaCDF}=\frac{\sum_{i \in L,j \in R}\frac{B(r^2_{i,j};a,b)}{B(a,b)}}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -43,8 +43,8 @@ the estimated a and b parameters from the LD profile. } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zbeta_Zscore.Rd b/man/Zbeta_Zscore.Rd index cfe5bf6..0cf6b0d 100644 --- a/man/Zbeta_Zscore.Rd +++ b/man/Zbeta_Zscore.Rd @@ -10,7 +10,7 @@ Zbeta_Zscore(pos, x, dist, ws, LDprofile_bins, LDprofile_rsq, LDprofile_sd, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -34,7 +34,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}^{Zscore}}{Zbeta} valu \description{ Returns a \eqn{Z_{\beta}^{Zscore}}{Zbeta} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}^{Zscore}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}^{Zscore}=\frac{\sum_{i \in L,j \in R}\frac{r^2_{i,j}-E[r^2_{i,j}]}{\sigma[r^2_{i,j}]}}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -42,8 +42,8 @@ the squared correlation between a pair of SNPs, \eqn{E[r^2]}{E[r^2]} is equal to } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zbeta_expected.Rd b/man/Zbeta_expected.Rd index 5b84859..52d448c 100644 --- a/man/Zbeta_expected.Rd +++ b/man/Zbeta_expected.Rd @@ -30,7 +30,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} valu \description{ Returns a \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}^{E[r^2]}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}^{E[r^2]}=\frac{\sum_{i \in L,j \in R}E[r^2_{i,j}]}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, @@ -38,8 +38,8 @@ and \eqn{E[r^2]}{E[r^2]} is equal to the expected squared correlation between a } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zbeta_log_rsq_over_expected.Rd b/man/Zbeta_log_rsq_over_expected.Rd index 9138232..4138545 100644 --- a/man/Zbeta_log_rsq_over_expected.Rd +++ b/man/Zbeta_log_rsq_over_expected.Rd @@ -10,7 +10,7 @@ Zbeta_log_rsq_over_expected(pos, x, dist, ws, LDprofile_bins, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -32,7 +32,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2]) \description{ Returns a \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}^{log_{10}(r^2/E[r^2])}=\frac{\sum_{i \in L,j \in R}log_{10}(r^2_{i,j}/E[r^2_{i,j}])}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -40,8 +40,8 @@ the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equa } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/Zbeta_rsq_over_expected.Rd b/man/Zbeta_rsq_over_expected.Rd index 13e9251..2fdfcee 100644 --- a/man/Zbeta_rsq_over_expected.Rd +++ b/man/Zbeta_rsq_over_expected.Rd @@ -10,7 +10,7 @@ Zbeta_rsq_over_expected(pos, x, dist, ws, LDprofile_bins, LDprofile_rsq, \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{dist}{A numeric vector of genetic distances (e.g. cM, LDU). This should be the same length as \code{pos}.} @@ -32,7 +32,7 @@ A list containing the SNP positions and the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} \description{ Returns a \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} value for each SNP location supplied to the function, based on the expected \eqn{r^2} values given an LD profile and genetic distances. -For more information about the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic, please see Jacobs (2016). The \eqn{Z_{\beta}^{r^2/E[r^2]}}{Zbeta} statistic is defined as: \deqn{Z_{\beta}^{r^2/E[r^2]}=\frac{\sum_{i \in L,j \in R}r^2_{i,j}/E[r^2_{i,j}]}{|L||R|}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, \eqn{r^2}{r^2} is equal to @@ -40,8 +40,8 @@ the squared correlation between a pair of SNPs, and \eqn{E[r^2]}{E[r^2]} is equa } \details{ The LD profile describes the expected correlation between SNPs at a given genetic distance, generated using simulations or -real data. Care should be taken to utilise an LD profile which is representative of the population in question. The LD -profile should consist of evenly-sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower +real data. Care should be taken to utilise an LD profile that is representative of the population in question. The LD +profile should consist of evenly sized bins of distances (for example 0.00001 cM per bin), where the value given is the (inclusive) lower bound of the bin. } \examples{ diff --git a/man/zalpha.Rd b/man/zalpha.Rd index 78f503e..4b72dd0 100644 --- a/man/zalpha.Rd +++ b/man/zalpha.Rd @@ -9,7 +9,7 @@ Zalpha(pos, x, ws, minRandL = 4, minRL = 25, X = NULL) \arguments{ \item{pos}{A numeric vector of SNP locations} -\item{x}{A matrix of SNP values. Columns represent chromosomes, rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} +\item{x}{A matrix of SNP values. Columns represent chromosomes; rows are SNP locations. Hence, the number of rows should equal the length of the \code{pos} vector. SNPs should all be biallelic.} \item{ws}{The window size which the \eqn{Z_{\alpha}}{Zalpha} statistic will be calculated over. This should be on the same scale as the \code{pos} vector.} @@ -24,7 +24,7 @@ A list containing the SNP positions and the \eqn{Z_{\alpha}}{Zalpha} values for } \description{ Returns a \eqn{Z_{\alpha}}{Zalpha} value for each SNP location supplied to the function. -For more information about the \eqn{Z_{\alpha}}{Zalpha} statistic please see Jacobs (2016). +For more information about the \eqn{Z_{\alpha}}{Zalpha} statistic, please see Jacobs (2016). The \eqn{Z_{\alpha}}{Zalpha} statistic is defined as: \deqn{Z_{\alpha}=\frac{{|L| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j} + {|R| \choose 2}^{-1}\sum_{i,j \in L}r^2_{i,j}}{2}} where \code{|L|} and \code{|R|} are the number of SNPs to the left and right of the current locus within the given window \code{ws}, and \eqn{r^2}{r^2} is equal to the squared correlation between a pair of SNPs -- GitLab