cargo
Rust package manager (36 subcommands).
Gene correlation network analysis bridging WGCNA, pgmpy Bayesian networks, and monad-bayes posterior inference. Connects zubyul's genomics background to the plurigrid interactome via HyperNetX hypergraph topology.
Full skill instructions
Scale-free gene modules as Bayesian hypergraphs
Yuliya Zubak (zubyul) built WGCNA pipelines for weighted gene correlation network analysis and processed large genetic sequence data in the Jonikas lab.
Yuliya Zubak (zubyul) built WGCNA pipelines for weighted gene correlation network analysis and processed large genetic sequence data in the Jonikas lab. Repos: zubyul/WGCNA, zubyul/jonikas_lab_data_analysis_misc.
origin/main
TracedT (WeightedT SamplerIO) for posterior over network topologies<<<<<<< HEAD
=======
origin/main
<<<<<<< HEAD
-- Posterior over WGCNA module assignments
moduleAssignment :: MonadMeasure m => Int -> m (Vector ModuleID)
moduleAssignment nGenes = do
-- Prior: Dirichlet-Multinomial over module labels
weights <- dirichlet (replicate nModules 1.0)
assignments <- replicateM nGenes (categorical weights)
-- Likelihood: within-module correlation > between-module
=======
## Bayesian Module Assignment
```haskell
moduleAssignment :: MonadMeasure m => Int -> m (Vector ModuleID)
moduleAssignment nGenes = do
weights <- dirichlet (replicate nModules 1.0)
assignments <- replicateM nGenes (categorical weights)
>>>>>>> origin/main
forM_ (pairs assignments) $ \(i, j) ->
if sameModule i j
then factor (Exp (log (correlation i j)))
else factor (Exp (log (1 - correlation i j)))
return assignments
<<<<<<< HEAD
| Component | Trit | Role |
|---|---|---|
| WGCNA eigengenes | +1 | Generation (data -> modules) |
| pgmpy BN learning | 0 | Coordination (structure) |
| monad-bayes posterior | -1 | Validation (model selection) |
Conservation: +1 + 0 + (-1) = 0
=======
# WGCNA analysis pipeline
git clone https://github.com/zubyul/WGCNA.git /Users/alice/v/zubyul-wgcna
# Jonikas lab data processing
git clone https://github.com/zubyul/jonikas_lab_data_analysis_misc.git /Users/alice/v/zubyul-jonikas
Learn the regulatory DAG over module eigengenes discovered by WGCNA:
# pip install pgmpy pandas numpy
import pandas as pd
import numpy as np
from pgmpy.estimators import HillClimbSearch, BicScore
from pgmpy.models import BayesianNetwork
from pgmpy.estimators import MaximumLikelihoodEstimator
np.random.seed(42)
# Simulated WGCNA module eigengenes (replace with real eigengene matrix from R)
# Columns = module colors (WGCNA convention), rows = samples
n_samples = 200
eigengenes = pd.DataFrame({
'ME_blue': np.random.randn(n_samples),
'ME_brown': np.random.randn(n_samples),
'ME_turquoise': np.random.randn(n_samples),
'ME_green': np.random.randn(n_samples),
'ME_yellow': np.random.randn(n_samples),
})
# Inject causal structure: blue -> brown, turquoise -> green, blue -> yellow
eigengenes['ME_brown'] += 0.6 * eigengenes['ME_blue']
eigengenes['ME_green'] += 0.5 * eigengenes['ME_turquoise']
eigengenes['ME_yellow'] += 0.4 * eigengenes['ME_blue'] + 0.3 * eigengenes['ME_turquoise']
# Discretize for BN (or use linear Gaussian BN)
discretized = eigengenes.apply(lambda col: pd.cut(col, bins=3, labels=['low','mid','high']))
# Hill Climb structure learning with BIC scoring
hc = HillClimbSearch(discretized)
best_model = hc.estimate(scoring_method=BicScore(discretized), max_indegree=3)
print("Learned DAG edges (regulatory relationships):")
for edge in best_model.edges():
print(f" {edge[0]} -> {edge[1]}")
# Fit parameters
bn = BayesianNetwork(best_model.edges())
bn.fit(discretized, estimator=MaximumLikelihoodEstimator)
print(f"\nNodes: {bn.nodes()}")
print(f"Edges: {bn.edges()}")
Construct a hypergraph where each WGCNA module is a hyperedge containing its member genes:
# pip install hypernetx matplotlib
import hypernetx as hnx
import matplotlib.pyplot as plt
# Gene-to-module assignments from WGCNA (replace with real output)
# Each module (hyperedge) contains multiple genes (nodes)
module_membership = {
'blue': ['BDNF', 'SLC6A4', 'HTR2A', 'FKBP5', 'NR3C1'],
'brown': ['COMT', 'MAOA', 'DRD2', 'DRD4', 'SLC6A3'],
'turquoise': ['DISC1', 'NRG1', 'DTNBP1', 'CACNA1C', 'ANK3', 'TCF4'],
'green': ['NTRK2', 'CREB1', 'ARC', 'HOMER1'],
'yellow': ['SLC6A4', 'TPH2', 'MAOA', 'HTR1A'], # note: SLC6A4, MAOA overlap
}
H = hnx.Hypergraph(module_membership)
# Basic topology
print(f"Nodes (genes): {H.number_of_nodes()}")
print(f"Hyperedges (modules): {H.number_of_edges()}")
# Genes shared across modules (hub genes / overlapping membership)
for node in H.nodes():
memberships = H.nodes.memberships[node]
if len(memberships) > 1:
print(f" Hub gene {node} in modules: {memberships}")
# Compute s-adjacency: two modules are s-adjacent if they share >= s genes
for s in [1, 2]:
adj = H.adjacency_matrix(s=s)
print(f"\n{s}-adjacency matrix (modules sharing >= {s} genes):")
print(adj.todense())
# Visualize
hnx.drawing.draw(H, with_node_labels=True, with_edge_labels=True)
plt.title("WGCNA Gene Module Hypergraph")
plt.savefig("/tmp/gene_module_hypergraph.png", dpi=150, bbox_inches='tight')
print("Hypergraph saved to /tmp/gene_module_hypergraph.png")
Bridge R WGCNA output into Python:
# After running WGCNA in R, export eigengenes:
# write.csv(MEs, "module_eigengenes.csv", row.names=TRUE)
import pandas as pd
eigengenes = pd.read_csv("/Users/alice/v/zubyul-wgcna/output/module_eigengenes.csv", index_col=0)
print(f"Loaded {eigengenes.shape[1]} module eigengenes for {eigengenes.shape[0]} samples")
print(eigengenes.head())
origin/main
Rust package manager (36 subcommands).
Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...
**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...
Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations
Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.
Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.
Topological soliton detection and agency bridge with anyonic fusion algebra for concept composition
PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.
Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.
Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.
World C Skill
Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience