From fd64629c979c6558805d47e7e2cb54216ac96a99 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 13:55:13 +0100 Subject: [PATCH 01/12] update example for purityX causing build fail --- DESCRIPTION | 6 +++--- NEWS | 3 +++ R/purityX-constructor.R | 14 ++++++-------- man/msPurity.Rd | 23 +++++++++++++++++++++++ man/purityX.Rd | 14 ++++++-------- 5 files changed, 41 insertions(+), 19 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e8541da..89487c6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: msPurity Type: Package Title: Automated Evaluation of Precursor Ion Purity for Mass Spectrometry Based Fragmentation in Metabolomics -Version: 1.27.1 -Date: 2023-08-30 +Version: 1.31.1 +Date: 2024-05-09 Authors@R: c( person(given = "Thomas N.", family = "Lawson", email = "thomas.nigel.lawson@gmail.com", role = c("aut", "cre"), @@ -61,7 +61,7 @@ Suggests: RPostgres, RMySQL VignetteBuilder: knitr -RoxygenNote: 7.2.3 +RoxygenNote: 7.3.1 Roxygen: list(markdown = TRUE) biocViews: MassSpectrometry, Metabolomics, Software Collate: diff --git a/NEWS b/NEWS index 5a16fbe..8af8a75 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +CHANGES IN VERSION 1.30.1 / 1.31.1 ++ Update example for purityX causing build error + CHANGES IN VERSION 1.27.1 + createMSP fix - now uses the median precursor MZ and precursor RT in the MSP file diff --git a/R/purityX-constructor.R b/R/purityX-constructor.R index 9a40535..b9fa849 100644 --- a/R/purityX-constructor.R +++ b/R/purityX-constructor.R @@ -54,14 +54,12 @@ #' #' @return a purityX object containing a dataframe of predicted purity scores #' @examples -#' msPths <- list.files(system.file("extdata", "lcms", "mzML", -#' package="msPurityData"), full.names = TRUE, -#' pattern = "LCMS_") -#' xset <- xcms::xcmsSet(msPths) -#' xset <- xcms::group(xset) -#' xset <- xcms::retcor(xset) -#' xset <- xcms::group(xset) -#' ppLCMS <- purityX(xset, cores = 1, xgroups = c(1, 2)) +#' +#' msPths <- list.files(system.file("extdata", "lcms", "mzML", package="msPurityData"), full.names = TRUE, pattern = "LCMS_") +#' xset <- readRDS(system.file("extdata", "tests", "xcms", "ms_only_xset_OLD.rds", package="msPurity")) +#' xset@filepaths[1] <- msPths[basename(msPths)=="LCMS_1.mzML"] +#' xset@filepaths[2] <- msPths[basename(msPths)=="LCMS_2.mzML"] +#' px <- purityX(xset, singleFile = 1) #' #' @export purityX <- function(xset, purityType="purityFWHMmedian", offsets=c(0.5, 0.5), diff --git a/man/msPurity.Rd b/man/msPurity.Rd index 2c7d7ec..b158cf3 100644 --- a/man/msPurity.Rd +++ b/man/msPurity.Rd @@ -2,8 +2,31 @@ % Please edit documentation in R/msPurity.R \docType{package} \name{msPurity} +\alias{msPurity-package} \alias{msPurity} \title{\code{msPurity} package} \description{ \href{https://bioconductor.org/packages/release/bioc/html/msPurity.html}{msPurity Bioconductor} } +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/computational-metabolomics/msPurity/} + \item Report bugs at \url{https://github.com/computational-metabolomics/msPurity/issues/new} +} + +} +\author{ +\strong{Maintainer}: Thomas N. Lawson \email{thomas.nigel.lawson@gmail.com} (\href{https://orcid.org/0000-0002-5915-7980}{ORCID}) + +Other contributors: +\itemize{ + \item Ralf Weber [contributor] + \item Martin Jones [contributor] + \item Julien Saint-Vanne [contributor] + \item Andris Jankevics [contributor] + \item Mark Viant [thesis advisor] + \item Warwick Dunn [thesis advisor] +} + +} diff --git a/man/purityX.Rd b/man/purityX.Rd index 807cf08..8c2a584 100644 --- a/man/purityX.Rd +++ b/man/purityX.Rd @@ -69,13 +69,11 @@ Constructor for the purityX class. Given an XCMS object get the anticipated precursor purity of the grouped peaks } \examples{ -msPths <- list.files(system.file("extdata", "lcms", "mzML", - package="msPurityData"), full.names = TRUE, - pattern = "LCMS_") -xset <- xcms::xcmsSet(msPths) -xset <- xcms::group(xset) -xset <- xcms::retcor(xset) -xset <- xcms::group(xset) -ppLCMS <- purityX(xset, cores = 1, xgroups = c(1, 2)) + +msPths <- list.files(system.file("extdata", "lcms", "mzML", package="msPurityData"), full.names = TRUE, pattern = "LCMS_") +xset <- readRDS(system.file("extdata", "tests", "xcms", "ms_only_xset_OLD.rds", package="msPurity")) +xset@filepaths[1] <- msPths[basename(msPths)=="LCMS_1.mzML"] +xset@filepaths[2] <- msPths[basename(msPths)=="LCMS_2.mzML"] +px <- purityX(xset, singleFile = 1) } From 30057fab493b1d3dc3fbc03965ffd437ba077882 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:03:31 +0100 Subject: [PATCH 02/12] update version for CI/CD --- .github/workflows/check-bioc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 37475e7..c1cdc3a 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'latest', bioc: '3.17', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } - - { os: macOS-latest, r: 'latest', bioc: '3.17'} - - { os: windows-latest, r: 'latest', bioc: '3.17'} + - { os: ubuntu-latest, r: 'latest', bioc: '3.2', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } + - { os: macOS-latest, r: 'latest', bioc: '3.2'} + - { os: windows-latest, r: 'latest', bioc: '3.2'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: From 064e5e15c06180d641b80404997dc3b794ef77cf Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:08:09 +0100 Subject: [PATCH 03/12] update version for CI/CD --- .github/workflows/check-bioc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index c1cdc3a..bc53963 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'latest', bioc: '3.2', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } - - { os: macOS-latest, r: 'latest', bioc: '3.2'} - - { os: windows-latest, r: 'latest', bioc: '3.2'} + - { os: ubuntu-latest, r: 'latest', bioc: '3.19', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } + - { os: macOS-latest, r: 'latest', bioc: '3.19'} + - { os: windows-latest, r: 'latest', bioc: '3.19'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: From 34505ca37e59d4544944b712a09317ed6ee20476 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:14:29 +0100 Subject: [PATCH 04/12] update version for CI/CD --- .github/workflows/check-bioc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index bc53963..7554d8b 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'latest', bioc: '3.19', cont: "bioconductor/bioconductor_docker:latest", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } - - { os: macOS-latest, r: 'latest', bioc: '3.19'} - - { os: windows-latest, r: 'latest', bioc: '3.19'} + - { os: ubuntu-latest, r: 'devel', bioc: '3.19', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } + - { os: macOS-latest, r: 'devel', bioc: '3.19'} + - { os: windows-latest, r: 'devel', bioc: '3.19'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: From 9ed57fb3fa5ad426369eaa3be2943c672f488344 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:20:08 +0100 Subject: [PATCH 05/12] update version for CI/CD --- .github/workflows/check-bioc.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 7554d8b..96919a4 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -138,9 +138,6 @@ jobs: ## For textshaping, required by ragg, and required by pkgdown brew install harfbuzz fribidi - ## For installing usethis's dependency gert - brew install libgit2 - ## required for ncdf4 ## brew install netcdf ## Does not work as it is compiled with gcc ## Use pre-compiled libraries from https://mac.r-project.org/libs-4/ From d8d30b9d5c871dada773c58de93513ece24c940d Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:23:06 +0100 Subject: [PATCH 06/12] CI/CD update --- .github/workflows/check-bioc.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 96919a4..8b77d12 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -136,7 +136,11 @@ jobs: brew install imagemagick@6 ## For textshaping, required by ragg, and required by pkgdown - brew install harfbuzz fribidi + brew install harfbuzz + brew install fribidi + + ## For installing usethis's dependency gert + brew install libgit2 ## required for ncdf4 ## brew install netcdf ## Does not work as it is compiled with gcc From fb49be74ec2b6f59657dc4075fa505dc4a917d3f Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:25:18 +0100 Subject: [PATCH 07/12] CI/CD update --- .github/workflows/check-bioc.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 8b77d12..a543e34 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -135,12 +135,7 @@ jobs: ## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2 brew install imagemagick@6 - ## For textshaping, required by ragg, and required by pkgdown - brew install harfbuzz - brew install fribidi - ## For installing usethis's dependency gert - brew install libgit2 ## required for ncdf4 ## brew install netcdf ## Does not work as it is compiled with gcc From 459914def6a9f2a82fe2293a41c34e294649a8d6 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:30:30 +0100 Subject: [PATCH 08/12] CI/CD update --- .github/workflows/check-bioc.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index a543e34..569818a 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -135,7 +135,14 @@ jobs: ## https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2 brew install imagemagick@6 + ## For textshaping, required by ragg, and required by pkgdown + brew install harfbuzz fribidi + ## For installing usethis's dependency gert + brew install libgit2 + + ## Required for tcltk + brew install xquartz --cask ## required for ncdf4 ## brew install netcdf ## Does not work as it is compiled with gcc From 5a65c7d58029b2408b9c386bafee7b92bfd584ae Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:34:50 +0100 Subject: [PATCH 09/12] macOS CI/CD not currently working --- .github/workflows/check-bioc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 569818a..ddf221d 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -53,7 +53,7 @@ jobs: matrix: config: - { os: ubuntu-latest, r: 'devel', bioc: '3.19', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } - - { os: macOS-latest, r: 'devel', bioc: '3.19'} + # - { os: macOS-latest, r: 'devel', bioc: '3.19'} - { os: windows-latest, r: 'devel', bioc: '3.19'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent From 463cb34e38ad5aea44929a9a081b4ceffb9f206c Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 14:57:10 +0100 Subject: [PATCH 10/12] macOS CI/CD not currently working --- .github/workflows/check-bioc.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index ddf221d..2d42122 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -195,10 +195,21 @@ jobs: BiocManager::repositories() ) else BiocManager::repositories() - # install suggested packages - BiocManager::install(c("MSnbase", "xcms", "BiocStyle", "msPurityData", "CAMERA")) + # Workaround for problems with cached S4objects in binary packages + BiocManager::install("GenomeInfoDb", force = TRUE, type = "source") + BiocManager::install("BiocParallel", force = TRUE, type = "source") + BiocManager::install("S4Vectors", force = TRUE, type = "source") + BiocManager::install("SummarizedExperiment", force = TRUE, type = "source") + ## install xcms with dependencies - to ensure dependencies are installed from source; + ## somehow install_local installs binary packages instead. + BiocManager::install("mzR", force = TRUE) + BiocManager::install("MSnbase", force = TRUE, type = "source") + BiocManager::install("xcms", force = TRUE, type = "source", dependencies = TRUE) + + BiocManager::install(c("BiocStyle", "msPurityData", "CAMERA")) install.packages(c("rmarkdown", "RPostgres", "RMySQL")) + ## For running the checks message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****')) install.packages(c("rcmdcheck", "BiocCheck"), repos = gha_repos) From 384ef8211318c679a4b0ffbdf7da5d67c5444b38 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 16:08:26 +0100 Subject: [PATCH 11/12] CI/CD fix --- .github/workflows/check-bioc.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index 2d42122..c919d36 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'devel', bioc: '3.19', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } - # - { os: macOS-latest, r: 'devel', bioc: '3.19'} - - { os: windows-latest, r: 'devel', bioc: '3.19'} + - { os: ubuntu-latest, r: 'release', bioc: '3.19'} + # - { os: macOS-latest, r: 'devel', bioc: '3.20'} + - { os: windows-latest, r: 'release', bioc: '3.19'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: From c1f1f22d60cdd50a05941e04995693750f492fb0 Mon Sep 17 00:00:00 2001 From: Thomas Lawson Date: Thu, 9 May 2024 16:26:09 +0100 Subject: [PATCH 12/12] CI/CD fix --- .github/workflows/check-bioc.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-bioc.yml b/.github/workflows/check-bioc.yml index c919d36..7cfe6a8 100644 --- a/.github/workflows/check-bioc.yml +++ b/.github/workflows/check-bioc.yml @@ -52,9 +52,9 @@ jobs: fail-fast: false matrix: config: - - { os: ubuntu-latest, r: 'release', bioc: '3.19'} - # - { os: macOS-latest, r: 'devel', bioc: '3.20'} - - { os: windows-latest, r: 'release', bioc: '3.19'} + - { os: ubuntu-latest, r: 'devel', bioc: 'devel', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } + #- { os: macOS-latest, r: 'next', bioc: '3.19'} + - { os: windows-latest, r: 'next', bioc: '3.19'} ## Check https://github.com/r-lib/actions/tree/master/examples ## for examples using the http-user-agent env: @@ -191,7 +191,7 @@ jobs: gha_repos <- if( .Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin" ) c( - "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.17/bioc", + "AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.19/bioc", BiocManager::repositories() ) else BiocManager::repositories() @@ -205,8 +205,9 @@ jobs: BiocManager::install("mzR", force = TRUE) BiocManager::install("MSnbase", force = TRUE, type = "source") BiocManager::install("xcms", force = TRUE, type = "source", dependencies = TRUE) - - BiocManager::install(c("BiocStyle", "msPurityData", "CAMERA")) + BiocManager::install("msPurityData", force = TRUE, type = "source", dependencies = TRUE) + BiocManager::install("CAMERA", force = TRUE, type = "source", dependencies = TRUE) + BiocManager::install(c("BiocStyle")) install.packages(c("rmarkdown", "RPostgres", "RMySQL"))