Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLUTION: addGeneExpressionMatrix / import10xFeatureMatrix issue #2199

Open
juliabelk opened this issue Aug 14, 2024 · 2 comments
Open

SOLUTION: addGeneExpressionMatrix / import10xFeatureMatrix issue #2199

juliabelk opened this issue Aug 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@juliabelk
Copy link

I just wanted to add some information about the addGeneExpressionMatrix and import10xFeatureMatrix functions in case anyone else is running into the same issue I had. The error message I kept getting was Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘seqnames’ for signature ‘"SummarizedExperiment"’

What I realized is - the addGeneExpressionMatrix really needs gene coordinates for every single gene in the matrix. I don't think this function can accept a SummarizedExperiment at all, it seems like it requires a RangedSummarizedExperiment (the documentation is not clear on this point). It will try to read in these coordinates from the h5 file, however if it doesn't find them, it will simply omit the ranges, return a SummarizedExperiment instead, and then fail to add the expression matrix.

You can check if the coordinates for each gene are present in the h5 file using features10x <- h5read(h5, "/matrix/features") and checking if interval is a key in the returned list.

As far as I can tell, if interval is not in the returned list, you will need to manually add your own gene coordinates to create a RangedSummarizedExperiment before calling addGeneExpressionMatrix. In my case, cellranger did not output the interval key into the h5 matrix, but I was able to find another 10X dataset that did have the interval key and copy it over by modifying import10xToSE. The documentation also suggests using something like genes(EnsDb.Hsapiens.v86::EnsDb.Hsapiens.v86) to get the gene coordinates, however I couldn't figure out how to make this work.

One other thing - the ArchR multiome tutorial that is commonly linked to does have interval in the h5 file. So if your code is running on the tutorial files but not on other samples, this could be why.

@juliabelk juliabelk added the bug Something isn't working label Aug 14, 2024
@rcorces
Copy link
Collaborator

rcorces commented Aug 14, 2024

Hi @juliabelk! Thanks for using ArchR! Lately, it has been very challenging for me to keep up with maintenance of this package and all of my other
responsibilities as a PI. I have not been responding to issue posts and I have not been pushing updates to the software. We are actively searching to hire
a computational biologist to continue to develop and maintain ArchR and related tools. If you know someone who might be a good fit, please let us know!
In the meantime, your issue will likely go without a reply. Most issues with ArchR right not relate to compatibility. Try reverting to R 4.1 and Bioconductor 3.15.
Newer versions of Seurat and Matrix also are causing issues. Sorry for not being able to provide active support for this package at this time.

@immanuelazn
Copy link
Collaborator

Thanks Julia, I'll add these notes to the to-do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants