Giter VIP home page Giter VIP logo

milode-octo-computing-machine's Introduction

miloDE

Framework for sensitive DE testing (using neighbourhoods).

miloDE builds on an existing framework for DA testing called Milo. It exploits the notion of overlapping neighborhoods of homogeneous cells, constructed from graph-representation of scRNA-seq data, and performs testing within each neighborhood. Multiple testing correction is performed either across neighborhoods or across genes.

Please see the preprint for greater details.

In addition to DE testing, we provide functionality to rank neighbourhoods by degree of the DE as well as plotting functions to visualise results. In the vignette, we showcase how you can carry out clustering analysis to group genes in co-regulated transcriptional modules.

Installation

# Install development version:
library(devtools)
devtools::install_github("MarioniLab/miloDE") 
library(miloDE)

*Note*: if you have troubles installing miloDE directly, try first to install miloR:
BiocManager::install('miloR')

## If you plan to use parallelisation (desired for big datasets), 
please load `BiocParallel` and enable milticore parallel evaluation:
library(BiocParallel)
ncores = MY_NCORES
mcparam = MulticoreParam(workers = ncores)
register(mcparam)


## Not an immediate functionality of miloDE, but we illustrate in our vignette how to adapt WGCNA 
approach to discover DE patterns and co-regulated gene modules. 
If you want to perform similar analysis, please install Seurat and scWGCNA:
install.packages('Seurat')
devtools::install_github("cferegrino/scWGCNA", ref="main")


Pipeline

  1. Input. The input of miloDE is scRNA-seq data, provided as SingleCellExperiment object. Additionally, we require that:
  • Latent dimensions (used for graph construction) are pre-computed and stored in reducedDim(sce).
  • colData(sce) has to contain metadata corresponding assigning cells to individual replicates (passed to sample_id) and tested condition (e.g. healthy or disease, passed to condition_id).

You can explore toy data here:

data("sce_mouseEmbryo", package = "miloDE")
print(sce_mouseEmbryo)
# `pca.corrected` in reducedDim(sce) - PCs that we will use for graph construction

head(colData(sce_mouseEmbryo))
# `tomato` corresponds to condition id  
# `sample` corresponds to individual replicates. There are 2 samples per each condition:
table(colData(sce_mouseEmbryo)[,c('sample','tomato')])

  1. Neighbourhood assignment: First step is to assign neighbourhoods using graph representation of scRNA-seq data'

sce_mouseEmbryo = assign_neighbourhoods(sce_mouseEmbryo, k = 20, order = 2, 
                                        filtering = TRUE, reducedDim_name = "pca.corrected")

  1. DE testing: Once neighbourhoods are assigned, we can carry out DE testing. Output is returned in either data.frame or SingleCellExperiment format. For each tested gene-neighbourhood, we return logFC, pvalue, pvalue corrected across genes and pvalue corrected across nhoods. We also return boolean flag if test is performed.

de_stat = de_test_neighbourhoods(sce_mouseEmbryo , sample_id = "sample", 
                                 design = ~tomato, covariates = c("tomato"))


Vignette

Please check the vignette to grasp additional functions aiding interpretation and analysis of miloDE output.

Effect of Tal1 knock out on mouse development.

milode-octo-computing-machine's People

Contributors

amissarova avatar emdann avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.