clustifyr icon indicating copy to clipboard operation
clustifyr copied to clipboard

expression matrix format

Open wangjiawen2013 opened this issue 2 years ago • 1 comments

Hi, Thanks for your great work! Does clustifyr support scanpy (another popular scRNAseq toolkit, python version of seurat) ? And, some scRNA matrix are very large, it's very slow for R to read the matrix into memory. So can clustifyr read the matrix file saved on disk directly (that is, input = "file path to expression matrix") ?

wangjiawen2013 avatar Mar 19 '22 10:03 wangjiawen2013

Thanks for your interest in clustifyr. There is no direct support for scanpy, however the AnnData objects can be converted to a SingleCellExperiment object using zellkonverter. Alternatively, clustifyr supports sparseMatrices as input so you could write your log-normalized data from scanpy to disk, then read into R using readMM from the Matrix package. If the matrix is written to disk in a 10x-Genomics format (with a matrix.mtx, features.tsv.gz and barcodes.tsv.gz) then you could also import using DropletUtils (read10xCounts) or Seurat (Read10X). Reading a dense matrix (such as a csv format) into R (or python) will be slow, but if you need to, then using fread from the data.table package is a good option.

kriemo avatar Mar 29 '22 14:03 kriemo