Skip to content

there were an error in testNhoods() #364

@herong2006

Description

@herong2006

Describe the bug
There were an error in testNhoods(),would you help me?

Minimum code example
Minimum example to reproduce the error

## your code

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

## the error

traj_design
Sample Condition
B_R1 B_R1 B
A_R1 A_R1 A
A_R2 A_R2 A
B_R2 B_R2 B
B_R3 B_R3 B
A_R3 A_R3 A
traj_milo<-calcNhoodDistance(traj_milo,d=30)
rownames(traj_design)<-traj_design$Sample
da_results<-testNhoods(traj_milo,design=~Condition,design.df=traj_design)
Using TMM normalisation
Performing spatial FDR correction withk-distance weighting
Error in testNhoods(traj_milo, design = ~Condition, design.df = traj_design) :
lazy-load database 'C:/Users/ASUS/AppData/Local/R/win-library/4.3/miloR/R/miloR.rdb' is corrupt
此外: Warning messages:
1: In testNhoods(traj_milo, design = ~Condition, design.df = traj_design) :
重新评估被中断的许诺
2: In testNhoods(traj_milo, design = ~Condition, design.df = traj_design) :
internal error -3 in R_decompress1

Session info
Output of sessionInfo()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions