Skip to content

Code for further development of the mutual nearest neighbours batch correction method, as implemented in the batchelor package.

Notifications You must be signed in to change notification settings

MarioniLab/FurtherMNN2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Further MNN algorithm development

Overview

This repository contains code for further development of the mutual nearest neighbours (MNN) batch correction method, as implemented in the mnnCorrect and fastMNN functions in the batchelor package. It is based on the code at https://github.com/MarioniLab/MNN2017, which accompanies the paper Batch effects in single-cell RNA-sequencing data are corrected by matching mutual nearest neighbors by Haghverdi et al. (2018).

More details on practical usage can be found in the documentation for each function, as well as in the OSCA book - specifically in the Data Integration chapter and several workflows like the merged pancreas workflow.

Simulations

To run the simulations, enter the simulations/ directory and run:

  • cluster_sim.R, which simulates a variety of scenarios involving orthogonal batch effects.
  • nonorth_sim.R, which simulates some pathological non-orthogonal batch effects.

Real data

Three real data analyses are available - haematopoiesis, pancreas and droplet. Each subdirectory will usually contain:

  • prepare.Rmd, to download, pre-process and normalize the data.
  • correct.Rmd, to perform the batch correction and visualize the result with t-SNE plots.

Data file downloads are performed using the BiocFileCache package to save time and bandwidth. This will cache the files locally after the initial download, and reuse the cached versions when the script is re-run.

About

Code for further development of the mutual nearest neighbours batch correction method, as implemented in the batchelor package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages