Skip to content

Commit

Permalink
Merge pull request #50 from rformassspectrometry/without_basilisk
Browse files Browse the repository at this point in the history
Clean and finalize removal of the basilisk dependencies
  • Loading branch information
jorainer authored Feb 25, 2025
2 parents 567ca48 + 468819d commit 8b30d92
Show file tree
Hide file tree
Showing 29 changed files with 7,459 additions and 1,595 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ _pkgdown.yml
.BBSoptions
^\.vscode
devnotes.md
temp_doc/*
36 changes: 26 additions & 10 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: '4.4', bioc: '3.20', cont: "bioconductor/bioconductor_docker:RELEASE_3_20", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: macOS-latest, r: '4.4', bioc: '3.20'}
- { os: windows-latest, r: '4.4', bioc: '3.20'}
- { os: ubuntu-latest, r: 'devel', bioc: '3.21', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: macOS-latest, r: 'devel', bioc: '3.21'}
- { os: windows-latest, r: 'devel', bioc: '3.21'}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
Expand All @@ -77,7 +77,7 @@ jobs:
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
## If they update their steps, we will also need to update ours.
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4

## R is already included in the Bioconductor docker images
- name: Setup R from r-lib
Expand All @@ -86,17 +86,35 @@ jobs:
with:
r-version: ${{ matrix.config.r }}

## Install R dependencies using R-lib
- name: Setup R dependencies from r-lib
if: runner.os != 'Linux'
uses: r-lib/actions/setup-r-dependencies@v2

## pandoc is already included in the Bioconductor docker images
- name: Setup pandoc from r-lib
if: runner.os != 'Linux'
uses: r-lib/actions/setup-pandoc@v2

- name: Install quarto
if: runner.os != 'Linux'
uses: quarto-dev/quarto-actions/setup@v2

- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}

- name: Install Miniconda
run: |
Rscript -e "install.packages('reticulate')"
Rscript -e "reticulate::install_miniconda()"
- name: Fix conda for macOS
if: runner.os == 'macOS'
run: echo "options(reticulate.conda_binary = reticulate:::miniconda_conda())" >> .Rprofile

- name: Cache R packages
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'"
uses: actions/cache@v2
Expand Down Expand Up @@ -137,9 +155,6 @@ jobs:
## For installing usethis's dependency gert
brew install libgit2
## Python
brew install [email protected]
- name: Install Windows system dependencies
if: runner.os == 'Windows'
run: |
Expand Down Expand Up @@ -179,8 +194,9 @@ jobs:
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = FALSE, upgrade = TRUE)
message(paste('****', Sys.time(), 'force installation of selected packages ****'))
BiocManager::install(c("BiocStyle", "rmarkdown", "magick"))
BiocManager::install(c("BiocStyle"))
BiocManager::install("mzR")
BiocManager::install("Spectra")
## For running the checks
message(paste('****', Sys.time(), 'installing rcmdcheck and BiocCheck ****'))
Expand Down Expand Up @@ -219,7 +235,7 @@ jobs:
_R_CHECK_CRAN_INCOMING_: false
run: |
rcmdcheck::rcmdcheck(
args = c("--no-build-vignettes", "--no-manual", "--timings"),
args = c("--no-manual", "--timings"),
build_args = c("--no-manual", "--no-resave-data"),
error_on = "warning",
check_dir = "check"
Expand Down Expand Up @@ -276,4 +292,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-biocversion-devel-r-devel-results
path: check
path: check
43 changes: 25 additions & 18 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Package: SpectriPy
Title: Integrating Spectra with Python's matchms
Version: 0.2.1
Version: 0.3.1
Description: The SpectriPy package allows integration of Python-based MS
analysis code with the Spectra package. Spectra objects can be converted
into Python's matchms Spectrum objects. In addition, SpectriPy integrates
and wraps the similarity scoring and processing/filtering functions
and wraps the similarity scoring and processing/filtering functions
from the matchms package into R.
Authors@R: c(person(given = "Michael", family = "Witting",
role = c("aut"),
Expand All @@ -20,47 +20,54 @@ Authors@R: c(person(given = "Michael", family = "Witting",
comment = c(ORCID = "0000-0002-9355-8948")),
person(given = "Helge", family = "Hecht",
email = "[email protected]",
role = c("aut"),
role = c("ctb"),
comment = c(ORCID = "0000-0001-6744-996X")),
person(given = "Marilyn", family = "De Graeve",
email = "[email protected]",
role = c("ctb"),
role = c("aut"),
comment = c(ORCID = "0000-0001-6916-401X")),
person(given = "Thomas", family = "Naake",
person(given = "Wout", family = "Bittremieux",
email = "[email protected]",
role = c("aut"),
comment = c(ORCID = "0000-0002-3105-1359")),
person(given = "Thomas", family = "Naake",
email = "[email protected]",
role = c("ctb"),
role = c("aut"),
comment = c(ORCID = "0000-0001-7917-5580")),
person(given = "Victor", family = "Chrone",
email = "[email protected]",
role = c("ctb"),
comment = c(ORCID = "0009-0007-2121-4066")),
person(given = "Matthias", family = "Anagho-Mattanovich",
person(given = "Matthias", family = "Anagho-Mattanovich",
email = "[email protected]",
role = c("ctb"),
comment = c(ORCID = "0000-0001-7561-7898")))
comment = c(ORCID = "0000-0001-7561-7898"))
)
Depends:
R (>= 4.1.0)
R (>= 4.1.0),
reticulate
Imports:
Spectra (>= 1.5.8),
basilisk,
reticulate,
IRanges,
S4Vectors,
BiocParallel,
ProtGenerics,
MsCoreUtils,
methods
Suggests:
testthat,
quarto,
MsBackendMgf,
msdata,
mzR,
knitr,
BiocStyle,
rmarkdown
BiocStyle
License: Artistic-2.0
VignetteBuilder: knitr
BugReports: https://github.com/RforMassSpectrometry/SpectriPy/issues
URL: https://github.com/RforMassSpectrometry/SpectriPy
biocViews: Infrastructure, Metabolomics, MassSpectrometry
Encoding: UTF-8
StagedInstall: no
SystemRequirements: python (>= 3.9)
SystemRequirements:
python (>= 3.10),
pandoc
VignetteBuilder: quarto
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
34 changes: 22 additions & 12 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
# Generated by roxygen2: do not edit by hand

export(CosineGreedyParam)
export(CosineHungarianParam)
export(ModifiedCosineParam)
export(NeutralLossesCosineParam)
S3method(r_to_py,Spectra)
export(CosineGreedy)
export(CosineHungarian)
export(ModifiedCosine)
export(NeutralLossesCosine)
export(compareSpectriPy)
export(defaultSpectraVariableMapping)
export(filterSpectriPy)
export(normalize_intensities)
export(pyspec_to_rspec)
export(remove_peaks_around_precursor_mz)
export(rspec_to_pyspec)
export(select_by_intensity)
export(select_by_mz)
export(setSpectraVariableMapping)
exportMethods(compareSpectriPy)
exportMethods(filterSpectriPy)
exportMethods(spectraVariableMapping)
importClassesFrom(ProtGenerics,Param)
importFrom(BiocParallel,SerialParam)
importFrom(BiocParallel,bplapply)
importFrom(IRanges,NumericList)
importFrom(MsCoreUtils,rbindFill)
importFrom(S4Vectors,DataFrame)
importFrom(Spectra,concatenateSpectra)
importFrom(basilisk,BasiliskEnvironment)
importFrom(basilisk,basiliskRun)
importFrom(basilisk,basiliskStart)
importFrom(basilisk,basiliskStop)
importFrom(Spectra,MsBackendMemory)
importFrom(Spectra,spectrapply)
importFrom(methods,is)
importFrom(methods,new)
importFrom(reticulate,conda_create)
importFrom(reticulate,conda_list)
importFrom(reticulate,import)
importFrom(reticulate,iterate)
importFrom(reticulate,np_array)
importFrom(reticulate,py)
importFrom(reticulate,py_available)
importFrom(reticulate,py_dict)
importFrom(reticulate,py_install)
importFrom(reticulate,py_module_available)
importFrom(reticulate,py_run_string)
importFrom(reticulate,py_to_r)
importFrom(reticulate,r_to_py)
importFrom(reticulate,use_condaenv)
importFrom(reticulate,use_virtualenv)
importFrom(reticulate,virtualenv_create)
importFrom(reticulate,virtualenv_exists)
importFrom(reticulate,virtualenv_remove)
importMethodsFrom(Spectra,Spectra)
importMethodsFrom(Spectra,intensity)
importMethodsFrom(Spectra,mz)
Expand Down
17 changes: 16 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# SpectriPy 0.3

## Changes in 0.3.1

- Add `filterSpectriPy()` function for spectra filtering using *matchms*.
- Add a new example MGF file to the package.
- Add a new quarto vignette.

## Changes in 0.3.0

- Add changes and results introduced a the EuBIC 2024 r-python hackathon in
Neustift, Italy.
- Remove dependency from *basilisk* and base the package entirely on
*reticulate*.

# SpectriPy 0.2

## Changes in 0.2.1
Expand Down Expand Up @@ -29,4 +44,4 @@
- Add `basilisk` environment.
- Add `spectraVariableMapping`.
- Refactor functions to convert between R and python spectrum objects and add
unit tests.
unit tests.
6 changes: 0 additions & 6 deletions R/basilisk.R

This file was deleted.

Loading

0 comments on commit 8b30d92

Please sign in to comment.