Skip to content

Horizontal dendrogram and polygon plot#189

Merged
whelena merged 15 commits into
mainfrom
hwinata-horizontal-dendrogram
May 15, 2026
Merged

Horizontal dendrogram and polygon plot#189
whelena merged 15 commits into
mainfrom
hwinata-horizontal-dendrogram

Conversation

@whelena
Copy link
Copy Markdown
Collaborator

@whelena whelena commented May 14, 2026

Description

Horizontal dendrogram support: Extended create.phylogenetic.tree to support plotting.direction = 'left' and 'right', rotating polygons, nodes, and edges so fish plots can be rendered in any of the four cardinal directions.
Axis placement fixes: Rewrote calculate.main.plot.size to derive viewport bounds directly from actual node/clone coordinates across all directions (removing direction-specific padding logic), and updated make.plot.viewport to store and use ylims so the yscale is correct for rotated plots.
Axis label positioning: Fixed add.axis.label in set.up.plot.area.R so that axis labels for all four positions (top, bottom, left, right) are placed at a consistent physical gap from the outer edge of the tick marks, accounting for tick length explicitly via convertX/convertY on the tick grob.
Text placement for horizontal plots: Updated add.text2 / position.node.text in add.text.R to apply xline.dist in the y direction for 'left'/'right' plots (perpendicular to horizontal branches) while keeping text glyphs always horizontal (rot = 0). Fixed degenerate slope computation for horizontal branches.

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.

  • This PR does NOT contain other non-plain text files, such as: compressed files, images (e.g. .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 main branch 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.md under the next release version or unreleased, and updated the date.

Footnotes

  1. UCLA Health reaches $7.5m settlement over 2015 breach of 4.5m patient records

  2. The average healthcare data breach costs $2.2 million, despite the majority of breaches releasing fewer than 500 records.

  3. Genetic information is considered PHI.
    Forensic assays can identify patients with as few as 21 SNPs

  4. RNA-Seq, DNA methylation, microbiome, or other molecular data can be used to predict genotypes (PHI) and reveal a patient's identity.

@whelena whelena requested review from WuSelina, graceooh and tnyamaguchi and removed request for tnyamaguchi May 14, 2026 22:11
@whelena
Copy link
Copy Markdown
Collaborator Author

whelena commented May 15, 2026

Repo name warning will be addressed separately

@whelena whelena changed the title Hwinata horizontal dendrogram Horizontal dendrogram and polygon plot May 15, 2026
@whelena whelena merged commit ab3359f into main May 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants