https://github.com/jgasmits/ananseseurat
Single cell ANANSE Gene-regulatory-network analysis from Seurat objects
https://github.com/jgasmits/ananseseurat
grn-analysis r seurat-objects single-cell single-cell-atac-seq single-cell-rna-seq
Last synced: 25 days ago
JSON representation
Single cell ANANSE Gene-regulatory-network analysis from Seurat objects
- Host: GitHub
- URL: https://github.com/jgasmits/ananseseurat
- Owner: JGASmits
- License: apache-2.0
- Created: 2022-08-11T14:45:43.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-12T12:38:00.000Z (over 1 year ago)
- Last Synced: 2025-04-28T02:05:48.222Z (about 1 month ago)
- Topics: grn-analysis, r, seurat-objects, single-cell, single-cell-atac-seq, single-cell-rna-seq
- Language: R
- Homepage:
- Size: 620 KB
- Stars: 8
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%"
)
```
# `AnanseSeurat` package[](https://github.com/JGASmits/AnanseSeurat/actions/workflows/R-CMD-check.yaml)
[](https://codecov.io/github/JGASmits/AnanseSeurat)
[](https://cran.r-project.org/package=AnanseSeurat)The `AnanseSeurat` package takes pre-processed clustered single cell objects of scRNAseq and scATACseq or a multiome combination, and generates files for gene regulatory network (GRN) analysis.
## Installation
`AnanseSeurat` can be installed using
```{r, eval=FALSE}
library(devtools) # Tools to Make Developing R Packages Easier # Tools to Make Developing R Packages Easier
Sys.unsetenv("GITHUB_PAT")
remotes::install_github("JGASmits/AnanseSeurat@main")
```### Usage
```{r eval=FALSE}
library("AnanseSeurat")
rds_file <- './scANANSE/preprocessed_PDMC.Rds'
pbmc <- readRDS(rds_file)
```Next you can output the data from your single cell object, the file format, config file and sample file are all ready to automate GRN analysis using `anansnake`.
https://github.com/vanheeringen-lab/anansnake```{r, eval=FALSE}
export_CPM_scANANSE(
pbmc,
min_cells = 25,
output_dir = './scANANSE/analysis',
cluster_id = 'predicted.id',
RNA_count_assay = 'RNA'
)export_ATAC_scANANSE(
pbmc,
min_cells = 25,
output_dir = './scANANSE/analysis',
cluster_id = 'predicted.id',
ATAC_peak_assay = 'peaks'
)# Specify additional contrasts:
contrasts <- c('B-naive_B-memory',
'B-memory_B-naive',
'B-naive_CD14-Mono',
'CD14-Mono_B-naive')config_scANANSE(
pbmc,
min_cells = 25,
output_dir = './scANANSE/analysis',
cluster_id = 'predicted.id',
additional_contrasts = contrasts
)DEGS_scANANSE(
pbmc,
min_cells = 25,
output_dir = './scANANSE/analysis',
cluster_id = 'predicted.id',
additional_contrasts = contrasts
)
```### install and run anansnake
Follow the instructions its respective github page, https://github.com/vanheeringen-lab/anansnake
After activating the conda environment, use the generated files to run GRN analysis using your single cell cluster data:```{bash eval=FALSE}
anansnake \
--configfile scANANSE/analysis/config.yaml \
--resources mem_mb=48_000 --cores 12
```### import ANANSE results back to your single cell object
After running Anansnake, you can import the TF influence scores back into your single cell object of choice
```{r eval=FALSE}
pbmc <- import_seurat_scANANSE(pbmc,
cluster_id = 'predicted.id',
anansnake_inf_dir = "./scANANSE/analysis/influence")
TF_influence <- per_cluster_df(pbmc,
cluster_id = 'predicted.id',
assay = 'influence')
```### Thanks to:
* Julian A. Arts and his Pycharm equivalent of this package https://github.com/Arts-of-coding/AnanseScanpy
* Siebren Frohlich and his anansnake implementation https://github.com/vanheeringen-lab/anansnake
* Rebecca R. Snabel for her implementation of the motif expression correlation analysis
* Branco Heuts for testing# Credits
The hex sticker is generated using the [```hexSticker```](https://github.com/GuangchuangYu/hexSticker) package.