Browse code

Merge branch 'master' of git.bioconductor.org:packages/mzR

Steffen Neumann authored on 17/05/2019 11:27:37
Showing 7 changed files

... ...
@@ -2,18 +2,18 @@ Package: mzR
2 2
 Type: Package
3 3
 Title: parser for netCDF, mzXML, mzData and mzML and mzIdentML files
4 4
        (mass spectrometry data)
5
-Version: 2.17.3
5
+Version: 2.19.1
6 6
 Author: Bernd Fischer, Steffen Neumann, Laurent Gatto, Qiang Kou, Johannes Rainer
7 7
 Maintainer: Steffen Neumann <sneumann@ipb-halle.de>,
8 8
 	    Laurent Gatto <lg390@cam.ac.uk>,
9 9
 	    Qiang Kou <qkou@umail.iu.edu>
10 10
 Description: mzR provides a unified API to the common file formats and
11
-        parsers available for mass spectrometry data. It comes with a
12
-        wrapper for the ISB random access parser for mass spectrometry
13
-        mzXML, mzData and mzML files. The package contains the
14
-        original code written by the ISB, and a subset of the
15
-        proteowizard library for mzML and mzIdentML. The netCDF
16
-        reading code has previously been used in XCMS.
11
+	parsers available for mass spectrometry data. It comes with a
12
+	wrapper for the ISB random access parser for mass spectrometry
13
+	mzXML, mzData and mzML files. The package contains the
14
+	original code written by the ISB, and a subset of the
15
+	proteowizard library for mzML and mzIdentML. The netCDF
16
+	reading code has previously been used in XCMS.
17 17
 License: Artistic-2.0
18 18
 LazyLoad: yes
19 19
 Depends: Rcpp (>= 0.10.1), methods, utils
... ...
@@ -26,5 +26,5 @@ SystemRequirements: C++11, GNU make
26 26
 URL: https://github.com/sneumann/mzR/
27 27
 BugReports: https://github.com/sneumann/mzR/issues/
28 28
 biocViews: ImmunoOncology, Infrastructure, DataImport, Proteomics, Metabolomics,
29
-        MassSpectrometry
29
+	MassSpectrometry
30 30
 RoxygenNote: 6.0.1
... ...
@@ -1,3 +1,12 @@
1
+CHANGES IN VERSION 2.19.1
2
+-------------------------
3
+ o Remove analyzer generics, now in ProtGenerics <2019-05-13 Mon>
4
+
5
+CHANGES IN VERSION 2.17.4
6
+-------------------------
7
+ o Update documentation, pointing to MSnbase rather than directly use
8
+   low-level classes. <2019-04-17 Wed>
9
+
1 10
 CHANGES IN VERSION 2.17.3
2 11
 -------------------------
