Skip to content
forked from r3fang/SnapATAC

Analysis Pipeline for Single Cell ATAC-seq

License

Notifications You must be signed in to change notification settings

beyondpie/SnapATAC

 
 

Repository files navigation

SnapATAC Fix Version

snaptools

  • SnapATAC doesn't depend on snaptools. But the snap file that SnapATAC handles is generated snaptools.

  • Use python 2.7 version snaptools

  • Though we can install snaptools on python >= 3.0, snaptools have a binary string habit when encoding/decoding the chromosmes, which lead later mapping could be wrong if we ignore this.

  • When use addBmatToSnap, python2-version snaptools and python3-version snaptools give different colname names. But the matrix is the same. (Only the column order is different, so the matrix is then completely wrong even we align the colnames).

Install under conda enviroment

  1. Set up conda env See https://anaconda.org/beyondpie/snapatac as a reference. Or we can create the conda env below:
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

conda  create -n snapatac python=3.8

conda  activate snapatac
conda  install -c  conda-forge mamba

mamba install -c conda-forge r-base r-essentials
mamba install -c conda-forge r-xml r-terra r-devtools
mamba install -c conda-forge r-sf r-units
mamba install -c conda-forge r-sp r-raster
  1. In R, install SnapATAC.
## Important: do not update any packages especially like terra
## since they are installed by conda not by R

install.packages('remotes', repos = 'http://cran.us.r-project.org')
remotes::install_github(repo = "beyondpie/SnapATAC", ref = "szu")

Install on MacOS

Personnally, I use Brew to maintain the enviroment. I found conda version R may have some issues on MacOS, so later I just skip it.

brew install gdal proj sqlite
## when install terra, I also have "libproj or sqlite3 not found in
## standard or given location" errors.
## From https://github.com/r-spatial/sf/issues/1312
## In R
install.packages(“terra”, type = "source", configure.args = "--with-gdal-config=/usr/local/bin/gdal-config --with-geos-config=/usr/local/bin/geos-config --with-proj-include=/usr/local/include/ --with-proj-lib=/usr/local/lib/ --with-proj-share=/usr/local/share/proj/")
## Maybe this also works: install.packages(“terra”, configure.args = "--with-proj-lib=/usr/local/lib/")
install.packages("doSNOW")
install.packages("plot3D")
## Then we can install SnapATAC in R 
## Add INSTALL_opts --no-lock if having "failed to create lock directory".
remotes::install_github(repo = "beyondpie/SnapATAC", ref = "szu", INSTALL_opts = c("--no-lock"))
## After installation, please double check if `library(SnapATAC)` works. 
## If facing errors of rhdf5 package loading (for example, cannot find some ld), 
## reinstall rhdf5 based on the official website.

Original README:

SnapATAC (Latest Updates: 2019-09-19)

SnapATAC (Single Nucleus Analysis Pipeline for ATAC-seq) is a fast, accurate and comprehensive method for analyzing single cell ATAC-seq datasets.

Latest News

FAQs

Requirements

  • Linux/Unix
  • Python (>= 2.7 & < 3.0) (SnapTools) (highly recommanded for 2.7);
  • R (>= 3.4.0 & < 3.6.0) (SnapATAC) (3.6 does not work for rhdf5 package);

Pre-print

Rongxin Fang, Sebastian Preissl, Xiaomeng Hou, Jacinta Lucero, Xinxin Wang, Amir Motamedi, Andrew K. Shiau, Eran A. Mukamel, Yanxiao Zhang, M. Margarita Behrens, Joseph Ecker, Bing Ren. Fast and Accurate Clustering of Single Cell Epigenomes Reveals Cis-Regulatory Elements in Rare Cell Types. bioRxiv 615179; doi: https://doi.org/10.1101/615179

Installation

SnapATAC has two components: Snaptools and SnapATAC.

  • SnapTools - a python module for pre-processing and working with snap file.
  • SnapATAC - a R package for the clustering, annotation, motif discovery and downstream analysis.

Install snaptools from PyPI. See how to install snaptools on FAQs. NOTE: Please use python 2.7 if possible.

$ pip install snaptools

Install SnapATAC R pakcage (development version).

$ R
> library(devtools)
> install_github("r3fang/SnapATAC")

Galleries & Tutorials (click on the image for details)

About

Analysis Pipeline for Single Cell ATAC-seq

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 99.9%
  • Makefile 0.1%