Merge Development into Main --> Release: BioProfileKit CLI v1.0#19
Merged
Conversation
- Add Imbalance Ratio, Rare Categories, and NZV badges to column card headers - Restructure categorical stats tab into Distribution, Imbalance & Rarity, and Cardinality sections - Expose cib_ratio, rare_categories, top_1/5_coverage, and effective_cardinality in the UI
Audit and overhaul of all HTML templates and the custom CSS layer to meet WCAG AA contrast requirements and support users with colour vision deficiencies.
…t-visibility, deferred scripts and CDN preconnect
…ound event listeners
…wn, render quality messages as lists
…taxonomy_candidate heuristic to show not-checked badge only for candidate columns if --tax is missing
Cheshakoneko
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
development→mainType: Feature / Major Version Release
Authors: Maria Hansen, Sonja Diedrich, Julian Hahnfeld, Felix Knopp
Overview
This PR merges the complete development history of BioProfileKit into
mainand marks the v1.0 release of the CLI tool.BioProfileKit is a domain-specific automated data profiling tool for bioinformatics tabular data (CSV, TSV, JSON, Parquet). It generates interactive HTML reports covering dataset-level and column-level exploratory data analysis, biological sequence profiling (DNA/RNA, protein), biological metadata validation (taxonomy, functional annotation, lab measurements), and multivariate statistics — all from a single CLI invocation.
What's Included
Core Analysis Pipeline (
src/)File I/O (
data_utils/)file_reader.py— unified reader for CSV, TSV, JSON, and Parquet with automatic delimiter detection viacsv.Sniffer, header inference, and index-column behaviour consistent across formatsparse_parquetviapyarrowwith index-column parity to CSV readerfloat64columns re-cast toStringDtypefor correct downstream categorical treatment (Pandas 3.x compatibility)remote_data.py— NCBI taxonomy ID downloadColumn Analysis (
analysis/)overview.py—GeneralOverviewandColumnOverviewdataclasses;taxonomy_candidateheuristic using column-name keywords and binomial nomenclature pattern matching to show Not-Checked badges only for plausible taxonomy columnsnumeric_analysis.py— descriptive statistics, quantiles, MAD, CoV, skewness, kurtosis, infinity check, zero/negative counts, adjusted IQR outlier detection, Grubbs/modified Z-score supportcategorical_analysis.py— unique categories, entropy, Gini, Simpson diversity, cardinality ratio, effective cardinality, CIB ratio, rare category detection (≤5% threshold), top-N value counts; guards for empty Series intop_1_coverageandcib_ratiomultivariate_analysis.py(renamed frommultivariate.py) — Pearson, Cramér's V, η² correlation matrices;top_associationsranked list; feature–target correlation and plot; mutual information ranking and relationship plots; Little's MCAR test; missing value matrix and bar chart; balance plot; box plots; scatter matrix; autosize enabled on all Plotly figures for responsive layoutBiological Analysis (
biological/)sequence_data.py— DNA/RNA: GC content, GC/AT skew, CpG/TpA O/E ratio, ambiguous base ratio, codon completeness, low complexity, reverse complement ratio, k-mer frequencies; Protein: GRAVY, cysteine count, disorder propensity, stop codon ratio, ambiguous residue ratio, length distribution, amino acid group distribution, k-mer frequencies; WebLogo sequence logo (SVG fragment extraction via regex — prevents Bootstrap 3 injection from WebLogo's full-HTML output)sequence_detection.py— heuristic classifier for DNA, RNA, protein, and non-sequence columns; guard for k-mer length > sequence lengthtaxonomy.py— NCBI taxonomy validation; rank distribution; outdated name detection; invalid entry collection; mixed-taxonomy detectionfunctional_annotation.py— COG and GO term validation against downloaded reference datameasurement_data.py(Julian Hahnfeld) — unit detection via regex; measurement column classification; unit count and mixed-unit detection; refactored for speed and memory efficiencyQuality Assessment (
quality_assessment/)quality_assessment.py— 17 checks across four categories:detail_linkresolution mapping quality checks to the relevant report pageCLI (
cli/)app.py— Click-based CLI entry point; orchestrates the full pipeline; collects Click context parameters and writes both HTML report andresults.jsonon successreport_writer.py— Jinja2-based HTML renderer; writesindex.html,numeric_data.html,columns.html,general_statistics.html; copies static assets; resolves quality check detail linksreport_json.py(new) — machine-readable JSON output alongside the HTML report; schema-versioned; numpy-safe serialisation with_num()and_json_default; per-column blocks for numeric, categorical, sequence, taxonomy, measurement, and cross-column relationsutils.py—print_step,info,_fmt_durationCLI helpersMakefile— build and run targetsCython Extensions
wrapper_utils.pyx— core utility wrappertaxonomy_validator.pyx— fast taxonomy name/ID lookupHTML Report Templates (
templates/)All four Jinja2 templates were built from scratch and iteratively expanded:
LandingPage.jinjalocalStorage;DOMContentLoadedlistener prevents IIFE-before-element race condition)numeric_overview.jinja(Analysis Overview)qualityparameter optional for backwards compatibility with older testsgeneral_statistics.jinja(Multivariate Statistics)target_column)shown.bs.tabevent triggersPlotly.relayouton.plotly-graph-divelements within the activated tab panelcolumns.jinja(Column Analysis)cbf-activeCSS class toggledata-cb-themeswitching; WCAG AA contrast verified across both themeslocalStoragepersistence for colorblind preference across pagesStatic Assets (
static/)cb.css— BioProfileKit color scheme (BPK-Pink#932263, BPK-Dark-Grey#3D4756); colorblind theme (data-cb-theme=colorblind); button, badge, pagination, nav-tab, and search input overrides; fixed footer layoutbootstrap.css— Bootstrap 5.3.3Test Suite (
tests/)Unit Tests (
tests/unit/)categorical_analysis.pynumeric_analysis.pyoutlier_detection.pydata_quality.pyfunctional_annotation.pysequence_data.pysequence_detection.pyfile_reader.pymultivariate_analysis.pyIntegration Tests (
tests/integration/)test_app.pytest_report_writer.py_render_to_fileunit testsCoverage: ≥70% enforced in CI
Total: 434 tests — 0 failed
CI/CD (
.github/workflows/)Infrastructure
pyproject.toml— dependencies, build configuration, coverage settings, minimum version bumpsDockerfile— base image for CLI tool (foundation for backend image)compose.yaml/docker-compose.yml— local development stackMakefile— build, test, and run targetsMANIFEST.in— package data inclusion forimportlib_resourcesrequirements.txt— pinned dependencies with minimum version bumpsCODE_OF_CONDUCT.md,README.md— project documentation and badges.gitignore— updated for build artifacts and test outputBreaking Changes
None. This is the initial public release (version 1.0); there is no prior stable BPK.
Known Limitations & Open Issues
The following items are tracked as GitHub Issues and deferred to v1.1:
Checklist
0 failed)results.jsonwritten on every successful run