ROGUE icon indicating copy to clipboard operation
ROGUE copied to clipboard

Issue caused by No significant gene

Open Rong-ao opened this issue 1 year ago • 3 comments

I got an error Error in expr[i, ] : subscript out of bounds when I was trying to apply function rogue() to my cell clusters. I tried to traced what happened in this function and found an issue in function ent.toli(). This function was used in rogue() code: tmp.res <- ent.toli(tmp.res, tmp.matr, span = span, r = r, n = remove.outlier.n)

In ent.toli(), the issue was caused by code below: sig.gene <- ent %>% dplyr::filter(p.adj < 0.05) %>% dplyr::pull(Gene) ng <- length(sig.gene) expr <- expr[sig.gene,] When I check tmp.res of my cell cluster, I found there is no gene with p.adj < 0.05, causing sig.gene is an empty list and make expr[sig.gene,] an error.

So I have some questions here:

  1. How should I understand no gene with p.adj < 0.05 in a cluster? (I think they are not informative genes...right? I am a little bit confused about 'informative gene' actually.)
  2. The function ent.toli() is to remove outlier cells before calculating ROGUE as you mentioned in code. Is that necessary?
  3. Should I skip ent.toli() step manually when I have this issue?

Thanks for your help! :)

Rong-ao avatar Aug 05 '24 15:08 Rong-ao

getting the same error and confused as to what no gene with p.adj < 0.05 indicates

Felix-Xie avatar Sep 13 '24 09:09 Felix-Xie

@Felix-Xie I tried to manually skip those 3 lines of codes in ent.toli() to avoid this bug, which means that using all genes rather than filtered genes to calculate ROGUE index. It also works. Actually this issue only occured in one cluster with high heterogeneity in my scRNA data, so I guess p.adj < 0.05 indicate the gene expression pattern in one cluster is too noisy than expectation.

Rong-ao avatar Sep 19 '24 12:09 Rong-ao

You can set r = 0.01 or remove.outlier.n = 0 @Felix-Xie @Rong-ao

ackman-github avatar May 30 '25 10:05 ackman-github