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

Results Changed #313

Open
ShashTrip1 opened this issue Mar 13, 2024 · 2 comments
Open

Results Changed #313

ShashTrip1 opened this issue Mar 13, 2024 · 2 comments

Comments

@ShashTrip1
Copy link

I ran the same code (listed below) on two different occasions and got two very different results with certain idents switching from being up in group A to being up in Group B.

alldata_milo = Milo(as.SingleCellExperiment(alldata))
alldata_milo <- buildGraph(alldata_milo, k = 20, d = 30)
alldata_milo <- makeNhoods(alldata_milo, prop = 0.05, k = 20, d=30, refined = TRUE)
alldata_milo <- countCells(alldata_milo, meta.data = data.frame(colData(alldata_milo)), samples="orig.ident")
alldata_design <- data.frame(colData(alldata_milo))[,c("orig.ident", "Type")]
alldata_design <- distinct(alldata_design)
rownames(alldata_design) <- alldata_design$orig.ident
alldata_design <- alldata_design[colnames(nhoodCounts(alldata_milo)), , drop=FALSE]
alldata_design
alldata_milo <- calcNhoodDistance(alldata_milo, d=30)
rownames(alldata_design) <- alldata_design$orig.ident
da_results <- testNhoods(alldata_milo, design = ~ Type, design.df = alldata_design)
da_results <- annotateNhoods(alldata_milo, da_results, coldata_col = "ident")
#da_results$ident <- ifelse(da_results$ident_fraction < 0.7, "Mixed", da_results$ident)
plotDAbeeswarm(da_results, group.by = "ident")

@MikeDMorgan
Copy link
Member

Did you use set.seed()?

@ShashTrip1
Copy link
Author

ShashTrip1 commented Mar 13, 2024

No, I did not. But I would be surprised if that changed the results that dramatically where only certain idents change which group is upregulated.

For example two of my annotated groups (radial glial cells and angio-macros) switched from logFC of -5 to 5 while the other groups stayed similar (I understand some changes due to different random number).

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

2 participants