Builtins Reference

BioLang ships with 1000+ built-in functions spanning bioinformatics, statistics, data wrangling, visualization, and systems programming. Every function is available without imports — just call it.

Not sure which statistic to use?

Start with Guided Statistics. It explains centre, spread, shape, missingness, transformations, study design, and model checks in plain language while keeping every clue inspectable.

Showing all 1000+ builtins

Name Category Signature Description
printCoreprint(values...) -> nilPrint values to stdout without newline
printlnCoreprintln(values...) -> nilPrint values to stdout with newline
lenCorelen(value) -> intReturn length of string, list, or map
typeCoretype(value) -> stringReturn type name as string
rangeCorerange(start, end, step?) -> listGenerate integer sequence
absCoreabs(n) -> numberAbsolute value
minCoremin(a, b) -> numberReturn smaller of two values
maxCoremax(a, b) -> numberReturn larger of two values
intCoreint(value) -> intCast to integer
floatCorefloat(value) -> floatCast to float
strCorestr(value) -> stringCast to string
boolCorebool(value) -> boolCast to boolean
assertCoreassert cond, msg?Assert condition is truthy or abort
debugCoredebug(value) -> valuePrint debug representation, return value
typeofCoretypeof(value) -> stringAlias for type()
is_nilCoreis_nil(value) -> boolCheck if value is nil
to_stringCoreto_string(value) -> stringConvert any value to its string representation
mapCollectionsmap(list, fn) -> listApply function to each element
filterCollectionsfilter(list, fn) -> listKeep elements where fn returns true
reduceCollectionsreduce(list, fn, init?) -> valueAccumulate list into single value
sortCollectionssort(list) -> listSort in ascending order
sort_byCollectionssort_by(list, fn) -> listSort with custom comparator
pushCollectionspush(list, value) -> listAppend element to end of list
popCollectionspop(list) -> valueRemove and return last element
shiftCollectionsshift(list) -> valueRemove and return first element
zipCollectionszip(a, b) -> listPair elements from two lists
enumerateCollectionsenumerate(list) -> listPair each element with its index
flattenCollectionsflatten(list) -> listFlatten nested lists one level
reverseCollectionsreverse(list) -> listReverse element order
uniqueCollectionsunique(list) -> listRemove duplicate elements
firstCollectionsfirst(list) -> valueReturn first element
lastCollectionslast(list) -> valueReturn last element
takeCollectionstake(list, n) -> listTake first n elements
dropCollectionsdrop(list, n) -> listDrop first n elements
anyCollectionsany(list, fn) -> boolTrue if any element matches predicate
allCollectionsall(list, fn) -> boolTrue if all elements match predicate
findCollectionsfind(list, fn) -> value|nilFind first matching element
find_indexCollectionsfind_index(list, fn) -> int|nilFind index of first match
chunkCollectionschunk(list, size) -> listSplit list into chunks of given size
window_slideCollectionswindow_slide(list, size) -> listSliding window over list
group_byCollectionsgroup_by(list, fn) -> mapGroup elements by key function
stat.exploreGuided Statsstat.explore(values, options?) -> recordExplain centre, spread, shape, and review clues
stat.scanGuided Statsstat.scan(table, options?) -> recordWhole-table first pass and prioritized next steps
stat.meansGuided Statsstat.means(values, options?) -> recordCompare means and their compatible spread measures
stat.decision_mapGuided Statsstat.decision_map(options?) -> recordQuestion-led map of suitable statistical approaches
stat.compare_groupsTask-first Statsstat.compare_groups(a, b, options?) -> recordExplicit two-group method, assumptions, alternatives, and result
stat.paired_changeTask-first Statsstat.paired_change(before, after, options?) -> recordPreserve matched pairs in an explicit paired analysis
stat.count_associationTask-first Statsstat.count_association(counts, options?) -> recordExplicit chi-square or Fisher count-table analysis
stat.stratified_associationTask-first Statsstat.stratified_association(strata, options?) -> recordTarone-adjusted Breslow-Day odds-ratio homogeneity test
stat.glm_diagnosticsGuided Statsstat.glm_diagnostics(x, y, options?) -> recordBinomial or Poisson model diagnostics
stat.random_intercept_modelGuided Statsstat.random_intercept_model(x, y, clusters, options?) -> recordOne random-intercept model with pooling diagnostics
stat.cox_diagnosticsGuided Statsstat.cox_diagnostics(time, event, x, options?) -> recordCox fit and survival-model diagnostic clues
meanMathmean(list) -> floatArithmetic mean
medianMathmedian(list) -> floatMiddle value of sorted list
stdevMathstdev(list) -> floatStandard deviation (sample)
varianceMathvariance(list) -> floatVariance (sample)
sumMathsum(list) -> numberSum of all elements
quantileMathquantile(list, q) -> floatQ-th quantile (0.0 to 1.0)
ttestMathttest(a, b) -> mapTwo-sample t-test
ttest_oneStatsttest_one(values, mean) -> recordOne-sample, two-sided t-test
fisher_exactStatsfisher_exact(a, b, c, d) -> recordFisher exact test for a 2 × 2 table
power_t_testStatspower_t_test(effect, alpha?, power?) -> recordApproximate required sample size per group
glmStatsglm(formula, table, family?) -> recordBinomial, Gaussian, or Poisson model
corMathcor(a, b) -> floatPearson correlation coefficient
sqrtMathsqrt(n) -> floatSquare root
logMathlog(n) -> floatNatural logarithm
randomMathrandom() -> floatRandom float in [0, 1)
upperStringupper(s) -> stringConvert to uppercase
lowerStringlower(s) -> stringConvert to lowercase
splitStringsplit(s, delim) -> listSplit string by delimiter
joinStringjoin(list, sep) -> stringJoin list elements into string
replaceStringreplace(s, old, new) -> stringReplace all occurrences
containsStringcontains(s, sub) -> boolCheck if string contains substring
formatStringformat(template, args...) -> stringFormat string with placeholders
tableTablestable(columns) -> tableCreate table from column map
csvTablescsv(path, opts?) -> tableRead CSV file into table
selectTablesselect(tbl, cols...) -> tableSelect columns from table
mutateTablesmutate(tbl, name, fn) -> tableAdd or modify column
left_joinTablesleft_join(a, b, on) -> tableLeft join two tables
pivot_widerTablespivot_wider(tbl, names, vals) -> tablePivot from long to wide format
matrixMatrixmatrix(rows) -> matrixCreate matrix from nested lists
matmulMatrixmatmul(a, b) -> matrixMatrix multiplication
pcaMatrixpca(mat, n_components) -> mapPrincipal Component Analysis
sparse_matrixSparsesparse_matrix(entries, r, c) -> sparseCreate sparse matrix from triplets
log1p_cpmSparselog1p_cpm(mat) -> sparselog(1 + CPM) normalization for scRNA-seq
regex_matchRegexregex_match(s, pattern) -> boolTest if pattern matches string
regex_capturesRegexregex_captures(s, pattern) -> listExtract capture groups
json_parseJSONjson_parse(s) -> valueParse JSON string
json_keysJSONjson_keys(value) -> listGet keys from a JSON object
nowDateTimenow() -> datetimeCurrent date and time
date_diffDateTimedate_diff(a, b, unit) -> intDifference between two dates
verify_checksumHashverify_checksum(path, expected) -> boolVerify MD5, SHA-1, or SHA-256 by digest length
sketchHashsketch(sequence, k, sketch_size) -> listMinHash sketch for sequence similarity
read_textFilesystemread_text(path) -> stringRead file contents as string
globFilesystemglob(pattern) -> listFind files matching glob pattern
http_getHTTPhttp_get(url, opts?) -> responseHTTP GET request
bio_fetchHTTPbio_fetch(db, id) -> mapFetch record from biological database
sparklineVizsparkline(data) -> stringUnicode sparkline chart
boxplotVizboxplot(data, opts?) -> stringASCII boxplot
plotPlottingplot(data, opts?) -> svgGeneric plot dispatcher
heatmapPlottingheatmap(mat, opts?) -> svgHeatmap from matrix data
volcanoPlottingvolcano(tbl, opts?) -> svgVolcano plot for DE analysis
manhattanBio Plotsmanhattan(tbl, opts?) -> svgManhattan plot for GWAS
circosBio Plotscircos(tracks, opts?) -> svgCircos plot for genomic data
cell_embeddingBio Plotscell_embedding(coords, labels) -> svgUMAP/tSNE cell embedding plot
container_runContainerscontainer_run(image, cmd, opts?) -> mapRun command in container
biocontainerContainersbiocontainer(tool, cmd) -> mapRun BioContainers tool
chatLLMchat(prompt, opts?) -> stringSend prompt to LLM
llm_modelsLLMllm_models() -> listList available LLM models
s3_downloadTransfers3_download(bucket, key, path) -> stringDownload from S3
sra_fastqTransfersra_fastq(accession, outdir) -> listDownload FASTQ from SRA
par_mapAdvancedpar_map(list, fn, threads?) -> listParallel map across threads
provenanceAdvancedprovenance(value) -> mapGet data provenance/lineage

Browse by Category

New in recent releases: additional sequence utilities, expanded sparse matrix ops, and new bio plot types bring the total to 1000+ functions. Check the individual category pages for the latest additions.