3 12
  o Extract isolation window from mzML files (issue #193): data.frame returned
... ...
@@ -14,9 +23,9 @@ CHANGES IN VERSION 2.15.5
14 23
 
15 24
 CHANGES IN VERSION 2.15.4
16 25
 -------------------------
17
- o Use new dependency ncdf4 for netCDF reading, 
26
+ o Use new dependency ncdf4 for netCDF reading,
18 27
    removes a lot of build hassles with old libnetcdf-dev linking.
19
- o specParams returns a numeric scan.number.s. 
28
+ o specParams returns a numeric scan.number.s.
20 29
 
21 30
 CHANGES IN VERSION 2.15.3
22 31
 -------------------------
... ...
@@ -20,7 +20,6 @@ setGeneric("creationDate", function(object) standardGeneric("creationDate"))
20 20
 setGeneric("manufacturer", function(object) standardGeneric("manufacturer"))
21 21
 setGeneric("model", function(object) standardGeneric("model"))
22 22
 setGeneric("ionisation", function(object) standardGeneric("ionisation"))
23
-setGeneric("analyzer", function(object) standardGeneric("analyzer"))
24 23
 setGeneric("detector", function(object) standardGeneric("detector"))
25 24
 setGeneric("isInitialized", function(object) standardGeneric("isInitialized"))
26 25
 setGeneric("initializeRamp",
... ...
@@ -45,3 +44,4 @@ setGeneric("isolationWindow",
45 44
 ## setGeneric("peaks", function(object, ...) standardGeneric("peaks"))
46 45
 ## setGeneric("database", function(object, ...) standardGeneric("database"))
47 46
 ## setGeneric("modifications", function(object, ...) standardGeneric("modifications"))
47
+## setGeneric("analyzer", function(object) standardGeneric("analyzer"))
48 48
deleted file mode 100644
... ...
@@ -1,170 +0,0 @@
1
-Hi,
2
-
3
-after beeing busy in the past weeks, we have now 
4
-overhauled most of the package. To me the most important 
5
-change is the possibility to have multiple backends, 
6
-such as netCDF, Ramp and pwiz to do the actual I/O work.
7
-
8
-We also have a patch for XCMS to do the I/O work 
9
-through mzR, and Laurent also has patches to msnbase 
10
-to switch to mzR. Both will be applied to BioC SVN
11
-if we have a few weeks of debugging before the release.
12
-
13
-Could you guys please add the Roundup user "lgatto" 
14
-to the nosy list of this issue ? Thanks in advance.
15
-
16
-Yours,
17
-Steffen
18
-
19
-On Mon, 2011-03-07 at 22:27 +0000, herve BioC-Submit wrote:
20
-herve <hpages@fhcrc.org> added the comment:
21
-...
22
-> Detailed review:
23
-> 
24
-> 1. Please use a BioC-style version number i.e. x.y.z
25
->    Note that if you use 0.99.z now, your package will be released as 1.0.0
26
->    in BioC 2.8 (to be released in April).
27
-Done.
28
- 
29
-> 2. The source tarball you provided is not clean: it contains a lot of object
30
->    files (i.e. *.o files) in src/boost and src/pwiz. A source
31
-I've added an mzR/cleanup file
32
-
33
-> 3. Please add a biocViews field to your DESCRIPTION file.
34
-Done. Taken from xcms and affyIO
35
-
36
-> 4. It doesn't make sense to have 2 SystemRequirements fields. Please merge
37
->    them.
38
-Done. Copy&Paste error :-(
39
- 
40
-> 5. Please put the Rcpp package in the Imports field of the DESCRIPTION
41
->    file. In your NAMESPACE file you import things from Rcpp so you
42
->    definitely want to reflect this in the Imports field. Keeping
43
-Done. 
44
-
45
->    in the Depends field is up to you but it could be that you don't need
46
->    this. (Do you want Rcpp to end up in the search path of the user when
47
->    s/he does library(mzR)? Are there symbols or man pages defined in Rcpp
48
->    that the end-user of the mzR package might need to access directly?)
49
-I have placed Rcpp in the dependency (v 0.5.0) and removed import(Rcpp)
50
-from the NAMESPACE file, to supress a warning about missing '"C++Object"
51
-unavailable and created in local env' when loading the package.
52
- 
53
-> 6. msdata needs to be put in the Suggests field: it's used in the vignette
54
->    and the unit tests.
55
-Done.
56
- 
57
-> 7. Same thing for RUnit and faahKO: they are used in the unit tests.
58
-Done.
59
- 
60
-> 8. Why call those files AllClass.R and rampMethods.R if the former
61
->  doesn't
62
-All of that was more/less rewritten by Laurent, 
63
-I guess it'll be cleaner now.
64
-
65
-> 9. In man/Ramp-class.Rd:
66
-> 
67
->      Objects can be created by calls of the form \code{new(Ramp)}
68
-> 
69
->    Will the user really create object like this? If yes, then please provide
70
->    an example on the \examples{} section of the man page.
71
-There is now a proper constructor (openMSfile, see below) that will read 
72
-an mass spec file, initialise the Rcpp module and return a proper S4 class.
73
- 
74
-> 10. The rampOpenFile() function itself (which is more likely to be *the* way
75
->     people will create Ramp objects) is not documented. In particular, the
76
->     documentation is not saying what the supported formats are (only
77
->     mzXML is used in the example and vignette).
78
-Done. rampOpenFile() is now called openMSfile() and documented 
79
-with its own manpage.
80
- 
81
-> 11. Overall the documentation is insufficient: there are only 2 small man
82
->     pages and none of them contains *real* examples. Note that man pages
83
->     should contain an \examples{} section, not an \section{Example}{} section
84
->     like you did in man/Ramp-class.Rd, so they are evaluated by 'R CMD check'.
85
->     The list of C++-style methods provided in man/Ramp-class.Rd gives very
86
->     little details about what those methods do exactly and it uses some
87
->     technical jargon that probably only experts in the field will understand:
88
-> 
89
->       "suppress RAMP's behavior of creating sparse tables to accomodate
90
->        unlisted scans"
91
-> 
92
->       "obtains minimal info on the msRun contained in the file"
93
-> 
94
->       "msLevel", "retentionTime"
95
-> 
96
->     If the man page cannot contain a full explanation of those terms, maybe
97
->     at least it should provide some reference to a document describing them.
98
-Done.
99
-
100
- 
101
-> 12. One more problem with man/Ramp-class.Rd: the get3DMap method doesn't
102
->     seem to exist:
103
-> 
104
->       > ramp$get3DMap(1)
105
->       Error in ramp$get3DMap(1) : could not find valid method
106
-> 
107
->     But maybe this is just a documentation problem: according to the man
108
->     page, it takes only 1 argument, when, in fact, 4 args seem to be required.
109
-all these methods that were called through the Rcpp module are now 
110
-encapsulated in S4 methods, all of which are documented.
111
-
112
-
113
-> 13. The vignette too is insufficient. It doesn't provide any context, and,
114
->     in particular, it doesn't provide any explanation about the special nature
115
->     of the classes that are used here (and the special syntax used to call
116
->     their methods). Providing some background information about the very
117
->     special nature of those classes/methods would be more than welcome.
118
-Done.
119
-
120
- 
121
-> 14. The .onLoad hook contains a setMethod() statement. This is the only
122
->     explicit use that I see of the S4 class system. That means mzR should
123
->     import the methods package i.e. have it in the Imports field, and have
124
->     import(methods) in the NAMESPACE file (generally right after the
125
->     useDynLib directive).
126
-Done.
127
- 
128
-> 15. I get the 2 following warnings when running 'R CMD check mzR_0.4.tar.gz':
129
-> 
130
->       * checking if this is a source package ... WARNING
131
->       Subdirectory ‘src’ contains:
132
->         README RcppRamp.hpp cramp.hpp
133
->       These are unlikely file names for src files.
134
-README went into inst/doc, and about *.hpp:
135
-
136
-Page 14 of http://cran.r-project.org/doc/manuals/R-exts.pdf 
137
-says "We recommend using ‘.h’ for headers, also for C++",
138
-with a note about potential not-guaranteed-portability.
139
-
140
-However, the *.hpp are valid C++ header files, 
141
-and it is also used throughout the boost libraries, 
142
-which is a high quality C++ project, some of which 
143
-will go into the next C++ standards. 
144
-
145
-So complaints about *.hpp is definitely a false positive.
146
-
147
-Nevertheless we have changed src/*hpp to src/*h for now.   
148
-
149
->     probably something you want to complain about on the R-devel mailing list,
150
-Will do.
151
-
152
->     and
153
-> 
154
->       * checking whether the name space can be loaded with stated dependencies
155
-> ... WARNING
156
->       Error: .onLoad failed in loadNamespace() for 'mzR', details:
157
->         call: MS$Ramp
158
->         error: could not find function "loadMethod"
159
->       Execution halted
160
-> 
161
->       A namespace must be able to be loaded with just the base namespace
162
->       loaded: otherwise if the namespace gets loaded by a saved object, the
163
->       session will be unable to start.
164
-> 
165
->       Probably some imports need to be declared in the NAMESPACE file.
166
-> 
167
->     probably something that will go away by importing the methods package (as
168
->     mentioned previously).
169
-Done. Rcpp stuff has been overhauled by Laurent.
170
-
... ...
@@ -75,10 +75,19 @@
75 75
   \code{mzRpwiz} are available implementations. \code{mzRramp} uses the
76 76
   ISB 'RAMP' random access C/C++ API, and \code{mzRpwiz} uses
77 77
   Proteowizard to access the relevant information in \code{mzData},
78
-  \code{mzXML} and \code{mzML} files. 
78
+  \code{mzXML} and \code{mzML} files. \code{mzRident} is used as an
79
+  interface to \code{mzIdentML} files.
80
+
81
+  IMPORTANT: New developers that need to access and manipulate raw mass
82
+  spectrometry data are advised against using this infrastucture
83
+  directly. They are invited to use the corresponding \code{MSnExp}
84
+  (with \emph{on disk} mode) from the MSnbase package instead. The
85
+  latter supports reading multiple files at once and offers access to
86
+  the spectra data (m/z and intensity) as well as all the spectra
87
+  metadata using a coherent interface. The MSnbase infrastructure itself
88
+  used the low level classes in mzR, thus offering fast and efficient
89
+  access.
79 90
 
80
-  Additional sub-classes using the proteowizard API and netCDF are
81
-  planned.
82 91
 }
83 92
 
84 93
 \section{Objects from the Class}{
... ...
@@ -86,10 +95,11 @@
86 95
 
87 96
   Objects can be created by calls of the form \code{new("mzRramp",
88 97
     ...)}, but more often they will be created with
89
-  \code{\link{openMSfile}}.  
90
-  
91
-  After creating a \code{mzR}, you can write it into a file.
92
-  mzXML, mzML, mgf formats are supported. 
98
+  \code{\link{openMSfile}}.
99
+
100
+  After creating an \code{mzR} object, one can write it into a new file.
101
+  mzXML, mzML, mgf formats are supported.
102
+
93 103
 }
94 104
 
95 105
 \section{Slots}{
... ...
@@ -102,6 +112,7 @@
102 112
       from Biobase.}
103 113
   }
104 114
 }
115
+
105 116
 \section{Extends}{
106 117
   Class \code{"\linkS4class{Versioned}"}, directly.
107 118
 }
... ...
@@ -110,14 +121,14 @@
110 121
 
111 122
   For methods to access raw data (spectra and chromatograms), see
112 123
   \code{\link{peaks}}.
113
-  
114
-  
124
+
125
+
115 126
   Methods currently implemented for \code{mzR}
116 127
 
117 128
   \describe{ \item{fileName}{\code{signature(object = "mzR")}: ... } }
118
-  
129
+
119 130
   Methods currently implemented for \code{mzRramp}
120
-  
131
+
121 132
   \describe{
122 133
     \item{analyzer}{\code{signature(object = "mzRramp")}: ... }
123 134
     \item{close}{\code{signature(con = "mzRramp")}: ... }
... ...
@@ -145,7 +156,7 @@
145 156
     \item{runInfo}{\code{signature(object = "mzRpwiz")}: ... }
146 157
     \item{chromatogramsInfo}{\code{signature(object = "mzRpwiz")}: ... }
147 158
   }
148
-  
159
+
149 160
   Methods currently implemented for \code{mzRident}
150 161
   \describe{
151 162
     \item{mzidInfo}{\code{signature(object = "mzRident")}: ... }
... ...
@@ -175,7 +186,7 @@
175 186
  library(msdata)
176 187
  filepath <- system.file("microtofq", package = "msdata")
177 188
  file <- list.files(filepath, pattern="MM14.mzML",
178
-                     full.names=TRUE, recursive = TRUE)
189
+		     full.names=TRUE, recursive = TRUE)
179 190
  mzml <- openMSfile(file)
180 191
  close(mzml)
181 192
 
182 193
deleted file mode 100644
... ...
@@ -1,45 +0,0 @@
1
-\name{mzR-package}
2
-\alias{mzR-package}
3
-\alias{mzR}
4
-\docType{package}
5
-\title{
6
-parser for mzXML, mzData, mzML and mzid files (mass spectrometry data)
7
-}
8
-\description{
9
-  The mzR package is a library purely for accessing mass spectrometry
10
-  data in a wide range of formats. Several backend libraries are used,
11
-  such as the ISB random acces parser (RAMP) and ProteoWizard (pwiz) for mass
12
-  spectrometry mzXML, mzData, mzML and mzid files. The package
13
-  contains the original RAMP code written by the ISB, and a
14
-  subset of the proteowizard library for mzML and mzid.
15
-}
16
-\details{
17
-
18
-
19
-Further information is available in the following vignette:
20
-\tabular{ll}{
21
-\code{mzR} \tab mzR, Ramp, mzXML, mzData, mzML (source, pdf)\cr
22
-}
23
-}
24
-\author{
25
-Bernd Fischer, Steffen Neumann, Laurent Gatto, Qiang Kou
26
-
27
-Maintainers: Bernd Fischer <bernd.fischer@embl.de>,
28
-Steffen Neumann <sneumann@ipb-halle.de>,
29
-Laurent Gatto <lg390@cam.ac.uk>,
30
-Qiang Kou <qkou@umail.iu.edu>
31
-}
32
-
33
-\references{
34
-  Nat Biotechnol. 2012 Oct 10;30(10):918-20. doi: 10.1038/nbt.2377.
35
-  A cross-platform toolkit for mass spectrometry and proteomics.
36
-  Chambers MC, Maclean B, Burke R, Amodei D, Ruderman DL, Neumann S,
37
-  Gatto L, Fischer B, Pratt B, Egertson J, Hoff K, Kessner D, Tasman N,
38
-  Shulman N, Frewen B, Baker TA, Brusniak MY, Paulse C, Creasy D,
39
-  Flashner L, Kani K, Moulding C, Seymour SL, Nuwaysir LM, Lefebvre B,
40
-  Kuhlmann F, Roark J, Rainer P, Detlev S, Hemenway T, Huhmer A,
41
-  Langridge J, Connolly B, Chadick T, Holly K, Eckels J, Deutsch EW,
42
-  Moritz RL, Katz JE, Agus DB, Maccoss M, Tabb DL, Mallick P.
43
-  http://www.ncbi.nlm.nih.gov/pubmed/23051804
44
-}
45
-\keyword{package, file}
... ...
@@ -1,6 +1,6 @@
1 1
 ---
2 2
 title: "A parser for raw and identification mass-spectrometry data"
3
-author: 
3
+author:
4 4
 - name: Bernd Fischer
5 5
 - name: Steffen Neumann
6 6
 - name: Laurent Gatto
... ...
@@ -9,7 +9,7 @@ package: mzR
9 9
 output:
10 10
   BiocStyle::html_document:
11 11
     toc_float: true
12
-bibliography: mzR.bib 	
12
+bibliography: mzR.bib
13 13
 vignette: >
14 14
   %\VignetteEngine{knitr::rmarkdown}
15 15
   %\VignetteIndexEntry{Accessin raw mass spectrometry and identification data}
... ...
@@ -26,7 +26,7 @@ interface to several mass spectrometry data formats, namely `mzData`
26 26
 data, and `mzIdentML` [@Jones2012], somewhat similar to the
27 27
 Bioconductor package affyio for affymetrix raw data. No processing is
28 28
 done in `r BiocStyle::Biocpkg("mzR")`, which is left to packages such as `r
29
-BiocStyle::Biocpkg("xcms")` [@Smith:2006, Tautenhahn:2008] or 
29
+BiocStyle::Biocpkg("xcms")` [@Smith:2006, Tautenhahn:2008] or
30 30
 `r BiocStyle::Biocpkg("MSnbase")` [@Gatto:2012]. These packages also provide more
31 31
 convenient, high-level interfaces to raw and identification. data
32 32
 
... ...
@@ -55,6 +55,16 @@ The `r BiocStyle::Biocpkg("mzR")` package is in essence a collection of wrappers
55 55
 to the C++ code, and benefits from the C++ interface provided through
56 56
 the Rcpp package [@Rcpp11].
57 57
 
58
+**IMPORTANT** New developers that need to access and manipulate raw
59
+mass spectrometry data are advised against using this infrastucture
60
+directly. They are invited to use the corresponding `MSnExp` (with *on
61
+disk* mode) from the`r BiocStyle::Biocpkg("MSnbase")` package instead. The
62
+latter supports reading multiple files at once and offers access to
63
+the spectra data (m/z and intensity) as well as all the spectra
64
+metadata using a coherent interface. The MSnbase infrastructure itself
65
+used the low level classes in mzR, thus offering fast and efficient
66
+access.
67
+
58 68
 
59 69
 # Mass spectrometry raw data
60 70
 
... ...
@@ -107,17 +117,17 @@ depends on the MS software which converted the data.
107 117
 
108 118
 ## `mzXML`/`mzML`/`mzData` files
109 119
 
110
-A short example sequence to read data from a mass spectrometer. 
120
+A short example sequence to read data from a mass spectrometer.
111 121
 First open the file.
112 122
 
113 123
 ```{r openraw}
114 124
 library(mzR)
115 125
 library(msdata)
116 126
 
117
-mzxml <- system.file("threonine/threonine_i2_e35_pH_tree.mzXML", 
127
+mzxml <- system.file("threonine/threonine_i2_e35_pH_tree.mzXML",
118 128
                      package = "msdata")
119
-aa <- openMSfile(mzxml) 
120
-``` 
129
+aa <- openMSfile(mzxml)
130
+```
121 131
 
122 132
 We can obtain different kind of header information.
123 133
 
... ...
@@ -125,7 +135,7 @@ We can obtain different kind of header information.
125 135
 runInfo(aa)
126 136
 instrumentInfo(aa)
127 137
 header(aa,1)
128
-``` 
138
+```
129 139
 
130 140
 Read a single spectrum from the file.
131 141
 
... ...
@@ -134,14 +144,14 @@ pl <- peaks(aa,10)
134 144
 peaksCount(aa,10)
135 145
 head(pl)
136 146
 plot(pl[,1], pl[,2], type="h", lwd=1)
137
-``` 
147
+```
138 148
 
139 149
 One should always close the file when not needed any more. This will
140 150
 release the memory of cached content.
141 151
 
142 152
 ```{r close the file}
143 153
 close(aa)
144
-``` 
154
+```
145 155
 
146 156
 ## `mzIdentML` files
147 157
 
... ...
@@ -154,14 +164,14 @@ library(msdata)
154 164
 
155 165
 file <- system.file("mzid", "Tandem.mzid.gz", package="msdata")
156 166
 x <- openIDfile(file)
157
-``` 
167
+```
158 168
 
159 169
 `mzidInfo` function will return general information about this
160 170
 identification result.
161 171
 
162 172
 ```{r metadata}
163 173
 mzidInfo(x)
164
-``` 
174
+```
165 175
 
166 176
 `psms` will return the detailed information on each
167 177
 peptide-spectrum-match, include `spectrumID`, `chargeState`,
... ...
@@ -196,8 +206,8 @@ colnames(scr)
196 206
 Other file formats provided by HUPO, such as `mzQuantML` for
197 207
 quantitative data [@Walzer:2013] are also possible in the future.
198 208
 
199
-# Session information {#sec:sessionInfo} 
209
+# Session information {#sec:sessionInfo}
200 210
 
201 211
 ```{r label=sessioninfo, results='asis', echo=FALSE}
202 212
 toLatex(sessionInfo())
203
-``` 
213
+```