skills/geniml/references/consensus_peaks.md
Verified against geniml==0.8.4 release source and official BEDbase
documentation on 2026-07-23.
A Geniml universe is a reference interval vocabulary derived from coverage across a collection of BED files. Release 0.8.4 implements:
Primary source: Rymuza et al. (2024), Methods for constructing and evaluating consensus genomic interval sets, doi:10.1093/nar/gkae685.
The paper motivates and evaluates these methods; it does not make one method universally best. Choose using training-only data, assay-specific validation, resource constraints, and held-out universe-fit metrics.
All source BED files and chromosome sizes must agree on:
Reject malformed rows, negative starts, end <= start, coordinates beyond
contig length, unknown contigs, mixed assemblies, and integer overflow before
coverage generation. A chromosome name match alone is not proof of assembly
compatibility.
Build the universe only from the training patients/donors. If samples from a held-out patient contribute to coverage, the resulting vocabulary leaks test feature prevalence.
python skills/geniml/scripts/corpus_auditor.py \
--manifest data/train_manifest.tsv \
--group-column patient_id \
--split-column split \
--assembly-column assembly
Geniml consumes bigWig tracks in a local coverage directory. With the default
prefix all, methods expect:
all_start.bw
all_core.bw
all_end.bw
CC and CCF read all_core.bw. HMM and likelihood-based methods use
start/core/end tracks. The tracks must share contigs and lengths with the
checksummed chromosome-sizes file.
Official Geniml pages describe producing these tracks with the ecosystem's
coverage tooling, but the current Gtars CLI has changed across releases. Do not
emit or run a guessed uniwig command. Pin the exact Gtars/uniwig executable,
capture its --help, and smoke-test its output naming on synthetic local BED
data. Record:
The bundled planner validates local inputs and emits the Geniml stage, but intentionally marks coverage generation as an external prerequisite:
python skills/geniml/scripts/consensus_plan.py \
--manifest data/train_manifest.tsv \
--chrom-sizes refs/GRCh38.chrom.sizes \
--assembly GRCh38 \
--method cc \
--cutoff 2 \
--output-dir work/consensus
It does not execute Geniml, Gtars, native binaries, or network requests.
The top-level command is build-universe, not universe build.
geniml build-universe cc \
--coverage-folder /absolute/project/coverage \
--coverage-prefix all \
--output-file /absolute/project/universe_cc.bed \
--cutoff 2 \
--merge 100 \
--filter-size 50
--cutoff is an integer. If omitted, release source uses mean base coverage
for each chromosome. --merge merges nearby output segments; --filter-size
removes shorter segments. The output file must not already exist.
Do not claim cutoff=number_of_files is a strict sample intersection unless
coverage generation contributes exactly one unit per sample at each base.
Fragment/read coverage or duplicated intervals can violate that assumption.
Python:
from geniml.universe.cc_universe import cc_universe
cc_universe(
cove="work/coverage",
file_out="work/universe_cc.bed",
cove_prefix="all",
merge=100,
filter_size=50,
cutoff=2,
)
geniml build-universe ccf \
--coverage-folder /absolute/project/coverage \
--coverage-prefix all \
--output-file /absolute/project/universe_ccf.bed
Python:
from geniml.universe.ccf_universe import ccf_universe
ccf_universe(
cove="work/coverage",
file_out="work/universe_ccf.bed",
cove_prefix="all",
)
The stable source has no CCF --confidence, --merge, or --filter-size
arguments. CCF writes BED9-like rows carrying core/boundary information; do
not reduce them to BED3 before confirming downstream semantics.
The 0.8.4 likelihood command has no build_model subcommand:
geniml lh \
--model-file /absolute/project/model.tar \
--coverage-folder /absolute/project/coverage \
--coverage-prefix all \
--file-no 4
Then:
geniml build-universe ml \
--model-file /absolute/project/model.tar \
--coverage-folder /absolute/project/coverage \
--coverage-prefix all \
--output-file /absolute/project/universe_ml.bed
Python:
from geniml.likelihood.build_model import main as build_likelihood
from geniml.universe.ml_universe import ml_universe
build_likelihood(
model_file="work/model.tar",
coverage_folder="work/coverage",
coverage_prefix="all",
file_no=4,
)
ml_universe(
model_file="work/model.tar",
cove_folder="work/coverage",
cove_prefix="all",
file_out="work/universe_ml.bed",
)
Treat the .tar likelihood model as an untrusted archive if it is not locally
created and checksummed. Inspect archive member names and reject absolute
paths, .., links, devices, and excessive expansion before extraction.
geniml build-universe hmm \
--coverage-folder /absolute/project/coverage \
--coverage-prefix all \
--output-file /absolute/project/universe_hmm.bed
Use --not-normalize only after validating what scale the model expects.
--save-max-cove adds maximum coverage information. The 0.8.4 CLI has no
--states argument; the model structure is defined in source constants.
Python:
from geniml.universe.hmm_universe import hmm_universe
hmm_universe(
coverage_folder="work/coverage",
out_file="work/universe_hmm.bed",
prefix="all",
normalize=True,
save_max_cove=False,
)
Universe builders do not replace input validation. After construction:
Some 0.8.4 functions assume at least one selected base per chromosome and may index an empty result. Test sparse/empty chromosomes synthetically and fail closed rather than accepting a partial output.
The release CLI is:
geniml assess-universe \
--raw-data-folder /absolute/project/validation_beds \
--file-list /absolute/project/validation_files.txt \
--universe /absolute/project/universe_cc.bed \
--overlap \
--distance \
--distance-universe-to-file \
--folder-out /absolute/project/assessment \
--pref validation \
--no-workers 4
Available flags include:
--overlap;--distance;--distance-flexible;--distance-universe-to-file;--distance-flexible-universe-to-file;--save-to-file;--save-each.--save-each can generate large, sensitive per-interval outputs. Leave it off
unless required and bound output size. The docs still show geniml assess;
that is not the 0.8.4 top-level command.
Python entry points include:
from geniml.assess.assess import (
get_f_10_score,
get_mean_rbs,
run_all_assessment_methods,
)
F10, reciprocal-boundary-style distance summaries, and likelihood measure different properties. Compare multiple candidate universes on validation patients, then evaluate the chosen one once on test patients. Do not tune the cutoff, merging, or method on the test collection.
Store:
Keep file names and sample labels redacted in portable reports.
Remove or correct these stale patterns:
geniml universe build ... → geniml build-universe ...;geniml universe evaluate ... → geniml assess-universe ...;--confidence → not present in 0.8.4;--states → not present in 0.8.4;--model-type gaussian|poisson → not present in 0.8.4;build_universe(...) → not exported by the stable universe module;