All notable changes to cbioformatter will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.3.0 — 2026-06-22
- Basic usage tutorial —
examples/basic_usage.ipynbwalks researchers through constructing aClinicalStudy, writing files, and validating a study end-to-end, with bundled example data inexamples/data/. (#55)
- Local upload documentation — removed draft README content describing study upload to a local cBioPortal instance; that workflow is not yet stable enough to document publicly. (#54)
0.2.0 — 2026-06-09
- Mutation data processing — when
sample_datacontains aVCF_PATHcolumn,ClinicalStudyinvokes a user-installed mafsmith to convert each VCF to MAF, concatenates the per-sample MAFs intodata_mutations.txt, and writes the matchingmeta_mutations.txtandcase_lists/cases_sequenced.txt. New constructor kwargsref_fasta_path(optional override; mafsmith uses its bundled reference by default) andmafsmith_path(withCBIOFORMATTER_REF_FASTAandCBIOFORMATTER_MAFSMITH_PATHenv-var fallbacks) configure the converter. Samples with nullVCF_PATHvalues are skipped but still appear incases_all.txt. New error classes:MutationToolNotAvailableError,MutationConversionError,MissingReferenceFastaError. Note: mafsmith does not currently populate the optionalSWISSPROTcolumn, so cBioPortal's Pfam-domain mutations view will be unavailable until nf-osi/mafsmith closes that gap. (#19, #20, #21, #22, #23, #24, #25, #26)
0.1.0 — 2026-05-14
First public release. Establishes the ClinicalStudy API for assembling cBioPortal-compatible studies from pandas DataFrames, with end-to-end support for clinical data, file generation, and offline validation.
ClinicalStudyclass — accepts sample and patient DataFrames and produces a validated, cBioPortal-compatible study directory. Auto-generates patient data andPATIENT_IDs when not provided. (#35)- Clinical data handling — column name cleaning (uppercase, underscores, special-character removal), data type inference (
NUMBER,BOOLEAN,STRING), and validation of required columns, ID uniqueness, and patient/sample referential integrity. (#35) - OncoTree cancer-type validation — validates
CANCER_TYPEvalues against a bundled snapshot of OncoTree codes; no runtime API dependency. (#35) - File generation via
ClinicalStudy.write_files()— producesmeta_study.txt, patient/sample meta and data files (with the 4-line cBioPortal header), and acase_lists/cases_all.txtcase list. (#37) - Local study validation via
ClinicalStudy.validate()— wraps the official cBioPortalvalidateData.pywith--no_portal_checks. The validator is cloned on first use into~/.cache/cbioformatter/validator/and cached;CBIOFORMATTER_VALIDATOR_PATHoverrides the location for air-gapped or CI use. Returns aValidationResult;write_files(validate=True)raisesValidationErroron hard failures and emits aUserWarningon warnings-only. (#46) - PyPI distribution — automated publishing via
.github/workflows/publish.ymlon GitHub release, using PyPI trusted publishing (OIDC) with no long-lived tokens. The publish action is pinned by commit SHA. (#48) CONTRIBUTING.md— initial contributor doc. Several sections remain stubbed for follow-up. (#48)
- Python floor raised to 3.10. 3.9 was dropped from CI in February 2026 (commit
fe21d5a) and is past EOL;requires-python,ruff target-version, and the README now reflect that. (#48) __version__is now read dynamically fromimportlib.metadata, makingpyproject.tomlthe single source of truth. (#48)