-
Notifications
You must be signed in to change notification settings - Fork 85
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
GeneActivity() return all zero matrix on merged object. #205
Comments
I don't understand, did you run |
gene.activities <- GeneActivity(
object = atac,
assay = "atac") This returns a all-zero matrix. I ran the I ended up making gene activity matrix before merging and everything worked. Here is the full code of manually running annotation <- Annotation(atac)
transcripts <- CollapseToLongestTranscript(ranges = annotation)
transcripts <- transcripts[transcripts$gene_biotype == "protein_coding"]
transcripts <- Extend(x = transcripts, upstream = 2000,
downstream = 0)
assay <- "atac"
counts <- FeatureMatrix(
fragments = atac@assays[["atac"]]@fragments,
features = transcripts,
cells = colnames(x = atac[["atac"]]), Here is how the annotation was added. I used a self-made EnsDb package. It should be fine since I used on other analysis before. DefaultAssay(atac) <- "atac"
devtools::load_all(path = "~/Desktop/500_Data/503_DataAnalysis/2020-06-16-annotation-inspection/EnsDb.Mmusculus.v100.v2/EnsDb.Mmusculus.v100/")
annotations <- GetGRangesFromEnsDb(ensdb = EnsDb.Mmusculus.v100)
# change to UCSC style since the data
seqlevelsStyle(annotations) <- 'UCSC'
genome(annotations) <- "mm10"
# add the gene information to the object
Annotation(atac) <- annotations |
Thanks for the clarification. One potential cause could be if the cell names are incorrect in the fragment object, it won't be matching any of the fragments in the file correctly. Are you able to successfully run any other functions that use the fragment files, for example make a coverage plot of a region? |
I was able to reproduce this by merging datasets and running |
Should be fixed now on the develop branch |
Hi, I'm getting this bug even after installing the development branch. I have Signac_1.1.1.9014 installed, but I've tried it with the main branch (1.1.1) as well. Specifically, going through the ATAC integration here: https://satijalab.org/seurat/articles/atacseq_integration_vignette.html I get an all zeros matrix from the GeneActivity() call. Here's my sessionInfo(): R version 4.0.3 (2020-10-10) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): Any help would be much appreciated, thanks for the package. |
Hi,
When I run the GeneActivity() function on a merged object, the returned matrix contains all zero. After running the function step by step, I found that it might have something to do with the cell barcodes.
The original code from GeneActivity function return all zero matrix.
After commenting out the
cells
argument, the returned matrix contains data but no sample index in the dimname.I followed the merge object vigette here. , and the barcodes in my fragment object look like this,
I am using Signac 1.0.0 by the way.
The text was updated successfully, but these errors were encountered: