Example Gallery

Explore practical BioLang examples organized by domain. Each category contains complete, runnable code that you can copy into your projects or use as learning material. From quick one-liners to full analysis workflows, these examples demonstrate idiomatic BioLang patterns.

Looking for complete analyses?

This gallery teaches individual techniques. Complete real-data analyses, notebooks, practical books, courses, benchmarks, and independent R/Python validation live in the separate BioLang Workflows repository.

Explore applied workflows →

How to Use These Examples

Every code block on these pages is a complete, runnable snippet. Copy any example and run it directly with bl run:

# Save an example to a file
bl run my_example.bl

# Or pipe directly
echo 'dna"ATCG" |> reverse_complement |> print' | bl run -

Examples that require input files will note the expected format. Most use built-in sample data or generate synthetic data for demonstration purposes.

Contributing Examples

Have a useful BioLang snippet or complete analysis? Applied examples are maintained in the examples directory of the BioLang Workflows repository. Submit a pull request there and it will be checked independently of the language runtime.