diff --git a/DESCRIPTION b/DESCRIPTION index 80aeddb..992ee05 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: statgenQTLxT Type: Package Title: Multi-Trait and Multi-Trial Genome Wide Association Studies -Version: 1.0.1 -Date: 2023-04-03 +Version: 1.0.2 +Date: 2024-01-23 Authors@R: c(person(given = "Bart-Jan", family = "van Rossum", email = "bart-jan.vanrossum@wur.nl", @@ -52,7 +52,7 @@ Description: Fast multi-trait and multi-trail Genome Wide Association Studies developed by Biometris. License: GPL-3 Encoding: UTF-8 -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Depends: R (>= 3.5) Imports: data.table, foreach, diff --git a/NEWS.md b/NEWS.md index 39f9c66..96c5f45 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# statgenQTLxT 1.0.2 + +* Improved documentation to address CRAN check notes + # statgenQTLxT 1.0.1 * No user visual changes. diff --git a/R/RcppExports.R b/R/RcppExports.R index dd94fca..b4ef6c7 100644 --- a/R/RcppExports.R +++ b/R/RcppExports.R @@ -22,10 +22,10 @@ updateFAHomVar <- function(s, wNew, pNew, m, maxDiag = 1e4) { #' #' Update W and P used in the iteration process in the EMFA algorithm. #' -#' @param Y An n x p matrix or data.frame. -#' @param WStart A p x p matrix or data.frame containing starting values for W. -#' @param m An integer. The order of the model. -#' @param PStart A p x p matrix or data.frame containing starting values for P. +#' @param y An n x p matrix or data.frame. +#' @param wStart A p x p matrix or data.frame containing starting values for W. +#' @param m0 An integer. The order of the model. +#' @param pStart A p x p matrix or data.frame containing starting values for P. #' @param hetVar Should an extra diagonal part be added in the model for the #' precision matrix? #' @param maxDiag A numerical value for the maximum value of the diagonal of P. @@ -174,19 +174,19 @@ LLQuadFormDiagCPP <- function(y, vInv, size_param_x = NULL) { #' Compute the estimates and standard errors for the covariates in the input #' matrix W. #' -#' @param y An n x p matrix of observed phenotypes, on p traits or environments +#' @param y0 An n x p matrix of observed phenotypes, on p traits or environments #' for n genotypes. No missing values are allowed. -#' @param w An n x c covariate matrix, c being the number of covariates and n +#' @param w0 An n x c covariate matrix, c being the number of covariates and n #' being the number of genotypes. c has to be at least one (typically an #' intercept). No missing values are allowed. -#' @param x An n x ns matrix of marker scores. Neither missing values nor +#' @param x0 An n x ns matrix of marker scores. Neither missing values nor #' non-segregating markers are allowed. #' @param vg A p x p matrix of genetic covariances. #' @param ve A p x p matrix of environmental covariances. #' @param k An n x n genetic relatedness matrix. #' @param returnSe Should standard errors and p-values be returned? #' @param estCom Should the common SNP-effect model be fitted? -#' @param ncores An integer indicating the number of cores used for parallel +#' @param nCores An integer indicating the number of cores used for parallel #' computation. #' #' @return A list containing the estimates, optionally the standard errors of diff --git a/R/statgenQTLxT.R b/R/statgenQTLxT.R index 11951f8..a26d874 100644 --- a/R/statgenQTLxT.R +++ b/R/statgenQTLxT.R @@ -1,7 +1,5 @@ +#' @useDynLib statgenQTLxT, .registration = TRUE +#' @importFrom Rcpp sourceCpp #' @keywords internal "_PACKAGE" -#' @docType package -#' @useDynLib statgenQTLxT, .registration = TRUE -#' @importFrom Rcpp sourceCpp -NULL diff --git a/cran-comments.md b/cran-comments.md index 9a8c2d8..6187833 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,7 +1,7 @@ -Minor release to allow for submission of new version of sommer. +Addressed CRAN check notes. ## Test environments -* local Windows 10 install, R 4.2.3 +* local Windows 10 install, R 4.3.2 * winbuilder * macbuilder * R-hub (devel and release) @@ -9,4 +9,3 @@ Minor release to allow for submission of new version of sommer. ## R CMD check results 0 errors | 0 warnings | 0 notes - diff --git a/man/LLQuadFormDiagCPP.Rd b/man/LLQuadFormDiagCPP.Rd index 2b7b450..9530b19 100644 --- a/man/LLQuadFormDiagCPP.Rd +++ b/man/LLQuadFormDiagCPP.Rd @@ -7,9 +7,6 @@ LLQuadFormDiagCPP(y, vInv, size_param_x = NULL) } \arguments{ -\item{y}{An n x p matrix of observed phenotypes, on p traits or environments -for n genotypes. No missing values are allowed.} - \item{vInv}{A n x p x p cube containing for each genotype l the p x p matrix \eqn{v_l ^ {-1}} (in the notation of Zhou and Stephens).} diff --git a/man/estEffsCPP.Rd b/man/estEffsCPP.Rd index 1d90693..676be5f 100644 --- a/man/estEffsCPP.Rd +++ b/man/estEffsCPP.Rd @@ -17,6 +17,16 @@ estEffsCPP( ) } \arguments{ +\item{y0}{An n x p matrix of observed phenotypes, on p traits or environments +for n genotypes. No missing values are allowed.} + +\item{w0}{An n x c covariate matrix, c being the number of covariates and n +being the number of genotypes. c has to be at least one (typically an +intercept). No missing values are allowed.} + +\item{x0}{An n x ns matrix of marker scores. Neither missing values nor +non-segregating markers are allowed.} + \item{vg}{A p x p matrix of genetic covariances.} \item{ve}{A p x p matrix of environmental covariances.} @@ -27,17 +37,7 @@ estEffsCPP( \item{estCom}{Should the common SNP-effect model be fitted?} -\item{y}{An n x p matrix of observed phenotypes, on p traits or environments -for n genotypes. No missing values are allowed.} - -\item{w}{An n x c covariate matrix, c being the number of covariates and n -being the number of genotypes. c has to be at least one (typically an -intercept). No missing values are allowed.} - -\item{x}{An n x ns matrix of marker scores. Neither missing values nor -non-segregating markers are allowed.} - -\item{ncores}{An integer indicating the number of cores used for parallel +\item{nCores}{An integer indicating the number of cores used for parallel computation.} } \value{ diff --git a/man/updateFA.Rd b/man/updateFA.Rd index f0194eb..97abc6d 100644 --- a/man/updateFA.Rd +++ b/man/updateFA.Rd @@ -19,6 +19,14 @@ updateFA( ) } \arguments{ +\item{y}{An n x p matrix or data.frame.} + +\item{wStart}{A p x p matrix or data.frame containing starting values for W.} + +\item{pStart}{A p x p matrix or data.frame containing starting values for P.} + +\item{m0}{An integer. The order of the model.} + \item{hetVar}{Should an extra diagonal part be added in the model for the precision matrix?} @@ -30,14 +38,6 @@ of the difference for P and W between two steps gets lower than this value.} \item{maxIter}{A numerical value for the maximum number of iterations.} \item{printProgress}{Should progress be printed during iterations?} - -\item{Y}{An n x p matrix or data.frame.} - -\item{WStart}{A p x p matrix or data.frame containing starting values for W.} - -\item{m}{An integer. The order of the model.} - -\item{PStart}{A p x p matrix or data.frame containing starting values for P.} } \description{ Update W and P used in the iteration process in the EMFA algorithm. diff --git a/src/EMFA.cpp b/src/EMFA.cpp index 010c939..f9499e6 100644 --- a/src/EMFA.cpp +++ b/src/EMFA.cpp @@ -55,10 +55,10 @@ void updateFAHomVar(arma::mat s, //' //' Update W and P used in the iteration process in the EMFA algorithm. //' -//' @param Y An n x p matrix or data.frame. -//' @param WStart A p x p matrix or data.frame containing starting values for W. -//' @param m An integer. The order of the model. -//' @param PStart A p x p matrix or data.frame containing starting values for P. +//' @param y An n x p matrix or data.frame. +//' @param wStart A p x p matrix or data.frame containing starting values for W. +//' @param m0 An integer. The order of the model. +//' @param pStart A p x p matrix or data.frame containing starting values for P. //' @param hetVar Should an extra diagonal part be added in the model for the //' precision matrix? //' @param maxDiag A numerical value for the maximum value of the diagonal of P. diff --git a/src/estEffsCPP.cpp b/src/estEffsCPP.cpp index b365411..52c48b9 100644 --- a/src/estEffsCPP.cpp +++ b/src/estEffsCPP.cpp @@ -84,19 +84,19 @@ double LLQuadFormDiagCPP(const arma::mat &y, //' Compute the estimates and standard errors for the covariates in the input //' matrix W. //' -//' @param y An n x p matrix of observed phenotypes, on p traits or environments +//' @param y0 An n x p matrix of observed phenotypes, on p traits or environments //' for n genotypes. No missing values are allowed. -//' @param w An n x c covariate matrix, c being the number of covariates and n +//' @param w0 An n x c covariate matrix, c being the number of covariates and n //' being the number of genotypes. c has to be at least one (typically an //' intercept). No missing values are allowed. -//' @param x An n x ns matrix of marker scores. Neither missing values nor +//' @param x0 An n x ns matrix of marker scores. Neither missing values nor //' non-segregating markers are allowed. //' @param vg A p x p matrix of genetic covariances. //' @param ve A p x p matrix of environmental covariances. //' @param k An n x n genetic relatedness matrix. //' @param returnSe Should standard errors and p-values be returned? //' @param estCom Should the common SNP-effect model be fitted? -//' @param ncores An integer indicating the number of cores used for parallel +//' @param nCores An integer indicating the number of cores used for parallel //' computation. //' //' @return A list containing the estimates, optionally the standard errors of