read_mtx() reads a .mtx file (Matrix Market, coordinate or array
format, with the integer, real or pattern field) into an AnnData()
object with a CSR X, as Python's read_mtx().
The obs and var names are "0", "1" and so on.
Symmetric and skew-symmetric matrices are expanded to the full matrix.
Value
An AnnData() object with a sparse (CSR) X.
Examples
path <- tempfile(fileext = ".mtx")
writeLines(
c(
"%%MatrixMarket matrix coordinate integer general",
"2 3 2",
"1 1 5",
"2 3 7"
),
path
)
read_mtx(path)
#> AnnData object with n_obs × n_vars = 2 × 3
#> layers: None (.X)