Skip to content

Commit f787d5f

Browse files
committed
fix errors
1 parent f6bac75 commit f787d5f

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# MSnbase 2.37
22

3+
## 2.37.2
4+
- Fixing vignette (see #613)
5+
- use `MsDataHub` for TMT mzid data.
6+
37
## 2.37.1
48
- Fixing tests
59

R/plotting-Spectrum.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ plotSpectrumVsSpectrum <- function(spectra, tolerance=25e-6,
3434
xlim, ylim,
3535
legend.cex = 1,
3636
peaks.pch = 19, ...) {
37-
if (norm)
37+
if (norm)
3838
spectra <- lapply(spectra, normalize)
3939

4040
if (missing(xlim)) {
@@ -48,10 +48,10 @@ plotSpectrumVsSpectrum <- function(spectra, tolerance=25e-6,
4848
ylim <- c(-maxInten, maxInten)
4949
}
5050

51-
if (missing(common))
51+
if (missing(common))
5252
common <- lapply(spectra, function(x)logical(peaksCount(x)))
5353

54-
if (missing(sequences))
54+
if (missing(sequences))
5555
sequences <- character(2)
5656

5757
orientation <- c(1, -1)
@@ -71,7 +71,7 @@ plotSpectrumVsSpectrum <- function(spectra, tolerance=25e-6,
7171
if (msLevel(spectra[[i]]) == 1) {
7272
label <- paste0("Retention time: ", formatRt(rtime(spectra[[i]])),
7373
", # common: ", sum(common[[i]]))
74-
74+
7575
} else {
7676
label <- paste0("prec scan: ", precScanNum(spectra[[i]]))
7777
if (peaksCount(spectra[[i]])) {
@@ -124,9 +124,10 @@ plotSpectrumVsSpectrum <- function(spectra, tolerance=25e-6,
124124
fragments = calculateFragments_Spectrum2(object,
125125
sequence = sequence, tolerance = tolerance,
126126
relative = relative, type = type, z = z,
127-
modifications = modifications,
127+
fixed_modifications = modifications,
128128
neutralLoss = neutralLoss,
129-
verbose = isMSnbaseVerbose()),
129+
verbose = isMSnbaseVerbose()) |>
130+
suppressWarnings(),
130131
fragments.cex = 0.75, peaks.lwd = 1, peaks.cex = 0.5, ...) {
131132
if (peaksCount(object) > 0 && !centroided(object)) {
132133
message("Your spectrum is not centroided.")
@@ -159,4 +160,3 @@ plotSpectrumVsSpectrum <- function(spectra, tolerance=25e-6,
159160
cex=fragments.cex, col="#808080")
160161
}
161162
}
162-

vignettes/v01-MSnbase-demo.Rmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ suppressPackageStartupMessages(require("Rdisop"))
3737
suppressPackageStartupMessages(require("pRolocdata"))
3838
suppressPackageStartupMessages(require("pRoloc"))
3939
suppressPackageStartupMessages(require("msdata"))
40+
suppressPackageStartupMessages(require("MsDataHub"))
4041
library("grid")
4142
suppressPackageStartupMessages(library("BiocParallel"))
4243
```
@@ -140,7 +141,7 @@ more details). To make use of the new *on-disk* implementation, set
140141
```{r readdata, echo=TRUE, cache=FALSE, tidy=FALSE}
141142
file <- dir(system.file(package = "MSnbase", dir = "extdata"),
142143
full.names = TRUE, pattern = "mzXML$")
143-
rawdata <- readMSData(file, msLevel = 2, verbose = FALSE)
144+
rawdata <- readMSData(file, msLevel. = 2, verbose = FALSE)
144145
```
145146

146147
Only spectra of a given MS level can be loaded at a time by setting
@@ -514,9 +515,8 @@ interface by converting the dedicated identification data objects into
514515
`data.frames`.
515516

516517
```{r iddf0}
517-
library("msdata")
518-
f <- "TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01-20141210.mzid"
519-
idf <- msdata::ident(full.names = TRUE, pattern = f)
518+
library("MsDataHub")
519+
idf <- MsDataHub::TMT_Erwinia_1uLSike_Top10HCD_isol2_45stepped_60min_01.20141210.mzid()
520520
iddf <- readMzIdData(idf)
521521
str(iddf)
522522
```
@@ -608,10 +608,10 @@ details.
608608
```{r msnexpIdentification, echo=TRUE, cache=FALSE, tidy=FALSE}
609609
## find path to a mzXML file
610610
quantFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
611-
full.name = TRUE, pattern = "mzXML$")
611+
full.names = TRUE, pattern = "mzXML$")
612612
## find path to a mzIdentML file
613613
identFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
614-
full.name = TRUE, pattern = "dummyiTRAQ.mzid")
614+
full.names = TRUE, pattern = "dummyiTRAQ.mzid")
615615
## create basic MSnExp
616616
msexp <- readMSData(quantFile, verbose = FALSE)
617617
head(fData(msexp), n = 2)

0 commit comments

Comments
 (0)