Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix polygon siblings issue #170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix polygon siblings issue #170

wants to merge 2 commits into from

Conversation

dan-knight
Copy link
Collaborator

@dan-knight dan-knight commented Jan 8, 2025

Description

Closes #159. There's an aesthetic issue with node spacing in the example with more than three siblings, but I don't think this is a bug per-se (and probably not the same bug that this change fixes). Let me know if this behaviour makes sense for now. If so, we can merge this fix before addressing polygon angles more generally.

Examples

Three Siblings

phy.dt <- data.frame(
    parent = c(NA, 1, 1, 2, 1),
    label = c(1:5),
    CP = c(1.2, 0.5, 0.4, 0.2, 0.3)
    );
grid.draw(SRCGrob(phy.dt));
Screenshot 2025-01-07 at 5 34 06 PM

Four Siblings

phy.dt <- data.frame(
    parent = c(NA, 1, 1, 1, 2, 1),
    label = c(1:6),
    CP = c(1.2, 0.5, 0.4, 0.2, 0.3, 0.15)
    );
grid.draw(SRCGrob(phy.dt));
Screenshot 2025-01-07 at 5 39 05 PM

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.

@dan-knight dan-knight added the bug Something isn't working label Jan 8, 2025
@dan-knight dan-knight requested a review from whelena January 8, 2025 01:37
Copy link
Collaborator

@whelena whelena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Since polygons are primarily for single sample I think supporting this level of complexity (2-4 children under one parent) is sufficient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fish plot polygon bug with 3 children
2 participants