How to read tsv data as dgcmatrix
0
0
Entering edit mode
6 months ago
Alex ▴ 20

Update: Solved. The barcodes provided in the metadata and count matrix are not the same.

One is “xyz-1”, another is “xyz.1”. Just need to correct the barcodes.

I will post some photos later as references for people who might encounter similar issues in the future . Thanks

—————

I have a tsv count matrix and a tsv metadata. I read both files by read_tsv("filename"), so they become tibble.

Next, I tried to CreateSeuratObject(counts = counts, meta.data=meta). It failed.

I wonder what is the standard way to convert the tsv matrix into dgcMatrix, and create a seurat object from them?

scRNA-seq seurat • 552 views
ADD COMMENT
0
Entering edit mode

Post the error message or more details on why it has failed.

ADD REPLY
0
Entering edit mode

it failed is not an adequate description, please add details. Likely the format itself (dense or sparse matrix) is not the issue here since Seurat can accept dense (=normal) matrix.

Anyway, as(your_matrix, "CsparseMatrix").

ADD REPLY

Login before adding your answer.

Traffic: 1392 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6