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.

Research Workflows

End-to-end research scenarios that mirror real-world bioinformatics studies. Each workflow combines data processing, statistical analysis, database queries, and publication-quality visualizations into a single self-contained script.

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? Examples are maintained in the examples/ directory of the BioLang repository. Submit a pull request with your example and it will be reviewed for inclusion in this gallery.