Zero expression in selected genes
PalmaGudiel opened this issue · 4 comments
Hello,
I am trying to use the bisqueRNA package to estimate cell type proportions from bulk RNAseq data based on a snRNA reference. However, when I try to use "res <- BisqueRNA::ReferenceBasedDecomposition(bulk.eset, sc.eset, markers = NULL, use.overlap = FALSE)" I end up with the following message:
Decomposing into 9 cell types.
Using 15578 genes in both bulk and single-cell expression.
Converting single-cell counts to CPM and filtering zero variance genes.
Error in CountsToCPM(sc.eset) :
Zero expression in selected genes for 161109 cells
Calls: -> CountsToCPM ->
Any ideas of what could be causing this issue and what can I do to solve it?
Thank you so much,
Helena
Hi Helena, this is caused by genes that have 0 reads across every cell provided to the function. These genes can be removed by filtering genes that have 0 total reads (rows that sum to 0).
Thank you for your quick response! Actually, I had already removed genes with 0 reads for every cell, could it be that this applies if a majority of cells (like, 80% of cells instead of 100% cells) have a 0 read count?
Apologies, I was incorrect in the original response. This error is due to having zero reads across all genes for a given cell. These can be found by columns that sum to 0.
Thanks again Brandon! After going through my code, I'm thinking that the source of the error is the snRNA dataset I'm using as a reference. I've been re-reading your nature communications paper and I see that you used the Seurat package to further process the CellRanger output. I was trying to run BisqueRNA directly on the raw output (which has very sparse coverage) so that might be the real issue at play.
Thanks again for being so responsive!
Helena