Skip to content

shmohammadi86/ACTIONet_legacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Prerequisites

  1. For optimal performance, link this library with the MKL. Please follow this and this links to install MKL on ubuntu-like systems.

  2. For running batch-correction and graph-based clustering (Leiden), you need to install Harmony and NetLibR, respectively.

Installing from the main repository

install.packages("devtools")
devtools::install_github("shmohammadi86/ACTIONet")

Basic Usage

Import single-cell expression

ACTIONet uses SingleCellExperiment (SCE) format to store and manipulate single-cell expression profiles. For convenience, a series of functions have been written as part of the ACTIONet package to import data from different sources:

  • Gene expression matrix: Use import.sce.from.count.matrix(counts, gene.names) to construct an SCE object. Length of the gene.names character vector should match the number of rows in the counts matrix.

  • 10X output folder: Use import.sce.from.10X(input_path), with input_path being the folder that contains the *.mtx.gz file. This function reads can optionally read data generated using Feature Barcoding (Total-Seq) as well. Additional -omic profiles (antibodies, etc.) will be added in the reducedDims() of the SCE object.

  • Seurat object: Use import.sce.from.Seurat(Seurat.obj) to convert a Seurat object to SCE format. This function depends on the Seurat package for conversion.

` Scanpy: Use RPy2 to convert from AnnData to SingleCellExperiment.

Running ACTIONet

Running ACTIONet consists of two consecutive steps: (1) Reduction, and (2) ACTIONet Construction

Reduction

In this step, we preprocess the single-cell profile, stored in SCE format, to be compatible with the ACTIONet framework. This allows for usage of various -omics profiles, as well as to do simultaneous batch-correction (optional). For sc/sn-RNASeq, there are two main options for reduction: (i). Without batch-correction: In this case, you can use the main function reduce.sce(sce) to reduce the single-cell data stored in the sce object. (ii) With batch-correction: There are currently two methods supported within the ACTIONet framework for batch-correction: (a) Harmony, and (b) Mutual Nearest Neighbor (MNN). For the former, please use reduce.and.batch.correct.sce.Harmony(sce, batch.vec), while for the latter you can use reduce.and.batch.correct.sce.MNN(sce, batch.vec) function. In both cases, batch.vec is encodes the batches and must have the same number of elements as the cells in the sce object (ncol(sce)). In all of these functions, if the sce object is not already normalized, you can specify a normalization method by passing the norm.method parameter. Current options are: default (log-normalization), scran, linnorm, scone, SCnorm, DESeq2, TMM, and logCPM.

ACTIONet Construction

The input for this step is the reduced sce object. The main interface to run ACTIONet is through run.ACTIONet(reduced.sce) function. Additional options to consider are:

  • k_max: defines the maximum resolution and is suggested to be set to 20 for most cases, and 30 for deeper analysis and identifying rare cell-types.
  • thread_no: indicates the number of parallel processing threads that are used for parallelization.
  • layout.compactness is a value between [0-100] and controls the overall compactness in the graph layout stage (this can be re-adjusted afterward).

Simple Example

sce = import.sce.from.10X('my_10x_path')
sce = reduce.sce(sce)
ACTIONet.out = run.ACTIONet(sce)

Interactive Exploration

There are a host of different options for visualization and interactive visualization of the ACTIONet output. One of the first entry points that allows simple interface can be accessed as follows:

plot.ACTIONet.interactive(ACTIONet.out)

Tutorials

ACTIONet is a comprehensive all-in-one framework that allows a host of different possible analyses. The following list is being updated as new functionalities are being added:

  1. Hands-on experience with PBMC 10X data
  2. Automated cell annotation using known markers
  3. Multi-resolution network-based clustering
  4. Advanced visualization
  5. Fast and scalable approach for differential analysis of cell states, clusters, and phenotypes
  6. Pathway enrichment analysis -- the easy way
  7. Gene expression imputation and gene-gene correlation analysys
  8. Constructing cell-type/state-specific interactomes