Closed kpadm closed 4 years ago
I think the problem here is that the row names of the gene activity matrix will still be the chromosomal coordinates rather than the gene names, so there are no features in common between the gene activity and gene expression matrices. You can change the row names like this:
gene.key <- genebodyandpromoter.coords$gene_name
names(gene.key) <- GRangesToString(grange = genebodyandpromoter.coords)
rownames(gene.activities) <- gene.key[rownames(gene.activities)]
See https://satijalab.org/signac/articles/pbmc_vignette.html#create-a-gene-activity-matrix-1
Thanks for your reply Tim. After changing the row names, I am getting this error:
> combined[['RNA']] <- CreateAssayObject(counts = gene.activities)
Warning: Non-unique features (rownames) present in the input matrix, making unique
Error: Feature names of counts matrix cannot be empty
You probably have some empty gene names, you can remove them:
gene.key <- genebodyandpromoter.coords$gene_name
names(gene.key) <- GRangesToString(grange = genebodyandpromoter.coords)
rownames(gene.activities) <- make.unique(gene.key[rownames(gene.activities)])
gene.activities <- gene.activities[rownames(gene.activities)!="",]
Thanks that seems to have fixed it. Appreciate all your help.
Hello,
I am doing an integrated analysis of scRNA-seq and scATAC-seq. I am getting the following error at the
FindTransferAnchors
step. Here is the detailed error:Here is my entire code:
Can you please let me know if I am doing something wrong? Here is my
sessionInfo()
.Thanks.
Karthik