Skip to content

Commit

Permalink
restruct se0 object
Browse files Browse the repository at this point in the history
  • Loading branch information
nshen7 committed Nov 22, 2023
1 parent 05c8b45 commit 37ae2df
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/HDF5NAdrop2matrix.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Coerce a NA-dropped HDF5Matrix back to matrix form
#' Coerce a NA-dropped HDF5Matrix back to regular matrix form where NAs are not dropped to 0.
#'
#' @param HDF5Matrix an HDF5Matrix (e.g. assay output from vmrseq::data.pool)
#' with dropped NA values
Expand Down
Binary file removed data/se0.rda
Binary file not shown.
Binary file added data/se0/assays.h5
Binary file not shown.
Binary file added data/se0/se.rds
Binary file not shown.
4 changes: 2 additions & 2 deletions vignettes/vmrseq-vignette.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ head(cell_1)

The `SummarizedExperiment` object stores CpG sites as rows and cells as columns. We adopted the NA-dropped sparseMatrix representation to save storage space for large single-cell datasets (see following section for specifics of how this representation look like). This option can be turned off but we recommend to keep it on.

Further, `data.pool` write the `SummarizedExperiment` object into disk using `HDF5` format, which is a backend extension of `DelayedArray`. The HDF5/DelayedArray format allows one to perform common array operations on it without loading the object in memory. See packages [HDF5Array](https://bioconductor.org/packages/release/bioc/html/HDF5Array.html) and [DelayedArray](https://bioconductor.org/packages/release/bioc/html/DelayedArray.html) for details.
Further, `data.pool` saves the `SummarizedExperiment` object into disk using `HDF5` format, which is a backend extension of `DelayedArray`. Using `HDF5::loadHDF5SummarizedExperiment()` to load saved HDF5SummarizedExperiment objects into R. The HDF5/DelayedArray format allows one to perform common array operations on it without loading the object in memory. See packages [HDF5Array](https://bioconductor.org/packages/release/bioc/html/HDF5Array.html) and [DelayedArray](https://bioconductor.org/packages/release/bioc/html/DelayedArray.html) for details.


## Load example data

In this vignette, we use a formatted example dataset built in the package called `se0` that's ready to be input to model fitting function:
```{r}
data(se0)
se0 <- loadHDF5SummarizedExperiment(system.file('data/se0', package = 'vmrseq'))
```

It is a `SummarizedExperiment` object with one `assay` slot called `M_mat` that contains the binary methylation values of individual cells at CpG sites (sites as rows and cells as columns):
Expand Down

0 comments on commit 37ae2df

Please sign in to comment.