Skip to content

Commit

Permalink
Merge pull request #10 from rformassspectrometry/jomain
Browse files Browse the repository at this point in the history
Functionality to convert between R and Python
  • Loading branch information
jorainer authored Mar 10, 2022
2 parents aae3fb9 + fe1d9ce commit 142fcc3
Show file tree
Hide file tree
Showing 14 changed files with 621 additions and 177 deletions.
1 change: 1 addition & 0 deletions .BBSoptions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UnsupportedPlatforms: win32
9 changes: 9 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.editorconfig
README.md
local_data/*

^.*\.Rproj$
^\.Rproj\.user$
.travis.yml
^\.github$
_pkgdown.yml
34 changes: 21 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Package: SpectriPy
Title: Enabling use of Python matchms, Spec2Vec and MS2DeepScore in R
Version: 0.0.1
Description:
What the package does (one paragraph).
Title: Integrating Spectra with Python's matchms
Version: 0.0.2
Authors@R:
c(person(given = "Michael", family = "Witting",
role = c("aut"),
Expand All @@ -20,22 +18,32 @@ Authors@R:
email = "",
role = c("aut"),
comment = c(ORCID = "")))
Description: The SpectriPy package allows to integrate Python-based MS analysis
code with the Spectra package. Spectra objects can be converted into python
objects.
Depends:
R (>= 4.0.0)
R (>= 4.1.0)
Imports:
BiocGenerics,
Spectra (>= 1.5.7),
reticulate
Spectra,
basilisk,
reticulate,
IRanges,
S4Vectors,
BiocParallel,
methods
Suggests:
testthat,
knitr,
msdata,
BiocStyle,
rmarkdown
rmarkdown,
patrick
License: Artistic-2.0
VignetteBuilder: knitr
BugReports: https://github.com/RforMassSpectrometry/MetaboAnnotation/issues
URL: https://github.com/RforMassSpectrometry/MetaboAnnotation
BugReports: https://github.com/RforMassSpectrometry/SpectriPy/issues
URL: https://github.com/RforMassSpectrometry/SpectriPy
biocViews: Infrastructure, Metabolomics, MassSpectrometry
Roxygen: list(markdown=TRUE)
Encoding: UTF-8
StagedInstall: no
SystemRequirements: python (>= 3.5)
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
23 changes: 20 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Generated by roxygen2: do not edit by hand

export(convertPySpectrumToRSpectra)
export(convertRSpectraToPySpectrum)
importMethodsFrom(reticulate,import)
export(pyspec_to_rspec)
export(rspec_to_pyspec)
exportMethods(spectraVariableMapping)
importFrom(BiocParallel,SerialParam)
importFrom(BiocParallel,bplapply)
importFrom(IRanges,NumericList)
importFrom(S4Vectors,DataFrame)
importFrom(Spectra,concatenateSpectra)
importFrom(basilisk,BasiliskEnvironment)
importFrom(methods,is)
importFrom(reticulate,import)
importFrom(reticulate,np_array)
importFrom(reticulate,py_to_r)
importFrom(reticulate,r_to_py)
importMethodsFrom(Spectra,Spectra)
importMethodsFrom(Spectra,intensity)
importMethodsFrom(Spectra,mz)
importMethodsFrom(Spectra,spectraData)
importMethodsFrom(Spectra,spectraVariableMapping)
importMethodsFrom(Spectra,spectrapply)
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SpectriPy 0.0

## Changes in 0.0.2

- Add `basilisk` environment.
- Add `spectraVariableMapping`.
- Refactor functions to convert between R and python spectrum objects and add
unit tests.
6 changes: 6 additions & 0 deletions R/basilisk.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#' @importFrom basilisk BasiliskEnvironment
matchms_env <- basilisk::BasiliskEnvironment(
envname = "matchms_env", pkgname = "SpectriPy",
packages = c("matchms==0.14.0"),
channels = c("bioconda", "conda-forge")
)
Loading

0 comments on commit 142fcc3

Please sign in to comment.