Bioconductor / SparseArray

High-performance sparse data representation and manipulation in R
8 stars 2 forks source link

error when i load SparseArray library #1

Closed billila closed 1 year ago

billila commented 1 year ago

Hi! I’m trying to use the SparseArray for my project and I got this error when working with this library and a SingleCellExperiment object. Here is a reproducible example of the error I obtain.

> library(TENxBrainData)
> library(SingleCellExperiment)
> tenx <- TENxBrainData()
snapshotDate(): 2022-10-31
see ?TENxBrainData and browseVignettes('TENxBrainData') for documentation
loading from cache

> rownames(tenx)<- rowData(tenx)$Symbol
> counts(tenx)
27998 x 1306127> matrix of class DelayedMatrix and type "integer":
                 AAACCTGAGATAGGAG-1   AAACCTGAGCGGCTTC-1 ... TTTGTCAGTTAAAGTG-133 TTTGTCATCTGAAAGA-133
          Xkr4                    0                    0   .                    0                    0
        Gm1992                    0                    0   .                    0                    0
       Gm37381                    0                    0   .                    0                    0
           Rp1                    0                    0   .                    0                    0
           Rp1                    0                    0   .                    0                    0
           ...                    .                    .   .                    .                    .
    AC168977.1                    0                    0   .                    0                    0
          PISD                    1                    0   .                    0                    0
         DHRSX                    0                    0   .                    0                    0
      Vmn2r122                    0                    0   .                    0                    0
CAAA01147332.1                    0                    0   .                    0                    0

> library(SparseArray)
> counts(tenx)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'type': invalid class "DelayedMatrix" object: 
    'dim(x)' must work
> library(scuttle)
> tenx <- logNormCounts(tenx)
Error in normarg_grid(grid, x) : 
  The current automatic grid maker returned an error when called on 'x'. Please use
  setAutoGridMaker() to set a valid automatic grid maker.

Is this something that I can avoid in some way? or is it related to some sort of class-hierarchy that needs to be addressed? Thanks in advance for any reply

hpages commented 1 year ago

Please do not use the SparseArray package. This package is still a work-in-progress and is not officially part of Bioconductor yet. In particular there is no workflow in Bioconductor where you need to use SparseArray. Thanks!