Skip to content

Commit

Permalink
.plotMsiSlice incorrectly used just the first z dimension if "combine…
Browse files Browse the repository at this point in the history
…=TRUE"
  • Loading branch information
sgibb committed Jul 13, 2015
1 parent 3734f1f commit 2e17fe7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: MALDIquant
Version: 1.12.5
Date: 2015-07-12
Version: 1.12.6
Date: 2015-07-13
Title: Quantitative Analysis of Mass Spectrometry Data
Authors@R: c(person("Sebastian", "Gibb", role=c("aut", "cre"),
email="mail@sebastiangibb.de"), person("Korbinian", "Strimmer",
Expand Down
4 changes: 4 additions & 0 deletions NEWS
@@ -1,6 +1,10 @@
RELEASE HISTORY OF THE "MALDIquant" PACKAGE
===========================================

Version 1.12.6 [2015-07-13 Mon]:
- BUGFIX: `.plotMsiSlice` just used the first center if "combine=TRUE";
affected functions: `plotMsiSlice`.

Version 1.12.5 [2015-07-12 Sun]:
- `calibratyIntensity`: gains a "range" argument for "median" and "PQN" as well;
in 1.12 just "TIC" was supported.
Expand Down
2 changes: 1 addition & 1 deletion R/plotMsiSlice-functions.R
Expand Up @@ -39,7 +39,7 @@
col <- x

for (i in seq_len(d[3L])) {
col[,, i] <- .colorMatrix(.array2matrix(x), colRamp=colRampList[[i]],
col[,, i] <- .colorMatrix(.array2matrix(x, z=i), colRamp=colRampList[[i]],
scale=scale)
}

Expand Down
8 changes: 5 additions & 3 deletions tests/testthat/test_plotMsiSlice-functions.R
Expand Up @@ -3,11 +3,13 @@ context(".plotMsiSlice")
test_that(".array2matrix", {
x1 <- array(1:12, dim=c(x=2, y=3, z=2))
x2 <- array(1:12, dim=c(1, 12, 1))
r1 <- matrix(1:12, nrow=2, ncol=3)
r2 <- matrix(1:12, nrow=1, ncol=12)
r1 <- matrix(1:6, nrow=2, ncol=3)
r2 <- matrix(7:12, nrow=2, ncol=3)
r3 <- matrix(1:12, nrow=1, ncol=12)

expect_identical(MALDIquant:::.array2matrix(x1), r1)
expect_identical(MALDIquant:::.array2matrix(x2), r2)
expect_identical(MALDIquant:::.array2matrix(x1, z=2), r2)
expect_identical(MALDIquant:::.array2matrix(x2), r3)
})

test_that(".colorMatrix", {
Expand Down

0 comments on commit 2e17fe7

Please sign in to comment.