Hwinata fix h padding - #190
Merged
Merged
Conversation
WuSelina
approved these changes
May 18, 2026
whelena
added a commit
that referenced
this pull request
Aug 17, 2026
test-linear.R built its plot with horizontal.padding = -1. That squeezed the plot area until the gene annotations collapsed into unreadable coloured specks and the axis tick labels crowded over the polygon -- the "test plots are not right" symptom in issue #186. The fixture was the only place a negative horizontal padding was exercised, so nothing else caught it. Sweeping the parameter shows -1 and 0 both crush the annotations, 1 and 2 render them cleanly outside the polygon, and 3 pushes the axis titles off the edge. Use 1, which keeps the pre-#190 layout (PGA left, SNV right, ticks outside the plot) while leaving space between the polygon and the axes. The gene labels TP53/CDKN2A/CSMD1/FHIT/TERT/MYC and NOTCH1/SOX2/TP63/PIK3CA/EGFR are legible again. Regenerate the snapshots. Comparing every stored grob against its predecessor with compare.trees confirms only two changed: linear.example (this padding change) and fish.example (the CCF axis is now flush with the polygon rather than overhanging it, which is what "make axes flush against polygon" in #190 set out to do). The other nine are unchanged, so the regeneration accepted nothing silently. Two fixes to update-snapshots.R were needed to run it at all: * pkg.root used dirname(sys.frame(1)$ofile), which only resolves under source(). Invoked the documented way -- Rscript tests/update-snapshots.R -- sys.frame(1) raised "not that many frames on the stack" and the script died before loading the package. Resolve the path from --file= first, fall back to sys.frames()[[1]]$ofile, then getwd(). * Swap devtools::load_all for pkgload::load_all. devtools is not in Suggests and merely re-exports load_all from pkgload.
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.
Description
Fix
horizontal.paddingfor polygon plot use case, ensuring its translated tovertical.paddingin horizontal fishplots.Checklist
This PR does NOT contain Protected Health Information (PHI). A repo may need to be deleted if such data is uploaded.
Disclosing PHI is a major problem1 - Even a small leak can be costly2.
This PR does NOT contain germline genetic data3, RNA-Seq, DNA methylation, microbiome or other molecular data4.
.png, .jpeg),.pdf,.RData,.xlsx,.doc,.ppt, or other output files.To automatically exclude such files using a .gitignore file, see here for example.
I have read the code review guidelines and the code review best practice on GitHub check-list.
I have set up or verified the
mainbranch protection rule following the github standards before opening this pull request.The name of the branch is meaningful and well formatted following the standards, using [AD_username (or 5 letters of AD if AD is too long)]-[brief_description_of_branch].
I have added the major changes included in this pull request to the
CHANGELOG.mdunder the next release version or unreleased, and updated the date.Footnotes
UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records ↩
The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records. ↩
Genetic information is considered PHI.
Forensic assays can identify patients with as few as 21 SNPs ↩
RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity. ↩