Closed dan-knight closed 2 months ago
I see that there are two fucntion to calculate angles (calculate.angles.radial
and calculate.angles.fixed
) Althought in the exmaples you showed the two SRCGrob
calls look the same. How do users choose which function to use?
I see that there are two fucntion to calculate angles (
calculate.angles.radial
andcalculate.angles.fixed
) Althought in the exmaples you showed the twoSRCGrob
calls look the same. How do users choose which function to use?
They don't! Those are all handled internally depending on the complexity of the tree. The two methods are becoming very similar anyway, so I think it would be good to combine them before releasing v3. For now, I'm just accounting for both.
Description
Fixes a bug in the refactored angle calculation code to return to the original "circular" behaviour of the v1 algorithm. Before this, child angles were calculated beginning at 0 degrees, meaning that levels moved directly "downward". This creates two problems for users:
These changes mean that the user needs to specify far fewer angles to handle crowded trees. For many use cases, the automatic angle calculation will create a well-spaced tree. Beyond this, often only one or two angles in the first level of the tree need to be overridden to create ample visual space for lower levels with many nodes.
These changes have removed the existing
override.angles()
function, but I haven't yet deleted the code as it be useful in the future (perhaps for handling edge cases).Examples
radial
fixed
Closes #122
Checklist
[x] 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 problem[^1] - Even a small leak can be costly[^2].
[x] This PR does NOT contain germline genetic data[^3], RNA-Seq, DNA methylation, microbiome or other molecular data[^4].
[^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.
.png
, .jpeg
),.pdf
,.RData
,.xlsx
,.doc
,.ppt
, or other output files.To automatically exclude such files using a .gitignore file, see here for example.
[x] I have read the code review guidelines and the code review best practice on GitHub check-list.
[x] I have set up or verified the
main
branch protection rule following the github standards before opening this pull request.[x] 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].
[x] 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.