Skip to content

Commit

Permalink
Don't rely on example(SummarizedExperiment) in the vignette.
Browse files Browse the repository at this point in the history
Looks like the example itself changed, which broke the build.
  • Loading branch information
LTLA committed Jul 5, 2024
1 parent 7528d0a commit 4157bc4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: alabaster.se
Title: Load and Save SummarizedExperiments from File
Version: 1.5.2
Date: 2024-05-21
Version: 1.5.3
Date: 2024-07-05
Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="[email protected]")
License: MIT + file LICENSE
Description:
Expand Down
22 changes: 20 additions & 2 deletions vignettes/userguide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,26 @@ Check out the `r Biocpkg("alabaster.base")` for more details on the motivation a
Given a `(Ranged)SummarizedExperiment`, we can use `saveObject()` to save it inside a staging directory:

```{r}
# Example taken from ?SummarizedExperiment
library(SummarizedExperiment)
example(SummarizedExperiment, echo=FALSE) # can't be bothered to copy it here.
nrows <- 200
ncols <- 6
counts <- matrix(rpois(nrows * ncols, 10), nrows, ncols)
rowRanges <- GRanges(
rep(c("chr1", "chr2"), c(50, 150)),
IRanges(floor(runif(200, 1e5, 1e6)), width=100),
strand=sample(c("+", "-"), 200, TRUE)
)
colData <- DataFrame(
Treatment=rep(c("ChIP", "Input"), 3),
row.names=LETTERS[1:6]
)
rse <- SummarizedExperiment(
assays=SimpleList(counts=counts),
rowRanges=rowRanges,
colData=colData
)
rownames(rse) <- sprintf("GENE_%03d", 1:200)
rse
library(alabaster.se)
Expand All @@ -44,7 +62,7 @@ We can then load it back into the session with `readObject()`.

```{r}
roundtrip <- readObject(tmp)
class(roundtrip)
roundtrip
```

# Session information {-}
Expand Down

0 comments on commit 4157bc4

Please sign in to comment.