For Linux Users
For the optimal performance on Intel-based architectures, installing Intel Math Kernel Library (MKL) is highly recommended. After installing, make sure MKLROOT is defined by running the setvars script.
Install library dependencies
To install the ACTIONet dependencie on debian-based linux machines, run:
sudo apt-get install libhdf5-dev libsuitesparse-dev
For Mac-based systems, you can use brew instead:
brew install hdf5 suite-sparse
devtoolsThis is the easiest way to install the package, and it automatically installs all package dependencies (except optional packages described below):
install.packages("devtools")
devtools::install_github("shmohammadi86/ACTIONet", ref = "R-release")
This is the more flexible approach and allows for easily pulling the latest updates/changes. This can be done as follows:
R script does not automatically install dependencies. To install all dependencies, run:install.packages(c('Matrix', 'Rcpp', 'RcppArmadillo', 'R.utils', 'hdf5r', 'plotly', 'ggpubr', 'corrplot', 'wordcloud', 'threejs', 'RColorBrewer'))
BiocManager::install(c("SingleCellExperiment", "ComplexHeatmap"))
ACTIONet repository:
If you don't already have git, install it first.On (Debian) Linux-based machines, run:
sudo apt-get install git
For Mac-based machines, run:
brew install git
Now clone a fresh copy of the repository:
git clone https://github.com/shmohammadi86/ACTIONet.git
ACTIONet:
ACTIONet contains many different branchs. For installing the stable version, switch to the R-release branch:cd ACTIONet
git checkout R-release
If you want to install the latest updates, switch to the R-devel branch:
cd ACTIONet
git checkout R-devel
and now you can install ACTIONet using the following command in the ACTIONet directory:
R CMD INSTALL .
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("batchelor")
ACTIONet includes interface to run MNN: reduce.and.batch.correct.sce.fastMNN().
install.packages("devtools")
devtools::install_github("immunogenomics/harmony")
ACTIONet includes interface to run harmony: reduce.and.batch.correct.sce.Harmony().
SingleCellExperiment format. You can instal them using:if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("scater", "scran")
ACTIONet interfaces to scran normalization via normalize.scran() function.
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("Linnorm")
ACTIONet interfaces to scran normalization via normalize.Linnorm() function.
Note If you are using MKL, make sure to properly set the number of threads used prior to running ACTIONet.
Here is a simple example to get you started:
# Download example dataset from the 10X Genomics website
download.file('http://cf.10xgenomics.com/samples/cell-exp/3.0.0/pbmc_10k_v3/pbmc_10k_v3_filtered_feature_bc_matrix.h5', 'pbmc_10k_v3.h5')
require(ACTIONet)
# Run ACTIONet
ace = import.ace.from.10X.h5('pbmc_10k_v3.h5', prefilter = T, min_cells_per_feat = 0.01, min_feats_per_cell = 1000)
ace = reduce.ace(ace)
ace = run.ACTIONet(ace)
# Annotate cell-types
data("curatedMarkers_human")
markers = curatedMarkers_human$Blood$PBMC$Ding2019$marker.genes
annot.out = annotate.cells.using.markers(ace, markers)
ace$celltypes = annot.out$Labels
# Visualize output
plot.ACTIONet(ace, "celltypes", transparency.attr = ace$node_centrality)
# Export results as AnnData
ACE2AnnData(ace, fname = "pbmc_10k_v3.h5ad")
ACTIONet framework introduces an extension of the SingleCellExperiment object that can be closely mapped to AnnData object. In fact, output of ACTIONet in the python implementation is internally stored as as AnnData object, and R ACE objects can be imported from/exported to AnnData using functions AnnData2ACE() and ACE2AnnData() functions, respectively. AnnData objects can be directly loaded into cellxgene package, an open-source viewer for interactive single-cell data visualization. cellxgene can be installed as:
pip install cellxgene
Then to visualize the results of ACTIONet, run:
cellxgene launch pbmc_10k_v3.h5ad
where pbmc_10k_v3.h5ad is the name of the file we exported using ACE2AnnData() function.
ACTIONet with DockerWith Docker, no installation is required and users can directly start experimenting with ACTIONet instantly! Sounds easy, right? Here is how it goes.
Download Docker (if you don't already have, which in most linux distributions you do!)
Run ACTIONet docker:
$ docker run -p 8787:8787 shmohammadi86/actionet
If you wish to access your local data inside the docker, modify the command as:
$ docker run -v /your/data/file/path/:/data -w /data -p 8787:8787 shmohammadi86/actionet
Connect to the RStudio Server through your desktops browser on http://127.0.0.1:8787, and then enter "rstudio" as the username and password when prompted. ACTIONet and all of its dependencies, as well as a few other packages for single-cell analysis, are already installed in this environment for you.
Have a cup of coffee and enjoy running ACTIONet!
You can access ACTIONet tutorials from:
You can also find a step-by-step guide to learning the core functionalities of the ACTIONet framework.
Content type
Image
Digest
Size
5.2 GB
Last updated
almost 6 years ago
docker pull shmohammadi86/actionet