Skip to Content
TutorialsCustom Nodes

Custom Nodes

Create your own reusable nodes with custom code, inputs, and outputs.

Creating a Custom Node

Custom nodes are defined as .md files in the nodes/ directory of your project.

Step 1: Define the Node

Create nodes/normalize_counts.md:

--- title: Normalize Counts language: python inputs: - id: input_0 name: counts outputs: - id: output_0 name: normalized --- import pandas as pd from sklearn.preprocessing import StandardScaler scaler = StandardScaler() normalized = pd.DataFrame( scaler.fit_transform(counts.T).T, index=counts.index, columns=counts.columns ) print(f"Normalized {normalized.shape[0]} genes")

Step 2: Use the Node

The custom node will appear in the nodebar under Custom Nodes. Drag it onto the canvas and connect it like any other node.

Input/Output Configuration

  • inputs — Define named inputs that receive data from upstream nodes
  • outputs — Define named outputs that pass data to downstream nodes
  • Variables matching output names are automatically collected after execution

Supported Languages

LanguageExtensionNotes
Python.pyFull access to scientific Python stack
R.RUses rpy2, in-process execution
Bash.shEnvironment variables from inputs

Example: R Custom Node

Create nodes/run_deseq2.md:

--- title: DESeq2 Analysis language: r inputs: - id: input_0 name: counts - id: input_1 name: metadata outputs: - id: output_0 name: results --- library(DESeq2) dds <- DESeqDataSetFromMatrix(counts, metadata, design = ~condition) dds <- DESeq(dds) results <- results(dds) print(paste("Found", sum(results$padj < 0.05), "significant genes"))

Sharing Custom Nodes

Custom nodes are stored as .md files, making them easy to:

  • Share with collaborators
  • Version control with Git
  • Reuse across projects

That’s it for the tutorials! Check out the Tools and Databases references for more details on what the AI agent can do.

Last updated on