labarchive-integration
Electronic lab notebook API integration. Access notebooks, manage entries/attachments, backup notebooks, integrate with Protocols.io/Jupyter/REDCap, for programmatic ELN workflows.
arboreto
Gene regulatory network inference with GRNBoost2/GENIE3 algorithms. Infer TF-target relationships from expression data, scalable with Dask, for scRNA-seq and GRN analysis.
Full skill instructions
Arboreto is a Python library for inferring gene regulatory networks (GRNs) from gene expression data using machine learning algorithms. It enables scalable GRN inference from single machines to multi-node clusters using Dask for distributed computing. The skill provides comprehensive support for both GRNBoost2 (fast gradient boosting) and GENIE3 (Random Forest) algorithms.
This skill should be used when:
For standard gene regulatory network inference tasks:
Key considerations:
expression_df.Tseed parameter for reproducible resultsTypical workflow:
import pandas as pd
from arboreto.algo import grnboost2
from arboreto.utils import load_tf_names
# Load expression data (ensure correct orientation)
expression_data = pd.read_csv('expression_data.tsv', sep='\t', index_col=0)
# Optional: Load TF names
tf_names = load_tf_names('transcription_factors.txt')
# Run inference
network = grnboost2(
expression_data=expression_data,
tf_names=tf_names,
seed=42 # For reproducibility
)
# Save results
network.to_csv('network_output.tsv', sep='\t', index=False)
Output format:
['TF', 'target', 'importance']Multiprocessing requirement:
All arboreto code must include if __name__ == '__main__': protection due to Dask's multiprocessing requirements:
if __name__ == '__main__':
# Arboreto code goes here
network = grnboost2(expression_data=expr_data, seed=42)
GRNBoost2 (Recommended for most cases):
arboreto.algo.grnboost2()GENIE3:
arboreto.algo.genie3()When to compare both algorithms:
Use the provided compare_algorithms.py script when:
Local execution (default): Arboreto automatically creates a local Dask client. No configuration needed:
network = grnboost2(expression_data=expr_data)
Custom local cluster (recommended for better control):
from dask.distributed import Client, LocalCluster
# Configure cluster
cluster = LocalCluster(
n_workers=4,
threads_per_worker=2,
memory_limit='4GB',
diagnostics_port=8787 # Dashboard at http://localhost:8787
)
client = Client(cluster)
# Run inference
network = grnboost2(
expression_data=expr_data,
client_or_address=client
)
# Clean up
client.close()
cluster.close()
Distributed cluster (multi-node): On scheduler node:
dask-scheduler --no-bokeh
On worker nodes:
dask-worker scheduler-address:8786 --local-dir /tmp
In Python:
from dask.distributed import Client
client = Client('scheduler-address:8786')
network = grnboost2(expression_data=expr_data, client_or_address=client)
Common data format issues:
# If genes are rows, transpose
expression_data = pd.read_csv('data.tsv', sep='\t', index_col=0).T
# Provide gene names if using numpy array
network = grnboost2(
expression_data=expr_array,
gene_names=['Gene1', 'Gene2', 'Gene3', ...],
seed=42
)
# Option 1: Python list
tf_names = ['Sox2', 'Oct4', 'Nanog', 'Klf4']
# Option 2: Load from file (one TF per line)
from arboreto.utils import load_tf_names
tf_names = load_tf_names('tf_names.txt')
Always specify a seed for consistent results:
network = grnboost2(expression_data=expr_data, seed=42)
Without a seed, results will vary between runs due to algorithm randomness.
Understanding the output:
TF: Transcription factor (regulator) genetarget: Target gene being regulatedimportance: Strength of predicted regulatory relationshipTypical post-processing:
# Filter by importance threshold
high_confidence = network[network['importance'] > 10]
# Get top N predictions
top_predictions = network.head(1000)
# Find all targets of a specific TF
sox2_targets = network[network['TF'] == 'Sox2']
# Count regulations per TF
tf_counts = network['TF'].value_counts()
Recommended (via conda):
conda install -c bioconda arboreto
Via pip:
pip install arboreto
From source:
git clone https://github.com/tmoerman/arboreto.git
cd arboreto
pip install .
Dependencies:
Error: TypeError: got an unexpected keyword argument 'host'
Solutions:
dask-scheduler --no-bokeh to disable BokehSymptoms: Worker processes start but fail to establish connections
Solutions:
dask-worker-space directory before restarting workerslocal_dir when creating cluster:cluster = LocalCluster(
worker_kwargs={'local_dir': '/tmp'}
)
Solutions:
memory_limit='8GB'Solution: Always specify a seed parameter:
network = grnboost2(expression_data=expr_data, seed=42)
Solution: Use conda installation to handle numerical library dependencies:
conda create --name arboreto-env
conda activate arboreto-env
conda install -c bioconda arboreto
This skill includes ready-to-use scripts for common workflows:
Command-line tool for standard GRN inference workflow.
Usage:
python scripts/basic_grn_inference.py expression_data.tsv \
-t tf_names.txt \
-o network.tsv \
-s 42 \
--transpose # if genes are rows
Features:
GRN inference with custom Dask cluster configuration.
Usage:
python scripts/distributed_inference.py expression_data.tsv \
-t tf_names.txt \
-w 8 \
-m 4GB \
--threads 2 \
--dashboard-port 8787
Features:
Compare GRNBoost2 and GENIE3 side-by-side.
Usage:
python scripts/compare_algorithms.py expression_data.tsv \
-t tf_names.txt \
--top-n 100
Features:
Detailed API documentation is available in references/api_reference.md, including:
Load this reference when:
Arboreto is the first step in the pySCENIC single-cell analysis pipeline:
GRN Inference (arboreto) ← This skill
Regulon Prediction (pySCENIC)
Cell Type Identification (pySCENIC)
When working with pySCENIC, use arboreto to generate the initial network, then pass results to the pySCENIC pipeline.
if __name__ == '__main__':) in all scriptsBasic inference:
from arboreto.algo import grnboost2
network = grnboost2(expression_data=expr_df, seed=42)
With TF specification:
network = grnboost2(expression_data=expr_df, tf_names=tf_list, seed=42)
With custom Dask client:
from dask.distributed import Client, LocalCluster
cluster = LocalCluster(n_workers=4)
client = Client(cluster)
network = grnboost2(expression_data=expr_df, client_or_address=client, seed=42)
client.close()
cluster.close()
Load TF names:
from arboreto.utils import load_tf_names
tf_names = load_tf_names('transcription_factors.txt')
Transpose data:
expression_df = pd.read_csv('data.tsv', sep='\t', index_col=0).T
Electronic lab notebook API integration. Access notebooks, manage entries/attachments, backup notebooks, integrate with Protocols.io/Jupyter/REDCap, for programmatic ELN workflows.
Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.
Use when completing tasks, implementing major features, or before merging to verify work meets requirements - dispatches superpowers:code-reviewer subagent to review implementation against plan or requirements before proceeding
Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.
Write scientific manuscripts. IMRAD structure, citations (APA/AMA/Vancouver), figures/tables, reporting guidelines (CONSORT/STROBE/PRISMA), abstracts, for research papers and journal submissions.
Direct REST API access to KEGG (academic use only). Pathway analysis, gene-pathway mapping, metabolic pathways, drug interactions, ID conversion. For Python workflows with multiple databases, prefer bioservices. Use this for direct HTTP/REST work or KEGG-specific control.
Execute database migrations across ORMs and platforms with zero-downtime strategies, data transformation, and rollback procedures. Use when migrating databases, changing schemas, performing data transformations, or implementing zero-downtime deployment strategies.
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident ...
Analyze meeting transcripts to extract action items, decisions, key points, and generate summaries
Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patterns, muscle activity, or eye movements. Applicable ...
Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias ...
Master SQL query optimization, indexing strategies, and EXPLAIN analysis to dramatically improve database performance and eliminate slow queries. Use when debugging slow queries, designing database schemas, or optimizing application performance.
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