Kokiri supports cancer researchers and pharmaceutical analysts in comparing patient cohorts by their high-dimensional genomic data to uncover driving differences and characterize cohort homogeneity. Unlike approaches that examine attributes individually, Kokiri trains a random forest classifier to distinguish cohorts, capturing combinatorial effects across thousands of genetic mutations. The workflow progresses from overlap assessment through comparison to characterization of outliers and sub-cohorts.
The input consists of pre-defined patient cohorts (created externally, e.g., in Coral by filtering and splitting a cancer genomics dataset by demographics and cancer type). Each cohort is a subset of patients with associated high-dimensional tabular data: mutation status for hundreds of cancer-relevant genes plus clinical metadata. The analyst selects which cohorts to compare and which data attributes (mutation status or metadata) to use for the comparison.
The system first visualizes pairwise overlaps between cohorts using compact bidirectional bar charts showing relative overlap and size differences. This establishes whether cohorts share items — overlapping cohorts are harder to distinguish and the overlap affects subsequent classification results. If cohorts were created by split operations (disjoint by construction), the view confirms non-overlap.
A random forest classifier is iteratively trained (in steps of 25 estimators up to 500) to distinguish the cohorts based on the selected attributes. After each increment, the system provides intermediate results: a ranked list of attributes by Gini importance (the most differentiating genes), with per-attribute distribution previews (bar charts or density plots showing how each cohort distributes over that attribute), and a performance overview (mean accuracy, stacked bar chart of predicted vs. actual cohort composition). The analyst inspects these results to identify the most important differentiating attributes, verify known differences (e.g., KRAS G12C frequency differences across race), and discover unexpected findings (e.g., sequencing coverage disparities for specific genes in certain cohorts).
Based on identified important attributes, the analyst may refine the comparison: excluding already-known differences (e.g., removing TP53 which dominates due to overall high frequency) to focus on remaining data and reveal further insights. This triggers retraining of the classifier on the reduced attribute set, producing a new ranking and performance assessment. The cycle repeats — identifying important attributes, assessing their clinical significance, excluding known differences, and recomputing — until the analyst has uncovered all noteworthy differentiating factors.
Using the trained classifier's per-item prediction probabilities (vote proportions across trees), the system generates: (a) an item ranking sorted by prediction uncertainty (ascending maximum probability) showing items the classifier was least confident about, and (b) a supervised-UMAP scatterplot of prediction probability vectors with a confidence heatmap background, revealing cohort homogeneity, sub-cohorts, and outliers. The analyst inspects these views to identify hard-to-classify patients (potential sub-types or data quality issues), assess within-cohort homogeneity, and discover small clusters of patients with ambiguous cohort affiliation suggesting shared genomic characteristics across demographic groups.
The analyst synthesises findings: confirmed known mutational differences (e.g., EGFR frequency in Asian cohorts), discovered novel differences (e.g., data coverage issues for FGFR4 and BRCA1 in Black patients), identified outliers and ambiguous patients warranting further investigation. They may return to the cohort creation tool to define new cohorts based on discovered sub-groups or export findings for further statistical analysis.