-
Notifications
You must be signed in to change notification settings - Fork 23
there were an error in testNhoods() #364
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&rdqu 8000 o;, 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
Comments
When using the example code from the official website, I encountered an error as shown above. The same error persists when using my own data. 构建miloR对象scRNA1 <- Milo(scRNA1) scRNA1 <- countCells(scRNA1, meta.data = data.frame(colData(scRNA1)), samples="orig.ident") traj_design <- data.frame(colData(scRNA1))[,c("orig.ident", "Group")] Reorder rownames to match columns of nhoodCounts(milo)traj_design <- traj_design[colnames(nhoodCounts(scRNA1)), , drop=FALSE] traj_design scRNA1 <- calcNhoodDistance(scRNA1, d=30) error as follow:
I want to know where the error is in my code. I've downloaded and installed the latest version of MiloR from GitHub, but the issue still persists. What modifications do I need to make to my code? |
If you don't include the output from sessionInfo() I can't help you. |
sessionInfo() as follow:
Matrix products: default locale: time zone: Asia/Shanghai attached base packages: loaded via a namespace (and not attached): Thank you |
when i library all packages,i got sessionInfo() as follow:
Matrix products: default locale: time zone: Asia/Shanghai attached base packages: other attached packages: loaded via a namespace (and not attached): |
I'd strongly recommend updating to latest R (4.4.3) and Bioconductor (3.20) - the version of Milo you have is not the latest. |
The version of miloR I am using is 2.1.3, downloaded the package from website at https://github.com/MarioniLab/miloR. May I ask where to download the latest version of miloR, and what is the latest version number? |
As it says on the repo landing page:
You need to update Bioconductor to the latest version: https://www.bioconductor.org/install/ |
Thank you |
code as follow: da_results %>% plotUMAP(scRNA1) + plotNhoodGraphDA(scRNA1, da_results, alpha=0.05) +
ggplot(da_results, aes(PValue)) + geom_histogram(bins=50) scRNA1 <- buildNhoodGraph(scRNA1) results as follow:
|
I found this issue (Error in scale_color_gradient2()) in (#321), so I tried to solve it according to issue 321, but the problem wasn't resolved. I have raised the error issue again in issue 321. |
Describe the bug
There were an error in testNhoods(),would you help me?
Minimum code example
Minimum example to reproduce the error
devtools::install_local("github/miloR-master.zip")
library(stringr)
library(Seurat)
library(miloR)
library(SingleCellExperiment)
library(scater)
library(dplyr)
library(patchwork)
data("sim_trajectory",package="miloR")
traj_sce<-sim_trajectory[['SCE']]
traj_meta<-sim_trajectory[["meta"]]
colData(traj_sce)<-DataFrame(traj_meta)
logcounts(traj_sce)<-log(counts(traj_sce)+1)
traj_sce<-runPCA(traj_sce,ncomponents=30)
traj_sce<-runUMAP(traj_sce)
plotUMAP(traj_sce)
traj_milo<-Milo(traj_sce)
reducedDim(traj_milo,"UMAP")<-reducedDim(traj_sce,"UMAP")
traj_milo
traj_milo<-buildGraph(traj_milo,k=10,d=30)
traj_milo<-makeNhoods(traj_milo,prop=0.1,k=10,d=30,refined=TRUE)
plotNhoodSizeHist(traj_milo)
traj_milo<-countCells(traj_milo,meta.data=data.frame(colData(traj_milo)),samples="Sample")
head(nhoodCounts(traj_milo))
traj_design<-data.frame(colData(traj_milo))[,c("Sample","Condition")]
traj_design<-distinct(traj_design)
rownames(traj_design)<-traj_design$Sample
traj_design<-traj_design[colnames(nhoodCounts(traj_milo)),,drop=FALSE]
traj_design
traj_milo<-calcNhoodDistance(traj_milo,d=30)
rownames(traj_design)<-traj_design$Sample
da_results<-testNhoods(traj_milo,design=~Condition,design.df=traj_design)
Full error traceback
Session info
Output of
sessionInfo()
The text was updated successfully, but these errors were encountered: