BioContainers Registry
BioLang provides native access to the BioContainers registry — over 9,000 containerized bioinformatics tools with versioned Docker and Singularity images. Search, browse, and inspect tools directly from BioLang with built-in functions. No import needed.
Searching Tools
Use biocontainers_search() to find tools by name or keyword.
Results include the tool name, description, organization, version count,
and the latest image URI:
# Search for samtools
let results = biocontainers_search("samtools")
results |> print()
# => [{ name: "samtools", description: "...", organization: "biocontainers",
# version_count: 42, latest_version: "1.19", latest_image: "quay.io/..." }, ...]
# Search with a result limit
biocontainers_search("bwa", 5) |> print()
# Search for alignment tools
biocontainers_search("alignment") |> print()
Returns a List of Records: {name, description, organization, version_count, latest_version, latest_image}.
Default limit is 25.
Popular Tools
Browse the most popular tools in the registry with biocontainers_popular():
# Get top 20 most popular tools (default)
let popular = biocontainers_popular()
popular |> print()
# Get top 50
biocontainers_popular(50)
|> map(|t| { name: t.name, versions: t.version_count })
|> print()
Returns a List of Records with the same fields as biocontainers_search.
Default limit is 20.
Tool Details
Get detailed metadata for a specific tool with biocontainers_info(),
including all available versions and container images:
# Get full details for samtools
let info = biocontainers_info("samtools")
print(info)
# Access nested version data
print("Latest version:", info.latest_version)
print("Total versions:", info.version_count)
# List all available images for the latest version
info.versions
|> first()
|> get("images")
|> print()
Returns a Record with nested versions and images.
Version Management
List all versions and their container image URIs for a tool with
biocontainers_versions():
# List all versions of gatk4
let versions = biocontainers_versions("gatk4")
versions |> print()
# => [{ version: "4.5.0.0", images: ["quay.io/biocontainers/gatk4:4.5.0.0--...", ...] },
# { version: "4.4.0.0", images: ["quay.io/biocontainers/gatk4:4.4.0.0--...", ...] },
# ...]
# Get the latest version image
let latest = versions |> first()
print("Version:", latest.version)
print("Image:", latest.images |> first())
Returns a List of Records: {version, images}, where
images is a List of URI strings.
Configuration
The BioContainers API URL is configurable via ~/.biolang/apis.yaml
or the BIOLANG_BIOCONTAINERS_URL environment variable.
Builtin Reference
| Function | Args | Returns | Description |
|---|---|---|---|
biocontainers_search |
query, limit? | List<Record> | Search tools by name (default limit 25) |
biocontainers_popular |
limit? | List<Record> | List popular tools (default limit 20) |
biocontainers_info |
tool_name | Record | Detailed tool info with versions and images |
biocontainers_versions |
tool_name | List<Record> | All versions with container image URIs |
Practical Examples
Find Container Images for a Workflow
# Find containers for common variant calling tools
let tools = ["samtools", "bcftools", "gatk4", "bwa-mem2", "deepvariant"]
tools
|> map(|name| {
let versions = biocontainers_versions(name)
let latest = versions |> first()
{ tool: name, version: latest.version, image: latest.images |> first() }
})
|> to_table()
|> print()
Compare Tool Versions
# See how many versions are available for popular tools
biocontainers_popular(10)
|> map(|t| { name: t.name, versions: t.version_count, latest: t.latest_version })
|> sort(.versions)
|> reverse()
|> print()
Search and Inspect a Tool
# Find a tool and get its full details
let results = biocontainers_search("minimap2", 1)
let tool_name = results |> first() |> get("name")
# Get detailed info
let info = biocontainers_info(tool_name)
print("Tool:", info.name)
print("Description:", info.description)
print("Versions available:", info.version_count)
# List the 5 most recent versions
biocontainers_versions(tool_name)
|> take(5)
|> map(|v| { version: v.version, images: v.images |> len() })
|> print()