Skip to content

Commit

Permalink
update and add more Rmd doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mvfki committed Nov 5, 2023
1 parent 2c1d8ce commit 831a8e1
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 281 deletions.
128 changes: 5 additions & 123 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

# LIGER (Linked Inference of Genomic Experimental Relationships)

>Now we have a comprehensive documentation site for the latest development version of [rliger 2.0](https://mvfki.github.io/liger/index.html)!
LIGER (installed as `rliger` ) is a package for integrating and analyzing multiple single-cell datasets, developed by the Macosko lab and maintained/extended by the Welch lab. It relies on integrative non-negative matrix factorization to identify shared and dataset-specific factors.

Check out our [Cell paper](https://doi.org/10.1016/j.cell.2019.05.006) for a more complete description of the methods and analyses. To access data used in our SN and BNST analyses, visit our [study](https://portals.broadinstitute.org/single_cell/study/SCP466) on the
Expand All @@ -30,9 +32,11 @@ We have also designed LIGER to interface with existing single-cell analysis pack
[Seurat](https://satijalab.org/seurat/).

## Feedback

Consider filling out our [feedback form](https://forms.gle/bhvp3K6tiHwf976r8) to help us improve the functionality and accessibility of LIGER.

## Usage

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

* [Iterative Single-Cell Multi-Omic Integration Using Online iNMF](http://htmlpreview.github.io/?https://github.com/welch-lab/liger/blob/master/vignettes/online_iNMF_tutorial.html)
Expand All @@ -49,126 +53,9 @@ For usage examples and guided walkthroughs, check the `vignettes` directory of t

* [Running Liger directly on Seurat objects using Seurat wrappers](https://htmlpreview.github.io/?https://github.com/satijalab/seurat.wrappers/blob/master/docs/liger.html)

## System Requirements

### Hardware requirements
The `rliger` package requires only a standard computer with enough RAM to support the in-memory operations. For minimal performance, please make sure that the computer has at least about 2 GB of RAM. For optimal performance, we recommend a computer with the following specs:

* RAM: 16+ GB
* CPU: 4+ cores, 2.3 GHz/core

### Software requirements

The package development version is tested on *Linux* operating systems and *Mac OSX*.

* Linux: CentOS 7, Manjaro 5.3.18
* Mac OSX: Mojave (10.14.1), Catalina (10.15.2)

The `rliger` package should be compatible with Windows, Mac, and Linux operating systems.

Before setting up the `rliger` package, users should have R version 3.4.0 or higher, and several packages set up from CRAN and other repositories. The user can check the dependencies in `DESCRIPTION`.

## Installation

LIGER is written in R and is also available on the Comprehensive R Archive Network (CRAN). Note that the package name is `rliger` to avoid a naming conflict with an unrelated package. To install the version on CRAN, follow these instructions:

1. Install [R](https://www.r-project.org/) (>= 3.6)
2. Install [Rstudio](https://posit.co/download/rstudio-desktop/) (recommended)
3. Type the following R command:
```
install.packages('rliger')
```
To install the latest development version directly from GitHub, type the following commands instead of step 3:
```
install.packages('devtools')
library(devtools)
install_github('welch-lab/liger')
```
Note that the GitHub version requires installing from source, which may involve additional installation steps on MacOS (see below).

### Additional Steps for Installing LIGER from Source (recommended before step 3)
Installation from CRAN is easy because pre-compiled binaries are available for Windows and MacOS. However, a few additional steps are required to install from source on MacOS/Windows (e.g. Install RcppArmadillo).
(MacOS) Installing RcppArmadillo on R>=3.4 requires Clang >= 4 and gfortran-6.1. For newer versions of R (R>=3.5), it's recommended to follow the instructions in this [post](https://thecoatlessprofessor.com/programming/r-compiler-tools-for-rcpp-on-macos/). Follow the instructions below if you have R version 3.4.0-3.4.4.

1. Install gfortran as suggested [here](https://gcc.gnu.org/wiki/GFortranBinaries)
2. Download clang4 from this [page](https://mac.R-project.org/libs/clang-4.0.0-darwin15.6-Release.tar.gz)
3. Uncompress the resulting zip file and type into Terminal (`sudo` if needed):
```
mv /path/to/clang4/ /usr/local/
```
4. 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`.

### Additional Installation Steps for Online Learning using LIGER
The HDF5 library is required for implementing online learning in LIGER on data files in HDF5 format. It can be installed via one of the following commands:

| System | Command
|:------------------------------------------|:---------------------------------|
|**OS X (using Homebrew or Conda)** | `brew install hdf5` or `conda install -c anaconda hdf5`
|**Debian-based systems (including Ubuntu)**| `sudo apt-get install libhdf5-dev`
|**Systems supporting yum and RPMs** | `sudo yum install hdf5-devel`

For Windows, the latest HDF5 1.12.0 is available at https://www.hdfgroup.org/downloads/hdf5/.

### Detailed Instructions for FIt-SNE Installation
Note that the runUMAP function (which calls the `uwot` package) also scales to large datasets and does not require additional installation steps.
However, using FIt-SNE is recommended for computational efficiency if you want to perform t-SNE 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](https://github.com/KlugerLab/FIt-SNE).

Basic installation for most Unix machines can be achieved with the following commands after downloading
the latest version of FFTW from [here](http://www.fftw.org/). In the fftw directory, run:
```
./configure
make
make install
```
(Additional [instructions](http://www.fftw.org/fftw3_doc/Installation-and-Customization.html) 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.

Note that the above instructions require root access. To install into a specified folder (such as your home directory) on a server, use the `--prefix` option:
```
./configure --prefix=<install_dir>
make
make install
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 -I<install_dir>/include/ -L<install_dir>/lib/ -o bin/fast_tsne -pthread -lfftw3 -lm
pwd
```

### Install Time and Expected Run Time

The installation process of `rliger` should take less than 30 minutes.

The expected run time is 1 - 4 hours depending on dataset size and downstream analysis of the user’s choice.

## Sample Datasets

The `rliger` package provides a small sample dataset for basic demos of the functions. You can find it in folder `liger/tests/testdata/small_pbmc_data.RDS`.

We also provide a set of scRNA-seq and scATAC-seq datasets for real-world style demos. These datasets are as follows:
Expand All @@ -190,8 +77,3 @@ We also provide a set of scRNA-seq and scATAC-seq datasets for real-world style
* scATAC and scRNA data provided by 10X Genomics. The data sources are:
+ `pbmc.atac.expression.mat.RDS`: raw data can be accessed [here](https://support.10xgenomics.com/single-cell-atac/datasets/1.1.0/atac_v1_pbmc_10k), created by Cell Ranger ATAC 1.1.0;
+ `pbmc.rna.expression.mat.RDS`: raw data can be accessed [here](https://support.10xgenomics.com/single-cell-gene-expression/datasets/3.0.0/pbmc_10k_v3), created by Cell Ranger 3.0.0.

Corresponding tutorials can be found in section **Usage** above.

## License
This project is covered under the **GNU General Public License 3.0**.
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ navbar:
title: "rliger"
left:
- text: "Installation"
href: #
href: articles/installation.html
- text: "Tutorials"
menu:
- text: "Integrating multiple scRNAseq data"
Expand Down
Loading

0 comments on commit 831a8e1

Please sign in to comment.