diff --git a/.Rbuildignore b/.Rbuildignore index 7739845..86d62bc 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,3 +15,5 @@ ^docimages/speaq-github-workflow.png$ ^revdep/.+$ ^.gitattributes +^\.github$ +^revdep$ diff --git a/.gitignore b/.gitignore index 59ddf3c..53b1ec2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ doc .DS_Store revdep/.cache.rds +/doc/ +/Meta/ diff --git a/.travis.yml b/.travis.yml index cdf6863..61dc0a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,6 @@ addons: packages: - r-cran-devtools - r-bioc-massspecwavelet - - r-cran-mqtl - r-cran-dosnow - r-cran-cluster - r-cran-data.table diff --git a/DESCRIPTION b/DESCRIPTION index c68d08f..ccb366e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: speaq -Version: 2.6.1 -Date: 2019-12-10 +Version: 2.7.0 +Date: 2022-05-20 Title: Tools for Nuclear Magnetic Resonance (NMR) Spectra Alignment, Peak Based Processing, Quantitative Analysis and Visualizations Author: Charlie Beirnaert, Trung Nghia Vu, Pieter Meysman, Kris Laukens and Dirk Valkenborg Maintainer: Charlie Beirnaert @@ -10,7 +10,6 @@ Depends: Imports: MassSpecWavelet, cluster, - mQTL, parallel, doSNOW, data.table, @@ -36,4 +35,5 @@ Suggests: LazyData: true VignetteBuilder: knitr License: Apache License 2.0 -RoxygenNote: 7.0.2 +RoxygenNote: 7.2.0 +Encoding: UTF-8 diff --git a/NAMESPACE b/NAMESPACE index 2f20aa5..b4f3ea1 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -47,7 +47,6 @@ importFrom(graphics,plot) importFrom(graphics,points) importFrom(gridExtra,grid.arrange) importFrom(impute,impute.knn) -importFrom(mQTL,normalise) importFrom(missForest,missForest) importFrom(parallel,makeCluster) importFrom(parallel,stopCluster) diff --git a/NEWS.md b/NEWS.md index 8d6ddd9..b340b59 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# speaq 2.6.2 +### 17/05/2022 + +* Removing mQTL dependencies due to ending CRAN availability of mQTL package. Probabilistic quotient normalisation will not be available anymore in SCANT function. Also ended support of deprecated 'what' option in SCANT function in favor of the 'feature_orientation' designation. + + # speaq 2.6.1 ### 10/12/2019 diff --git a/R/SCANT.R b/R/SCANT.R index fc3a4a3..6405a91 100644 --- a/R/SCANT.R +++ b/R/SCANT.R @@ -3,9 +3,8 @@ #' This function allows the column-wise or row-wise scaling, normalization and transformation operations on a data matrix. #' #' @param data.matrix the data matrix to be scaled, normalized or transformed. -#' @param type the operations to be performed, this can be multiple and are performed sequentially. Any of 'unit', 'pareto', 'log10', 'log2', 'center', 'range', 'vast', 'prob.Q' or 'max' are accepted. +#' @param type the operations to be performed, this can be multiple and are performed sequentially. Any of 'unit', 'pareto', 'log10', 'log2', 'center', 'range', 'vast', or 'max' are accepted. #' @param feature_orientation default = "columns". This corresponds to the default feature matrix with samples as rows and features as columns. The other option is "rows": samples as columns and different features as different rows. -#' @param what (deprecated, use feature_orientation) to specify on which to perform the operations (row or column). #' #' @return The scaled, normalized and/or transformed matrix. #' @@ -23,10 +22,9 @@ #' #' @export #' -#' @importFrom mQTL normalise #' @importFrom stats sd #' -SCANT <- function(data.matrix, type = "unit", feature_orientation = "columns", what = NA) { +SCANT <- function(data.matrix, type = "unit", feature_orientation = "columns") { for (N in seq_along(type)) { if (!(type[N] %in% c("unit", "pareto", "log10", "log2", "center", "range", "vast", "prob.Q", "max", "TotSum"))) { @@ -34,11 +32,6 @@ SCANT <- function(data.matrix, type = "unit", feature_orientation = "columns", w } } - if(!is.na(what)){ - warning("The use of the 'what' parameter is deprecated. Please use 'feature_orientation' instead. For now feature_orientation has been set in accordance with the supplied 'what' parameter.") - feature_orientation = what - } - if (!(feature_orientation %in% c("columns", "rows"))) { stop("No appropriate 'feature_orientation' is selected") } @@ -88,11 +81,6 @@ SCANT <- function(data.matrix, type = "unit", feature_orientation = "columns", w if (Curr.type == "vast") { scaled.data <- apply(scaled.data, 2, function(x) ((x - mean(x)) * mean(x))/(stats::sd(x)^2)) } - ## Quotient probabilistic normalisation - if (Curr.type == "prob.Q") { - scaled.data <- mQTL::normalise(scaled.data, "prob") - scaled.data <- scaled.data[[1]] - } if (Curr.type == "max") { scaled.data <- apply(scaled.data, 2, function(x) (x/max(x))) } diff --git a/R/Winedata.R b/R/Winedata.R index fbe914f..21bf8c6 100644 --- a/R/Winedata.R +++ b/R/Winedata.R @@ -11,7 +11,7 @@ #' @keywords datasets #' #' @references Larsen et al. (2006) An exploratory chemometric study of 1H-NMR spectra of table wines. J.Chemom. 20 (2006) 198-208 -#' (\href{http://onlinelibrary.wiley.com/doi/10.1002/cem.991/full}{Wiley Online Library}) +#' (\href{https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/abs/10.1002/cem.991}{Wiley Online Library}) #' #' @source University of Copenhagen, Dept. of Food Science, Quality & Technology. Available at 'models.life.ku.dk/datasets' #' diff --git a/cran-comments.Rmd b/cran-comments.Rmd index 09f4cf7..9f5de31 100644 --- a/cran-comments.Rmd +++ b/cran-comments.Rmd @@ -8,26 +8,22 @@ output: md_document MassSpecWavelet and impute are Bioconductor packages. ## Test environments -* local OS X install, R 3.6.1 -* devtools win-builder, R oldrel 3.5.3 (2019-03-11) -* devtools win-builder, R release 3.6.1 (2019-07-05) -* devtools win-builder, R devel (unstable) (2019-12-02 r77499) -* travis.ci Linux, x64, R release 3.6.1 (2017-01-27) -* travis.ci Linux, x64, R devel (unstable) (2019-12-10 r77548) +* local OS X install, R 4.2.0 +* devtools win-builder, R release 4.2.0 (2022-04-22 ucrt) +* devtools win-builder, R devel (2022-05-19 r82383 ucrt) ## R CMD check results There were no ERRORs or WARNINGs. -Local OS X build generated 1 NOTE +Local OS X build generated 0 NOTEs -Travis.ci generated no NOTEs +R-hub generatet 1 NOTE Win-builder generated 1 NOTE * Uses the superseded package: 'doSNOW': this is to provide continuously updated progress bars when performing parallel computations (not available in doParallel so far as doParallel calls the combine function only when all results have been accumulated). When this option is avalaible in doParallel the switch to this package will be made. -* possibly mis-spelled words in DESCRIPTION: These words are not mis-spelled. ## Downstream dependencies diff --git a/man/SCANT.Rd b/man/SCANT.Rd index 7851ad3..822545e 100644 --- a/man/SCANT.Rd +++ b/man/SCANT.Rd @@ -4,16 +4,14 @@ \alias{SCANT} \title{SCAle, Normalize and Transform a data matrix} \usage{ -SCANT(data.matrix, type = "unit", feature_orientation = "columns", what = NA) +SCANT(data.matrix, type = "unit", feature_orientation = "columns") } \arguments{ \item{data.matrix}{the data matrix to be scaled, normalized or transformed.} -\item{type}{the operations to be performed, this can be multiple and are performed sequentially. Any of 'unit', 'pareto', 'log10', 'log2', 'center', 'range', 'vast', 'prob.Q' or 'max' are accepted.} +\item{type}{the operations to be performed, this can be multiple and are performed sequentially. Any of 'unit', 'pareto', 'log10', 'log2', 'center', 'range', 'vast', or 'max' are accepted.} \item{feature_orientation}{default = "columns". This corresponds to the default feature matrix with samples as rows and features as columns. The other option is "rows": samples as columns and different features as different rows.} - -\item{what}{(deprecated, use feature_orientation) to specify on which to perform the operations (row or column).} } \value{ The scaled, normalized and/or transformed matrix. diff --git a/man/Winedata.Rd b/man/Winedata.Rd index 47f77f5..7c712a3 100644 --- a/man/Winedata.Rd +++ b/man/Winedata.Rd @@ -4,7 +4,9 @@ \name{Winedata} \alias{Winedata} \title{Wine dataset} -\format{A list with the spectra, ppm values, color and origin as list entries.} +\format{ +A list with the spectra, ppm values, color and origin as list entries. +} \source{ University of Copenhagen, Dept. of Food Science, Quality & Technology. Available at 'models.life.ku.dk/datasets' } @@ -23,6 +25,6 @@ wine.origin <- Winedata$origin } \references{ Larsen et al. (2006) An exploratory chemometric study of 1H-NMR spectra of table wines. J.Chemom. 20 (2006) 198-208 -(\href{http://onlinelibrary.wiley.com/doi/10.1002/cem.991/full}{Wiley Online Library}) +(\href{https://onlinelibrary.wiley.com/doi/10.1002/cem.991/full}{Wiley Online Library}) } \keyword{datasets}