Skip to content

Commit ea3f776

Browse files
authored
Merge pull request #757 from sneumann/jomain
refactor: dump all data export functionality from xcms
2 parents 88bdd81 + 703c7f6 commit ea3f776

15 files changed

+69
-678
lines changed

DESCRIPTION

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: xcms
2-
Version: 4.3.1
2+
Version: 4.3.2
33
Title: LC-MS and GC-MS Data Analysis
44
Description: Framework for processing and visualization of chromatographically
55
separated and single-spectra mass spectral data. Imports from AIA/ANDI NetCDF,
@@ -65,7 +65,6 @@ Imports:
6565
MsExperiment (>= 1.5.4),
6666
Spectra (>= 1.13.7),
6767
progress,
68-
jsonlite,
6968
RColorBrewer,
7069
MetaboCoreUtils (>= 1.11.2)
7170
Suggests:
@@ -93,7 +92,7 @@ URL: https://github.com/sneumann/xcms
9392
BugReports: https://github.com/sneumann/xcms/issues/new
9493
VignetteBuilder: knitr
9594
biocViews: ImmunoOncology, MassSpectrometry, Metabolomics
96-
RoxygenNote: 7.3.1
95+
RoxygenNote: 7.3.2
9796
Encoding: UTF-8
9897
Collate:
9998
'AllGenerics.R'
@@ -104,11 +103,9 @@ Collate:
104103
'MPI.R'
105104
'MsExperiment-functions.R'
106105
'MsExperiment.R'
107-
'XcmsExperiment.R'
108-
'PlainTextParam.R'
109-
'RDataParam.R'
110106
'XcmsExperiment-functions.R'
111107
'XcmsExperiment-plotting.R'
108+
'XcmsExperiment.R'
112109
'c.R'
113110
'cwTools.R'
114111
'databases.R'

NAMESPACE

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ importMethodsFrom("MSnbase", "intensity", "mz", "rtime", "fileNames", "fromFile"
7272
importFrom("MSnbase", "as.data.frame.Spectrum", "Chromatogram",
7373
"MChromatograms", "MSpectra", "requiredFvarLabels", "selectFeatureData")
7474

75+
7576
export(
7677
"etg",
7778
"medianFilter",
@@ -254,7 +255,8 @@ export(
254255
"loadXcmsData",
255256
"matchLamasChromPeaks",
256257
"summarizeLamaMatch",
257-
"matchedRtimes"
258+
"matchedRtimes",
259+
"XcmsExperiment"
258260
)
259261

260262
## New analysis methods
@@ -566,7 +568,7 @@ importMethodsFrom("Spectra", "precursorMz")
566568
importMethodsFrom("Spectra", "$")
567569
importMethodsFrom("Spectra", "uniqueMsLevels")
568570
importMethodsFrom("Spectra", "backendBpparam")
569-
importFrom("Spectra", "MsBackendMemory")
571+
importFrom("Spectra", "MsBackendMemory", "filterEmptySpectra")
570572

571573
## MsExperiment things
572574
importClassesFrom("MsExperiment", "MsExperiment")
@@ -590,13 +592,6 @@ exportMethods("filterMzRange")
590592
exportMethods("fromFile")
591593
exportMethods("fileNames")
592594

593-
## saving xcms objects things
594-
importFrom("jsonlite", "serializeJSON", "write_json", "unserializeJSON",
595-
"read_json")
596-
export("RDataParam")
597-
export("PlainTextParam")
598-
exportMethods("storeResults")
599-
600595
## filtering features things
601596
importFrom("MetaboCoreUtils", "rowRsd", "rowDratio", "rowPercentMissing",
602597
"rowBlank", "mclosest")

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# xcms 4.3
22

3+
## Changes in version 4.3.2
4+
5+
- Remove data/results import/export functionality as it is being developed in
6+
the *MsIO* package.
7+
38
## Changes in version 4.3.1
49

510
- Support excluding samples or sample groups from defining features with

R/AllGenerics.R

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2051,61 +2051,6 @@ setGeneric("stitch.xml", function(object, lockMass) standardGeneric("stitch.xml"
20512051
setGeneric("stitch.netCDF", function(object, lockMass) standardGeneric("stitch.netCDF"))
20522052
setGeneric("stitch.netCDF.new", function(object, lockMass) standardGeneric("stitch.netCDF.new"))
20532053

2054-
#' @title Save xcms result objects in a specified format
2055-
#'
2056-
#' @description
2057-
#'
2058-
#' The `storeResults` function saves an `object` resulting from processing with
2059-
#' the `xcms` package (mainly `XcmsExperiment`). Multiple formats for storing
2060-
#' and exporting are available and can be defined by the `param` argument.
2061-
#'
2062-
#' Supported `param` objects are:
2063-
#'
2064-
#' - [`RDataParam`]: Save in an .RData format file. The name of the file can be
2065-
#' specified in the `fileName` argument.
2066-
#'
2067-
#' - [`PlainTextParam`]: Store `MsExperiment` and `XcmsExperiment` objects as a
2068-
#' folder of plain text files, folder path defined in the `path` argument.
2069-
#'
2070-
#' - `MzTabMParam`: Save in MzTab format (to be defined).
2071-
#'
2072-
#' For specific examples, see the help pages of the individual parameter classes
2073-
#' listed above.
2074-
#'
2075-
#' @param object `MsExperiment` or `XcmsExperiment` The data object that needs
2076-
#' to be saved.
2077-
#'
2078-
#' @param param The parameter object selecting and configuring the format for
2079-
#' saving. It can be one of the following classes: [`RDataParam`],
2080-
#' [`PlainTextParam`], or `MzTabMParam`.
2081-
#'
2082-
#' @param ... Optional parameters.
2083-
#'
2084-
#' @name storeResults
2085-
#'
2086-
#' @author Philippine Louail
2087-
#'
2088-
#' @examples
2089-
#'
2090-
#' ## Load a test data set with detected peaks
2091-
#' library(xcms)
2092-
#' library(MsExperiment)
2093-
#' faahko_sub <- loadXcmsData("faahko_sub2")
2094-
#'
2095-
#' ## Set up parameter to save as .RData file
2096-
#' param <- RDataParam(fileName = "example_xcms_results")
2097-
#'
2098-
#' ## save as .RData
2099-
#' storeResults(object = faahko_sub, param = param)
2100-
#'
2101-
#' ## Set up parameter to save as a collection of plain text file
2102-
#' param <- PlainTextParam(path = "test/path/")
2103-
#'
2104-
#' ## Save as a collection of plain text files
2105-
#' storeResults(object = faahko_sub, param = param)
2106-
#'
2107-
#' @md
2108-
setGeneric("storeResults", function(object, param, ...) standardGeneric("storeResults"))
21092054
setGeneric("subset<-", function(object, value) standardGeneric("subset<-"))
21102055
setGeneric("subsetAdjust", function(object, ...) standardGeneric("subsetAdjust"))
21112056
setGeneric("subsetAdjust<-", function(object, value) standardGeneric("subsetAdjust<-"))

R/PlainTextParam.R

Lines changed: 0 additions & 226 deletions
This file was deleted.

0 commit comments

Comments
 (0)