File: TENxMatrixSeed-class.Rd

package info (click to toggle)
r-bioc-hdf5array 1.34.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,736 kB
  • sloc: ansic: 5,815; makefile: 4
file content (96 lines) | stat: -rw-r--r-- 2,768 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
\name{TENxMatrixSeed-class}
\docType{class}

\alias{class:TENxMatrixSeed}
\alias{TENxMatrixSeed-class}
\alias{TENxMatrixSeed}

\title{TENxMatrixSeed objects}

\description{
  TENxMatrixSeed is a low-level helper class that is a direct extension
  of the \link{H5SparseMatrixSeed} class. It is used to represent a
  pointer to an HDF5 sparse matrix that is stored in the CSR/CSC/Yale
  format ("Compressed Sparse Row") and follows the 10x Genomics convention
  for storing the dimensions of the matrix.

  Note that a TENxMatrixSeed object is not intended to be used directly.
  Most end users will typically create and manipulate a higher-level
  \link{TENxMatrix} object instead. See \code{?\link{TENxMatrix}} for
  more information.
}

\usage{
## Constructor function:
TENxMatrixSeed(filepath, group="matrix")
}

\arguments{
  \item{filepath, group}{
    See \code{?\link{TENxMatrix}} for a description of these arguments.
  }
}

\details{
  A TENxMatrixSeed object supports the same limited set of methods as
  an \link{H5SparseMatrixSeed} object. See \code{?\link{H5SparseMatrixSeed}}
  for the details.
}

\value{
  \code{TENxMatrixSeed()} returns a TENxMatrixSeed object.
}

\section{TENxMatrixSeed vs TENxMatrix objects}{
  In order to have access to the full set of operations that are available
  for \link[DelayedArray]{DelayedMatrix} objects, a TENxMatrixSeed object
  first needs to be wrapped in a \link[DelayedArray]{DelayedMatrix} object,
  typically by calling the \code{\link[DelayedArray]{DelayedArray}()}
  constructor on it.

  This is what the \code{\link{TENxMatrix}()} constructor function does.

  Note that the result of this wrapping is a \link{TENxMatrix} object,
  which is just a TENxMatrixSeed object wrapped in a
  \link[DelayedArray]{DelayedMatrix} object.
}

\seealso{
  \itemize{
    \item \link{TENxMatrix} objects.

    \item \link{H5SparseMatrixSeed} objects.

    \item The \code{\link[TENxBrainData]{TENxBrainData}} dataset (in the
          \pkg{TENxBrainData} package).

    \item \code{\link{h5ls}} to list the content of an HDF5 file.
  }
}

\examples{
## The 1.3 Million Brain Cell Dataset from 10x Genomics is available
## via ExperimentHub:
library(ExperimentHub)
hub <- ExperimentHub()
query(hub, "TENxBrainData")
fname <- hub[["EH1039"]]

## 'fname' is an HDF5 file. Use h5ls() to list its content:
h5ls(fname)

## The 1.3 Million Brain Cell Dataset is represented by the "mm10"
## group. We point the TENxMatrixSeed() constructor to this group
## to create a TENxMatrixSeed object representing the dataset:
seed <- TENxMatrixSeed(fname, group="mm10")
seed
path(seed)
dim(seed)
is_sparse(seed)
sparsity(seed)

DelayedArray(seed)
stopifnot(class(DelayedArray(seed)) == "TENxMatrix")
}
\keyword{classes}
\keyword{methods}