Add themeable plots, self-describing outputs, failure reporting; markers opt-in - #8
Merged
Merged
Conversation
…ers opt-in - Themeable plots: NMFprofileR() gains `custom_theme` (a ggplot2 theme) and `factor_palette` (a colour vector), threaded into generate_rank_plots() and generate_global_plots() in place of the hardcoded theme/palette. - `umap_n_neighbors` parametrizes the sample-coefficient UMAP; the embedding now renders whenever n_samples exceeds it (was hardcoded > 15) and the neighbour count is capped at n_samples - 1 so smaller cohorts also embed. - Self-describing outputs: an optional `run_id` is stamped as a leading Run_ID column in the consolidated summary and recorded in the manifest; the whole nmf_profile is saved as one <prefix>_nmf_profile.rds bundle; and a Summaries/manifest.tsv lists every file a run produced with its type (write_output_manifest / classify_output_file). - Failed ranks are recorded in $failures (Rank + Reason) and surfaced by print(), instead of silently vanishing from the output. - emit_marker_genes now defaults to FALSE (breaking): specificity markers and their enrichment are opt-in, halving g:Profiler calls per default run. The marker_genes and enrichment$markers elements remain present (empty when off). Tests: add test-manifest (manifest helpers, no network) and test-failures (failure path via mocked fit, no network); extend the smoke test to cover run_id, the .rds bundle, the manifest, and empty $failures. Docs regenerated (S3 methods now registered via S3method()); version bumped to 0.3.0.
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.
Usability improvements to
NMFprofileR(). Everything is additive except one intentional default change (emit_marker_genes).Changes
custom_theme(a ggplot2 theme) andfactor_palette(a colour vector) arguments, threaded intogenerate_rank_plots()/generate_global_plots(), so figures can match a project's house style without editing the package.custom_themealso matches the argument theNMFprofileR_TCGAscripts already pass.umap_n_neighbors— parametrizes the sample-coefficient UMAP. The embedding now renders whenever the cohort has more samples than this value (previously hardcoded> 15), with the neighbour count capped atn_samples - 1so smaller cohorts also embed.run_idis stamped as a leadingRun_IDcolumn in the consolidated summary and recorded in the manifest; the wholenmf_profileresult is saved as a single<prefix>_nmf_profile.rdsbundle; andSummaries/manifest.tsvlists every file a run produced with its type.$failuresdata frame (Rank + Reason) and listed byprint(), instead of silently disappearing.emit_marker_genesnow defaults toFALSE(breaking) — specificity markers and their second enrichment pass are opt-in, halving g:Profiler calls per default run. Themarker_genes/enrichment$markerselements are still always present (empty when off).Testing
test-manifest(manifest helpers) andtest-failures(failure path via a mocked fit) run without a network.run_id, the.rdsbundle, the manifest, and empty$failures.