-
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).
- 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
- 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")
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.
SnapATAC (Single Nucleus Analysis Pipeline for ATAC-seq) is a fast, accurate and comprehensive method for analyzing single cell ATAC-seq datasets.
- SnapATAC links distal elements to putative target genes
- SnapATAC integrates scRNA and scATAC
- SnapATAC employs a new method for dimensionality reduction
- SnapATAC enables clustering using leiden algorithm
- SnapATAC enables batch effect correction
- SnapATAC enables motif analysis using chromVAR
- How to run SnapATAC on 10X dataset?
- I already ran CellRanger, can I use its output for SnapATAC?
- How can I analyze combine multiple samples together?
- How to group reads from any subset of cells?
- What is a snap file?
- How to create a snap file from fastq file?
- 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);
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
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")