GreenleafLab / ArchR

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

addGeneExpressionMatrix Error #1084

Closed jinoh-neuro closed 3 years ago

jinoh-neuro commented 3 years ago

Hi,

I am trying to add a paired scRNA dataset (in the form of a RangedSummarizedExperiment) from a 10X Multiome Experiment to my ArchR Project. However, I get the following error:

ArchR logging to : ArchRLogs/ArchR-addGeneExpressionMatrix-14cfc4f9fad94-Date-2021-10-19_Time-17-52-25.log If there is an issue, please report to github with logFile! 2021-10-19 17:52:27 : Overlap w/ scATAC = 0.981 2021-10-19 17:52:27 : Overlap Per Sample w/ scATAC : atac=5149 Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘NSBS’ for signature ‘"CompressedIntegerList"’

Wondering how this error may be fixed. Thank you!

ArchR-addGeneExpressionMatrix-14cfc4f9fad94-Date-2021-10-19_Time-17-52-25.log

jinoh-neuro commented 3 years ago

For reference, the code I used was

projE13Multi <- addGeneExpressionMatrix(input = projE13Multi, seRNA = seRNA, force = TRUE)

where projE13Multi is the name of my ArchRProject

rcorces commented 3 years ago

I dont have enough information to help.

1) Are you able to execute the multiome tutorial without issue? https://greenleaflab.github.io/ArchR_2020/Ex-Analyze-Multiome.html 2) How did you create your seRNA object

jinoh-neuro commented 3 years ago

Hi, thanks for the quick response!

To answer your questions:

  1. Yes, the multiome tutorial works fine
  2. seRNA was created by first creating a "SingleCellExperiment" object with DropletUtils read10xCounts function that utilizes the feature matrix, barcodes, and rna features sce <- read10xCounts(samples = "path/to/samples", sample.names = names(samples), col.names = TRUE, type = "auto", version = "3", genome = NULL)

I then appended the name to cellNames for matching colnames(sce) <- paste("sampleName", colnames(sce), sep = "#")

SingleCellExperiment object was then converted to RangedSummarizedExperiment with seRNA <- as(sce, "RangedSummarizedExperiment")

I had to create the seRNA object in this method, because the .h5 matrix was not available to me, so I was unable to use the import10xFeatureMatrix function

rcorces commented 3 years ago

I imagine there is something off about your seRNA object. It isnt obvious from the log file - it looks pretty equivalent to the expected. One possibility is that the gene names listed in your seRNA object do not align with the gene names in your ArchR gene annotation.

jinoh-neuro commented 3 years ago

I see, thank you! I will play around with modifying the seRNA object gene names. Is there a way I can view the ArchR gene annotations/how they are annotated?

rcorces commented 3 years ago

https://www.archrproject.com/reference/getGeneAnnotation.html

jinoh-neuro commented 3 years ago

Thank you

jinoh-neuro commented 3 years ago

Hi, from the tutorial I understand how to attach a custom genome annotation when creating an arrow file, but how may I attach a custom gene annotation?

rcorces commented 3 years ago

this is described in the manual - https://www.archrproject.com/bookdown/getting-set-up.html

jinoh-neuro commented 3 years ago

Hi, thank you for the help. I have resolved this issue by converting the ArchR geneannotation to ENSEMBL

aa20g217 commented 1 month ago

@jinoh-neuro Could you please explain how you solved it?