# Bioconductor Bionar

The R package BioNAR, developed to step by step analysis of PPI network.

- Repository: https://github.com/bioMate-AI/biomate-bioconductor-kb (793 stars)
- Category: Engineering
- License: see repository
- Last updated: 2026-06-20
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-bionar -g -a claude-code -y`
Codex: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-bionar -g -a codex -y`
Cursor: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-bionar -g -a cursor -y`
Gemini CLI: `npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-bionar -g -a gemini-cli -y`

## Description

the R package BioNAR, developed to step by step analysis of PPI network. The aim is to quantify and rank each protein’s simultaneous impact into multiple complexes based on network topology and clustering. Package also enables estimating of co-occurrence of diseases across the network and specific clusters pointing towards shared/common mechanisms.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# BioNAR

## Workflows

### Standard Workflow

Build, annotate, and analyze a protein-protein interaction (PPI) network to identify central proteins, functional communities, bridging proteins, and disease/annotation overlaps.

```r
library(BioNAR)

# 1. Build the network from a data frame
file <- system.file("extdata", "PPI_Presynaptic.csv", package = "BioNAR")
tbl <- read.csv(file, sep="\t")
gg <- buildNetwork(tbl)

# 2. Annotate vertices with gene names and diseases
gg <- annotateGeneNames(gg)
afile <- system.file("extdata", "flatfile_human_gene2HDO.csv", package = "BioNAR")
dis <- read.table(afile, sep="\t", skip=1, header=FALSE, strip.white=TRUE, quote="")
gg <- annotateTopOntoOVG(gg, dis)

# 3. Estimate vertex centrality measures
gg <- calcCentrality(gg)
mc <- getCentralityMatrix(gg)

# 4. Fit degree distribution to power law and estimate entropy rate
pFit <- fitDegree(as.vector(igraph::degree(graph=gg)), threads=1, Nsim=5, plot=FALSE)
ent <- getEntropyRate(gg)
SRprime <- getEntropy(gg, maxSr = NULL)

# 5. Perform community detection (clustering) and evaluate modularity
nm <- normModularity(gg, alg = 'louvain')
mem <- calcMembership(gg, alg = 'louvain')
gg <- calcClustering(gg, alg = 'louvain')

# 6. Recluster dense communities
remem <- calcReclusterMatrix(gg, mem, alg = 'louvain', 10)

# 7. Build consensus matrix and evaluate cluster robustness
conmat <- makeConsensusMatrix(gg, N = 5, alg = 'louvain', type = 2, mask = 10, reclust = FALSE)
clrob <- getRobustness(gg, alg = 'louvain', conmat)

# 8. Calculate and plot bridgeness
br <- getBridgeness(gg, alg = 'louvain', conmat)
gg <- calcBridgeness(gg, alg = 'louvain', conmat)
g <- plotBridgeness(gg, alg = 'louvain', VIPs = c('8495', '22999'), Xatt = 'SL')
```
*Input: A data frame of protein-protein interactions. Output: An annotated igraph object with calculated centralities, community memberships, and bridgeness metrics.*

The rest: https://github.com/bioMate-AI/biomate-bioconductor-kb/blob/HEAD/skills/proteomics/bionar/SKILL.md
