R package for integrating and analyzing multiple single-cell datasets
Switch branches/tags
Clone or download
MacoskoLab Merge pull request #52 from MacoskoLab/update-readme
Fix non updated pbmc walkthrough html
Latest commit 8acbb42 Nov 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
docs Clean up liger image Oct 30, 2018
inst/java Added SNF functionality, as.seurat, and umap functionality, and tweak… May 14, 2018
man Merge pull request #50 from MacoskoLab/update-readme Nov 1, 2018
src Remove unnecessary C++ files and include attribution Oct 30, 2018
vignettes Fix non updated pbmc walkthrough html Nov 1, 2018
.Rbuildignore
.gitignore Update gitignore Oct 31, 2018
DESCRIPTION Add license to DESCRIPTION Oct 30, 2018
LICENSE Create LICENSE file Oct 30, 2018
NAMESPACE Update DESCRIPTION NAMESPACE Rproj and Rcpp export files Oct 6, 2018
README.md Fix pbmc_walkthrough reference in README Oct 30, 2018
_config.yml Set theme jekyll-theme-minimal Oct 19, 2018
liger.Rproj Update DESCRIPTION NAMESPACE Rproj and Rcpp export files Oct 6, 2018

README.md

LIGER (Linked Inference of Genomic Experimental Relationships)

LIGER (liger) is a package for integrating and analyzing multiple single-cell datasets, developed and maintained by the Macosko lab. It relies on integrative non-negative matrix factorization to identify shared and dataset-specific factors.

LIGER can be used to compare and contrast experimental datasets in a variety of contexts, for instance:

  • Across experimental batches
  • Across individuals
  • Across sex
  • Across tissues
  • Across species (e.g., mouse and human)
  • Across modalities (e.g., scRNAseq and spatial transcriptomics data, scMethylation, or scATAC-seq)

Once multiple datasets are integrated, the package provides functionality for further data exploration, analysis, and visualization. Users can:

  • Identify clusters
  • Find significant shared (and dataset-specific) gene markers
  • Compare clusters with previously identified cell types
  • Visualize clusters and gene expression using t-SNE and UMAP

We have also designed LIGER to interface with existing single-cell analysis packages, including Seurat.

Usage

For usage examples and guided walkthroughs, check the vignettes directory of the repo.

Installation

liger is written in R and has a few other system requirements (Java) and recommended packages (umap in Python). To install the most recent development version, follow these instructions:

  1. Install R (>= 3.4)
  2. Install Rstudio (recommended)
  3. Make sure you have Java installed in your machine. Check by typing java -version into Terminal or CommandPrompt.
  4. Use the following R commands.
install.packages('devtools')
library(devtools)
install_github('MacoskoLab/liger')

Additional Installation Steps for MacOS (recommended before step 4)

Installing RcppArmadillo on R>=3.4 requires Clang >= 4 and gfortran-6.1. Follow the instructions below if you have R version 3.4.0-3.4.4. These instructions (using clang4) may also be sufficient for R>=3.5 but for newer versions of R, it's recommended to follow the instructions in this post.

  1. Install gfortran as suggested here
  2. Download clang4 from this page
  3. Uncompress the resulting zip file and type into Terminal (sudo if needed):
mv /path/to/clang4/ /usr/local/ 
  1. Create .R/Makevars file containing following:
# The following statements are required to use the clang4 binary
CC=/usr/local/clang4/bin/clang
CXX=/usr/local/clang4/bin/clang++
CXX11=/usr/local/clang4/bin/clang++
CXX14=/usr/local/clang4/bin/clang++
CXX17=/usr/local/clang4/bin/clang++
CXX1X=/usr/local/clang4/bin/clang++
LDFLAGS=-L/usr/local/clang4/lib

For example, use the following Terminal commands:

cd ~
mkdir .R
cd .R 
nano Makevars

Paste in the required text above and save with Ctrl-X.

Detailed Instructions for FIt-SNE Installation for use in runTSNE (recommended for large datasets)

Using FIt-SNE is recommended for computational efficiency when using runTSNE on very large datasets. Installing and compiling the necessary software requires the use of git, FIt-SNE, and FFTW. For a basic overview of installation, visit this page.

Basic installation for most Unix machines can be achieved with the following commands after downloading the latest version of FFTW from here. In the fftw directory, run:

./configure
make
make install

(Additional instructions if necessary). Then in desired directory:

git clone https://github.com/KlugerLab/FIt-SNE.git
cd FIt-SNE
g++ -std=c++11 -O3  src/sptree.cpp src/tsne.cpp src/nbodyfft.cpp  -o bin/fast_tsne -pthread -lfftw3 -lm
pwd

Use the output of pwd as the fitsne.path parameter in runTSNE.