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
- Host: GitHub
- URL: https://github.com/noriakis/scstruc
- Owner: noriakis
- License: mit
- Created: 2023-11-03T01:18:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-27T01:16:56.000Z (4 months ago)
- Last Synced: 2025-10-27T03:15:00.765Z (4 months ago)
- Topics: bayesian-network, single-cell, structure-learning
- Language: R
- Homepage:
- Size: 7.27 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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.
[](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))
```