Skip to content

Commit

Permalink
Merge branch 'devel' into phili
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Apr 12, 2024
2 parents 04b0fac + 9bb7bd5 commit 0552e2b
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 215 deletions.
45 changes: 24 additions & 21 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ jobs:
matrix:
config:
- { 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: 'devel', bioc: '3.19'}
- { os: windows-latest, r: 'devel', bioc: '3.19'}
- { os: macOS-latest, r: 'next', bioc: '3.19'}
- { os: windows-latest, r: 'next', bioc: '3.19'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
Expand Down Expand Up @@ -160,12 +160,12 @@ jobs:
- name: Install BiocManager
run: |
message(paste('****', Sys.time(), 'installing BiocManager ****'))
remotes::install_cran("BiocManager")
remotes::install_cran("BiocManager", type = "source")
shell: Rscript {0}

- name: Set BiocVersion
run: |
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE)
BiocManager::install(version = "${{ matrix.config.bioc }}", ask = FALSE, type = "source")
shell: Rscript {0}

- name: Install dependencies pass 1
Expand All @@ -177,45 +177,48 @@ jobs:
## https://github.com/r-lib/remotes/issues/296
## Ideally, all dependencies should get installed in the first pass.
## 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("faahKO", type = "source")
## Pass #1 at installing dependencies
BiocManager::install(c("ncdf4", "mzR"))
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies: local dependencies ****'))
remotes::install_local(dependencies = TRUE, repos =
BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE)
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, build_manual = FALSE, type = "source")
BiocManager::install(c("rmarkdown", "BiocStyle"))
BiocManager::install(c("rmarkdown", "BiocStyle"), type = "source")
continue-on-error: true
shell: Rscript {0}

- name: Install dependencies pass 2
run: |
## Pass #2 at installing dependencies
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies: any remaining dependencies ****'))
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE)
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, type = "source")
## Manually install packages that seem to be skipped.
message(paste('****', Sys.time(), 'force installation of selected packages ****'))
BiocManager::install(c("faahKO"))
BiocManager::install("ProtGenerics")
BiocManager::install("MSnbase")
BiocManager::install("mzR", type = "source", force = TRUE)
BiocManager::install("Spectra")
BiocManager::install("MsBackendMgf")
BiocManager::install("MetaboCoreUtils")
BiocManager::install("magick")
BiocManager::install("RforMassSpectrometry/MsExperiment")
BiocManager::install("RforMassSpectrometry/MsCoreUtils", force = TRUE)
BiocManager::install("magick", type = "source")
## For running the checks
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
remotes::install_cran("rcmdcheck")
BiocManager::install(c("BiocCheck", "DBI"))
remotes::install_cran("rcmdcheck", type = "source")
BiocManager::install("BiocCheck", type = "source")
shell: Rscript {0}

- name: Install BiocGenerics
if: env.has_RUnit == 'true'
run: |
## Install BiocGenerics
BiocManager::install("BiocGenerics")
BiocManager::install("BiocGenerics", type = "source")
shell: Rscript {0}

- name: Install covr
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Authors@R: c(
role = "ctb",
comment = c(ORCID = "0000-0002-5492-6904")),
person(given = "Carl", family = "Brunius",
email = "[email protected]",
role = "ctb",
email = "[email protected]",
role = "ctb",
comment = c(ORCID = "0000-0003-3957-870X"))
)
Depends:
Expand Down Expand Up @@ -105,11 +105,11 @@ Collate:
'MsExperiment-functions.R'
'MsExperiment.R'
'MzTabParam.R'
'XcmsExperiment.R'
'PlainTextParam.R'
'RDataParam.R'
'XcmsExperiment-functions.R'
'XcmsExperiment-plotting.R'
'XcmsExperiment.R'
'c.R'
'cwTools.R'
'databases.R'
Expand Down
2 changes: 2 additions & 0 deletions R/PlainTextParam.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#' @include XcmsExperiment.R

#' @title Store contents of `MsExperiment` and `XcmsExperiment` objects as
#' plain text files
#'
Expand Down
3 changes: 2 additions & 1 deletion R/methods-Params.R
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,8 @@ setMethod("plot", signature(x = "LamaParama"),
zero_weight = x@zeroWeight,
bs = x@bs)
datap <- x@rtMap[[index]]
plot(datap, type = "p", xlab = xlab, ylab = ylab, col = colPoints, ...)
plot(datap[, 2L], datap[, 1L], type = "p", xlab = xlab, ylab = ylab,
col = colPoints, ...)
points(model, type = "l", col = colFit)
})

Expand Down
92 changes: 46 additions & 46 deletions man/XcmsExperiment.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 4 additions & 10 deletions tests/testthat.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ library(xcms)
library(faahKO)
library(MSnbase)
library(msdata)
library(BiocParallel)
prm <- SerialParam()

if (.Platform$OS.type == "unix") {
prm <- MulticoreParam(3)
} else {
# prm <- SnowParam(3)
prm <- SerialParam()
}
register(bpstart(prm))
register(SerialParam())

## Create some objects we can re-use in different tests:
faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),
Expand All @@ -19,7 +15,7 @@ faahko_3_files <- c(system.file('cdf/KO/ko15.CDF', package = "faahKO"),

cwp <- CentWaveParam(noise = 10000, snthresh = 40, prefilter = c(3, 10000))
faahko_od <- readMSData(faahko_3_files, mode = "onDisk")
faahko_xod <- findChromPeaks(faahko_od, param = cwp)
faahko_xod <- findChromPeaks(faahko_od, param = cwp, BPPARAM = SerialParam())
od_x <- faahko_od
mzr <- matrix(c(335, 335, 344, 344), ncol = 2, byrow = TRUE)
od_chrs <- chromatogram(od_x, mz = mzr)
Expand Down Expand Up @@ -85,5 +81,3 @@ ref_mz_rt <- featureDefinitions(ref)[, c("mzmed","rtmed")]
tst <- loadXcmsData("faahko_sub2")

test_check("xcms")

bpstop(prm)
Loading

0 comments on commit 0552e2b

Please sign in to comment.