A single cell RNA-seq reference map of human hematopoietic development in the bone marrow, with balanced representation of hematopoietic stem and progenitor cells and differentiated populations
GNU General Public License v3.0
18
stars
3
forks
source link
Fix issue with 1xn dummy count matrix not working with CreateSeuratObject #3
With Seurat 5.0 at least, a single-row count matrix does not work for CreateSeuratObject(). Also simplified the creation of the matrix to avoid having to create it and then transpose. The matrix is changed to a sparse matrix by Seurat, so adding a row doesn't affect the memory profile much since it's all 0s. Tested with Seurat 5.0 in R 4.3.2
Thanks so much Adam, really appreciate the PR
I made a small tweak to your code to ensure it is still compatible with Seurat v4 (I haven't made the switch yet!)
With Seurat 5.0 at least, a single-row count matrix does not work for CreateSeuratObject(). Also simplified the creation of the matrix to avoid having to create it and then transpose. The matrix is changed to a sparse matrix by Seurat, so adding a row doesn't affect the memory profile much since it's all 0s. Tested with Seurat 5.0 in R 4.3.2