GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
384 stars 137 forks source link

GeneScoreMatrix without rownames #208

Closed Sophiesze closed 4 years ago

Sophiesze commented 4 years ago

Hi GreenLeafLab,

I was trying to use SingleR package with a public dataset to annotate clusters. I use getMatrixFromProject() to get the GeneScoreMatrix. However when I try to use SingleR and it reported that there are no row names.

截屏2020-06-14 下午4 20 21

Then I try to figure out the structure of the GeneMatrix.

截屏2020-06-14 下午3 58 15 截屏2020-06-14 下午4 10 11

And it seems like there is NULL in the dimnames.

I also try to get the GeneMatrix out, but it seemed impossible.

截屏2020-06-14 下午4 24 36

I am just wondering would it be possible to get the ''real'' GeneMatrix (rownames=genes, colnames=cells) out from the ArchRProj which would be really good for interoperability between different packages? And also it would be really useful if I want to use Pheatmap to draw a different kind of heatmap.

I hope I explained it clearly. Thank you so much.

Best, Sophie

Carota-1 commented 4 years ago

Hi,I also met a similar issue. Have you solved it?

suragnair commented 4 years ago

archr_gene_score = getMatrixFromProject(archr_proj, "GeneScoreMatrix" and then rowData(archr_gene_score)$name gives the gene names.

chaiepi commented 1 month ago

Hi,I met a similar issue. I want to get the gene x cell Gene Score Matrix, and I ran the following command: gene_score_matrix <- getMatrixFromProject(dna, useMatrix = "GeneScoreMatrix") assays(gene_score_matrix)$GeneScoreMatrix rowData(gene_score_matrix)

The Matrix returned by assays(gene_score_matrix)$GeneScoreMatrix has row names that are not gene names but numerical identifiers. The DataFrame returned by rowData(gene_score_matrix) also has numerical identifiers as row names. Are these numerical identifiers corresponding? If they are corresponding, I can directly assign the gene names to the row names of the Matrix returned by GeneScoreMatrix.