Comments (6)
hi pitos21,
did you figure it out?
from milor.
from milor.
from milor.
hi pitos21,
try the below (modify based on your metadata)
sc1 <- as.SingleCellExperiment(ALL_B_ao1, assay = "RNA")
sc1_milo <- Milo(sc1)
sc1_milo <- buildGraph(sc1_milo, k = 30, d = 30, reduced.dim = "STANDARDPCA")
sc1_milo <- makeNhoods(sc1_milo, prop = 0.1, k = 30, d=30, refined = TRUE, reduced_dims = "STANDARDPCA")
plotNhoodSizeHist(sc1_milo)
sc1_milo <- countCells(sc1_milo, meta.data = as.data.frame(colData(sc1_milo)), sample="orig.ident")
design <- data.frame(colData(sc1_milo))[,c("orig.ident", "DiseaseState", "Pathologist0_PType")]
design$Pathologist0_PType <- as.factor(design$Pathologist0_PType)
design$DiseaseState <- as.factor(design$DiseaseState)
design$DiseaseState <- relevel(design$DiseaseState, "Normal")
design$DiseaseState
design <- distinct(design)
rownames(design) <- design$orig.ident
sc1_design <- data.frame(colData(sc1_milo))[,c("orig.ident", "DiseaseState")]
sc1_milo <- calcNhoodDistance(sc1_milo, d=30, reduced.dim = "STANDARDPCA")
da_results <- testNhoods(sc1_milo, design = ~ Patho_PType + DiseaseState, design.df = design, reduced.dim = "STANDARDPCA")
da_results %>%
arrange(SpatialFDR) %>%
head()
sc1_milo <- buildNhoodGraph(sc1_milo)
da_results <- annotateNhoods(sc1_milo, da_results, coldata_col = "CellType")
da_results$CellType <- ifelse(da_results$CellType_fraction < 0.7, "Mixed", da_results$CellType)
from milor.
from milor.
@pitos21 @nbutyrate You don't need to compute the nhood distances with calcNhoodDistances
anymore - this has been superseded by the graph-only approach, and is much faster. Use refinement_scheme="graph"
in makeNhoods
and pass fdr.weighting="graph-only"
to testNhoods
.
from milor.
Related Issues (20)
- Cell Condition Relabelling Functionality HOT 3
- Prevention of Neighbourhood Merging of Similar Cell Types into Neighbourhood Groups HOT 1
- Cell type is lost during annotateNhoods HOT 5
- Function Not Found Error HOT 3
- nhood size distribution: some neighbourhoods have over 2000 cells HOT 4
- Progress Bar for GLMM HOT 6
- object 'as.SimpleList' of mode 'function' was not found when running calcNhoodDistance HOT 2
- Multiple comparisons gives identical results by using model.contrasts HOT 12
- Does MiloR take into account that the two compared conditions have different number of cells? HOT 2
- Log10 FC or Log2 FC? HOT 1
- How to use MiloR after subsetting the cell types from total cell types? HOT 4
- Direction of test for logFC calculation HOT 1
- Existence of 2 tuitorials for the "Differential abundance testing with Milo - Mouse gastrulation example" HOT 3
- Import precomputed graph HOT 7
- makeNhoods graph refinement (issue with isolated vertices) HOT 4
- No Significant Neighbourhoods Result is Error HOT 1
- Mass cytometry data HOT 1
- MiloR in spatial transcriptomics data HOT 1
- Gene expression testing of only DA neighborhoods within group?? HOT 3
- Can you implement a complete miloR in python ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from milor.