An open API service indexing awesome lists of open source software.

https://github.com/noriakis/scstruc

Evaluation of gene regulatory network based on Bayesian network structure in single-cell transcriptomics
https://github.com/noriakis/scstruc

bayesian-network single-cell structure-learning

Last synced: 4 months ago
JSON representation

Evaluation of gene regulatory network based on Bayesian network structure in single-cell transcriptomics

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
fig.dev = "grDevices::png",
dpi = 300L,
dev.args = list(),
fig.ext = "png",
fig.height=8,
fig.width=12,
fig.retina = 2L,
fig.align = "center"
)
```

# scstruc

The package for analysing the gene regulatory network based on Bayesian network structure of single-cell transcriptomics data. The function works primarily with `SingleCellExperiment`. Multiple algorithms tailored for single-cell transcriptomics data are prepared. The inferred networks are validated based on the causal relationships between genes.

[![R-CMD-check](https://github.com/noriakis/scstruc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/noriakis/scstruc/actions/workflows/R-CMD-check.yaml)

## Installation

Using `devtools`:

```{r, eval=FALSE}
devtools::install_github("noriakis/scstruc")
```

## Documentation

The documentation is available [here](https://noriakis.github.io/software/scstruc).

## Examples

Based on `SingleCellExperiment`, the network is inferred and plotted.

```{r message=FALSE, warning=FALSE, fig.width=12, fig.height=12}
library(scran)
library(scstruc)
library(ggraph)
library(bnlearn)
sce <- mockSCE()
sce <- logNormCounts(sce)
included_genes <- sample(row.names(sce), 100)
gs <- scstruc(sce, included_genes, changeSymbol=FALSE)
plotNet(gs$net, gs$data, showText=FALSE)
```

Using bootstrapping, the averaged network is obtained. This time, `L1MB` algorithm with the selection of neighbors based on BIC is used.

```{r message=FALSE, warning=FALSE, fig.width=8, fig.height=8}
library(glmnet)
gs2 <- scstruc(sce, included_genes, algorithm="glmnet_BIC", boot=TRUE,
changeSymbol=FALSE, R=20)
plotAVN(gs2$net, sizeRange=c(1,3))
```