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

Error in .subscript.2ary(x, i, j, drop = drop): subscript out of bounds #9492

Open
zhouliping718828 opened this issue Nov 18, 2024 · 0 comments

Comments

@zhouliping718828
Copy link

mCT.keggCompare <- lapply(c('Epithelial', 'Neutrophil', 'Myeloid', 'NK', 'T', 'B', 'Fibroblast'), function(x){
select <- at.meta%>% subset(mCT == x)
Idents(select) <- factor(select$group, levels = c('old', 'young'))

                 result <- FindAllMarkers(select, assay = "RNA", slot = "counts",
                                          min.pct = 0, min.cells.group = 0, 
                                          logfc.threshold = 0, return.thresh = Inf, test.use = "wilcox")
                 result <- result %>% subset(cluster == "old") %>% 
                           # subset(p_val<0.05 & p_val_adj<0.25 & avg_log2FC>0.25) %>% 
                           .[order(-.$avg_log2FC),] %>%
                           transform(mCT = x) %>% 
                           dplyr::rename(c('kegg' = 'gene'))
                 return(result)
               })

I allow this code to analyze my seurat object, the error is as follows, “ Error in .subscript.2ary(x, i, j, drop = drop): subscript out of bounds”please help me analyze the possible reasons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant