Skills

Bioconductor Bionar

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

Install

npx skills add bioMate-AI/biomate-bioconductor-kb --skill bioconductor-bionar -g -a claude-code -y
Category
Engineering
Updated
5mo ago
License
See repository
Context cost
Lightabout 1,156 tokens
Runs scripts
No, instructions only

What it does

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.

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.

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.

Read the whole SKILL.md on GitHub

More in Engineering