-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hwinata test dendrogram #134
Conversation
…Visualization into hwinata-add-documentation
…lic-R-CancerEvolutionVisualization into hwinata-test-dendrogram
…lutionVisualization into hwinata-test-dendrogram
…isualization into danknight-news-md
Update changelog to Markdown format
I like the improvements to angle and x-distance calculation. These utility functions are great candidates for unit testing. I'll write a few unit tests while you make the fixes on documentation, etc. |
R/add.segs.R
Outdated
basex <- basex + dx + offset.x; | ||
# basex <- basex + offset.x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to keep this? I don't think we should leave commented-out code here as it will probably be unclear in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yea, I probably just missed it while cleaning up the code
@@ -26,43 +23,118 @@ calculate.angles.radial <- function(v, tree, spread, total.angle) { | |||
num.children <- length(child.ids); | |||
|
|||
if (num.children > 0) { | |||
parent.angle <- angles[current.node.id]; | |||
parent.angle <- angles[tree$tip == current.node.id]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming you made this change to support arbitrary node IDs? (Rather than auto-generated, ordered IDs that can be indexed directly)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yaa, I initially change it because I thought a named list for angles
might work better but i was worried it might get messed up since the tree$tip
are also numeric. So the added code is actually reverting to original.
…Visualization into hwinata-fix-dendrogram
@dan-knight Can you double check the merge, I think the dplyr dependency was not removed properly because the |
R/angles.R
Outdated
@@ -2,14 +2,11 @@ calculate.angles.radial <- function(v, tree, spread, total.angle) { | |||
root.node.id <- v$id[[1]]; | |||
node.ids <- c(root.node.id); | |||
|
|||
random.scale <- median(tree$length1) * spread; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this called "random" scale?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me!
@@ -1,7 +1,7 @@ | |||
Package: CancerEvolutionVisualization | |||
Title: Publication Quality Phylogenetic Tree Plots | |||
Version: 3.0.0 | |||
Date: 2024-05-07 | |||
Version: 2.1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we reverting back to 2.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I think Git was confused about which change took priority. I'll change it to 3.0.0.
I reverted and fixed it to match the code standard of the rest of it. |
I reverted and fixed it to match the code standard of the rest of it. |
Description
Edit dendrogram angle calculation such that angles are sepcified to give fixed x distances between leaf nodes.
Does not support mixed mode yet.
Closes #133
Analysis Results
Radial Mode
Dendrogram mode
Dendrogram with 1000 clones
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
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
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. ↩