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

Hwinata test dendrogram #134

Merged
merged 61 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
e0d14a1
Refactor dplyr tree segment adjustment
dan-knight May 10, 2024
5c094e2
Remove unused duplicate function
dan-knight May 10, 2024
6f9bbc2
Refactor dplyr tree segment initialization
dan-knight May 10, 2024
169e01a
Refactor text prep dplyr functions
dan-knight May 10, 2024
074c215
Refactor dplyr function in tree length adjustment
dan-knight May 16, 2024
e0f3c23
Remove unused duplicate function
dan-knight May 16, 2024
3585423
Remove unused code
dan-knight May 16, 2024
1e3e207
Refactor dplyr function in node text
dan-knight May 16, 2024
156b341
Remove plyr dependency
dan-knight May 16, 2024
3293d62
Update changelog
dan-knight May 16, 2024
0f351fe
add heatmaps documentation
whelena May 20, 2024
18e415a
Merge branch 'main' of github.com:uclahs-cds/public-R-CancerEvolution…
whelena Jun 5, 2024
82142a2
add documentation for create.ccf.summary.heatmap
whelena Jun 5, 2024
3cca6d4
add documentation for create.clone.genome.distribution.plot
whelena Jun 5, 2024
7aed2a0
fix lintr
whelena Jun 5, 2024
ba611d5
standardize param names
whelena Jun 14, 2024
98c53c6
add colour scheme param to create.cluster.heatmap
whelena Jun 14, 2024
d828b33
automate naming between multi and single sample for clone genome dist…
whelena Jun 18, 2024
ccc59f4
Merge branch 'danknight-circular-angles' of github.com:uclahs-cds/pub…
whelena Jul 18, 2024
7da2776
simplify filenames
whelena Jul 18, 2024
068b046
update NEWS
whelena Jul 19, 2024
abc23bf
match argument name in .Rd file
whelena Jul 19, 2024
861ca49
fix param documentation
whelena Jul 19, 2024
eb119f3
Merge branch 'dendrogram' of github.com:uclahs-cds/public-R-CancerEvo…
whelena Jul 23, 2024
90afed7
add some notes
whelena Jul 24, 2024
cf429d6
modify angle assignment for dendrogram mode
whelena Jul 25, 2024
c966207
add check to make sure all children are given the same parent
whelena Jul 25, 2024
2933a2b
option 2 of assigning dendrogram angles
whelena Jul 25, 2024
77162d7
refactor calculate.angles.radial to handle different modes
whelena Jul 26, 2024
cd12ddd
fix dendrogram dx calculation
whelena Jul 26, 2024
48fed2f
fix refatoring to use with full radial and full dend mode
whelena Jul 26, 2024
02ca32c
remove print and allow spread to modify x dist between nodes
whelena Jul 27, 2024
47f28f3
update NEWS and test + fix lintr
whelena Jul 27, 2024
db04c33
Update changelog format to markdown
dan-knight Jul 29, 2024
013a84a
Update changelog
dan-knight Jul 29, 2024
fb4e1a8
Fix documentation
dan-knight Jul 30, 2024
2d27a49
Update changelog
dan-knight Jul 30, 2024
a3386ac
Merge pull request #129 from uclahs-cds/hwinata-add-documentation
dan-knight Jul 30, 2024
c1dcb67
Merge branch 'main' of github.com:uclahs-cds/package-CancerEvolutionV…
dan-knight Jul 30, 2024
d622beb
Remove stringr dependency
dan-knight Jul 31, 2024
98bc106
Update changelog
dan-knight Jul 31, 2024
f83b0ae
Merge branch 'main' of github.com:uclahs-cds/package-CancerEvolutionV…
dan-knight Jul 31, 2024
efb60c2
Reimplement stringr filtering function
dan-knight Jul 31, 2024
2424b79
Merge pull request #136 from uclahs-cds/danknight-dplyr
dan-knight Jul 31, 2024
5dd6a7c
Merge branch 'main' of github.com:uclahs-cds/package-CancerEvolutionV…
dan-knight Jul 31, 2024
72a51a9
Merge pull request #135 from uclahs-cds/danknight-news-md
dan-knight Jul 31, 2024
09517cb
Merge branch 'main' of github.com:uclahs-cds/public-R-CancerEvolution…
whelena Aug 1, 2024
658240d
Fix bug in radial angle calculation
dan-knight Aug 6, 2024
d163f9f
Refactor adply implementation
dan-knight Aug 7, 2024
cb5cbcf
Fix code style
dan-knight Aug 7, 2024
6950f1c
Update function imports from base R
dan-knight Aug 7, 2024
5161148
Fix typo
dan-knight Aug 7, 2024
268d865
Fix bug when creating tree segments
dan-knight Aug 7, 2024
e768364
Handle types when calculating seg coords
dan-knight Aug 7, 2024
5b013a5
Dendrogram regression/E2E test case
dan-knight Aug 8, 2024
97e8944
Merge branch 'dendrogram' into hwinata-test-dendrogram
dan-knight Aug 8, 2024
5560b18
Refactor equal X-dist
dan-knight Aug 14, 2024
ceb4bed
Update dendrogram regression test
dan-knight Aug 14, 2024
5300cc0
Revert "Refactor equal X-dist"
whelena Aug 15, 2024
6ec021e
save reverted version with edits
whelena Aug 28, 2024
82d349e
edit dendrogram expected test result
whelena Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: CancerEvolutionVisualization
Title: Publication Quality Phylogenetic Tree Plots
Version: 3.0.0
Date: 2024-05-07
Version: 2.1.0
Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Date: 2024-07-31
Authors@R: c(
person("Paul Boutros", role = "cre", email = "[email protected]"),
person("Adriana Salcedo", role = "aut"),
Expand All @@ -14,15 +14,13 @@ URL: https://github.com/uclahs-cds/package-CancerEvolutionVisualization
BugReports: https://github.com/uclahs-cds/package-CancerEvolutionVisualization/issues
Depends:
R (>= 3.5.0),
graphics,
graphics,
grid,
gridExtra,
gtable,
Imports:
plyr,
grDevices,
utils,
stringr,
BoutrosLab.plotting.general
Suggests:
testthat,
Expand Down
5 changes: 1 addition & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import(grid)
import(gridExtra)
import(gtable)
import(plyr)
import(BoutrosLab.plotting.general)

importFrom("graphics", "par", "strheight", "strwidth")
importFrom("grDevices", "dev.list", "rainbow")
importFrom("utils", "read.table", "vi", "head")
importFrom("stringr", "str_replace_all")
importFrom("stats", "setNames", "aggregate", "reshape")
importFrom("stats", "median", "setNames", "aggregate", "reshape")
importFrom("grDevices", "col2rgb")

export(SRCGrob)
Expand All @@ -17,5 +15,4 @@ export(create.ccf.heatmap)
export(create.cluster.heatmap)
export(create.ccf.summary.heatmap)


export(create.clone.genome.distribution.plot)
124 changes: 55 additions & 69 deletions NEWS → NEWS.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
CancerEvolutionVisualization 3.0.0 2024-05-07 (Dan Knight)
# CancerEvolutionVisualization 2.1.0 (2024-07-31)

ADDED
* Dendrogram mode with node-by-node control
## Added
* Optional "spread" column to control node/branch spacing
* Plotting functions to visualize the distribution of clones across the genome.
* Documentation for heatmaps and clone-genome distirbution plor

UPDATE
## Update
* Fixed angle calculation bug where child angles do not follow
their parent angle, instead moving "downward" at 0 degrees.
* Updated package metadata and README
* Split angle handling for `radial` and `dendrogram` modes to optimized each
* Set default parameters for heatmaps, defaulting too BPG defaults unless necessary
* Updated changelog format to NEWS.md Markdown format
* Refactored use of plyr/dplyr and stringr functions to remove dependencies
* Set default parameters for heatmaps, defaulting to BPG defaults unless necessary

--------------------------------------------------------------------------
CancerEvolutionVisualization 2.0.1 2023-11-17 (Helena Winata, Dan Knight)
# CancerEvolutionVisualization 2.0.1 (2023-11-17)

ADDED
## Added
* GitHub links for code and bug reports

BUG
## Bug
* Fixed S3 naming conflict in heatmap functions, using safe "create." prefix


--------------------------------------------------------------------------
CancerEvolutionVisualization 2.0.0 2023-11-16 (Helena Winata, Dan Knight)
# CancerEvolutionVisualization 2.0.0 (2023-11-16)

ADDED
## Added
* Option to specify edge colour with "edge.col.1" and "edge.col.2"
columns in tree input dataframe
* Option to specify edge width using "edge.width.1" and "edge.width.2"
Expand All @@ -39,32 +41,30 @@ ADDED
"border.col", "border.width", and "border.type" columns
* Option ot specify tree node label colour with "node.label.col" column

UPDATE
## Update
* Reimplemented tree angle calculations
* Fixed lopsided radial tree bug

REMOVED
## Removed
* "seg1.col" and "seg2.col" parameters (replaced by tree input columns).
* "node.col" parameter to SRCGrob. (Node colour only customizable through tree input data.frame.)


--------------------------------------------------------------------------
CancerEvolutionVisualization 1.0.1 2022-10-03 (Dan Knight)
# CancerEvolutionVisualization 1.0.1 (2022-10-03)

UPDATE
## Update
* Package title change for CRAN submission


--------------------------------------------------------------------------
CancerEvolutionVisualization 1.0.0 2022-09-28 (Dan Knight)
# CancerEvolutionVisualization 1.0.0 (2022-09-28)

ADDED
## Added
* Documentation for default colour scheme
* Checks for valid tree structure
- Valid root node
- Circular node references

UPDATE
## Update
* Changed gene input to a generic node text input, where
style and colour are specified directly (not through
SNV or CNA values).
Expand All @@ -76,64 +76,59 @@ UPDATE
* Remove README from build


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.10.0 2022-08-01 (Dan Knight)
# CancerEvolutionVisualization 0.10.0 (2022-08-01)

ADDED
## Added
* Optional SNV column in gene input data to italicize gene text
* Validates gene.line dist input value

UPDATE
## Update
* Changed gene input "gene" column to more generic "name"

REMOVED
## Removed
* Removed extra.len parameter to allow the value to be inferred by the
presence/absence of CP values.
* Removed spread parameter until radial nodes are supported.
* Removed wid parameter, as it is no longer needed with horizontal.padding
* Removed cluster.list parameter until (pie nodes are implemented)

--------------------------------------------------------------------------
CancerEvolutionVisualization 0.9.0 2022-07-20 (Dan Knight)

REMOVED
# CancerEvolutionVisualization 0.9.0 (2022-07-20)

## Removed
* Removed ylimits and yaxis.interval parameters.
(yat can be used instead.)
* Removed filename parameter from SRCGrob to follow grid patterns.


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.8.0 2022-07-14 (Dan Knight)
# CancerEvolutionVisualization 0.8.0 (2022-07-14)

UPDATE
## Update
* Added "smart" branch length scaling based on the branch lengths and
tree depth.
* The user can still scale the lengths proportionally with the scale1
and scale2 arguments.


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.7.0 2022-06-28 (Dan Knight)
# CancerEvolutionVisualization 0.7.0 (2022-06-28)

UPDATE
## Update
* Added yat parameter to allow specific Y axis tick values

REMOVED
## Removed
* Removed yaxis.interval parameters (replaced with yat)


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.6.0 2022-06-24 (Dan Knight)
# CancerEvolutionVisualization 0.6.0 (2022-06-24)

UPDATE
## Update
* Changed output format to only return the tree grob itself
(no longer including intermediate values)


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.5.0 2022-06-24 (Dan Knight)
# CancerEvolutionVisualization 0.5.0 (2022-06-24)

UPDATE
## Update
* Automatically sets the branch angle to pi / 6
* Infers whether to draw polygons based on existence and changed
parameter to optionally disable polygons
Expand All @@ -148,7 +143,7 @@ UPDATE
* Changed "nodes" parameter to boolean "draw.nodes" to enable/disable
node circles

REMOVED
## Removed
* Removed the fixed_angle argument (to be replaced by an angle column
in the tree input data.frame)
* Removed add.genes parameter
Expand All @@ -158,67 +153,58 @@ REMOVED
* Disabled genes.on.nodes mode


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.4.1 2022-05-05 (Dan Knight)
# CancerEvolutionVisualization 0.4.1 (2022-05-05)

UPDATE
## Update
* Automatically adjusts node size, shape, and text size based on the
length of the label text


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.4.0 2022-05-03 (Dan Knight)
# CancerEvolutionVisualization 0.4.0 (2022-05-03)

UPDATE
## Update
* Combined gene input dataframes into one

BUG
## Bug
* Fixed issue when trunk node is not positioned first in the input tree


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.3.0 2022-04-29 (Dan Knight)
# CancerEvolutionVisualization 0.3.0 (2022-04-29)

UPDATE
## Update
* Allow node labels to be specified separately

BUG
## Bug
* Fixed issue when creating ellipse nodes for longer labels


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.2.1 2022-04-14 (Dan Knight)
# CancerEvolutionVisualization 0.2.1 (2022-04-14)

UPDATE
## Update
* Allow tree input without CP and validate CP input values


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.2.0 2022-04-12 (Dan Knight)
# CancerEvolutionVisualization 0.2.0 (2022-04-12)

UPDATE
## Update
* Include tree preparation in SRCGrob to simplify use and improve
consistency.


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.1.1 2022-02-23 (Dan Knight)
# CancerEvolutionVisualization 0.1.1 (2022-02-23)

UPDATE
## Update
* Remove input sampling (assume that data has been prepared properly)


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.1.0 2021-11-08 (Dan Knight)
# CancerEvolutionVisualization 0.1.0 (2021-11-08)

UPDATE
## Update
* Add functions for deep comparison of plot Grobs.
* Update tests to use new comparisons and add test cases.


--------------------------------------------------------------------------
CancerEvolutionVisualization 0.0.0 2021-09-13 (Adriana Salcedo)
# CancerEvolutionVisualization 0.0.0 (2021-09-13)

INITIAL FEATURES

- Tree, CNA, and SNV input sampling
* Tree, CNA, and SNV input sampling
2 changes: 1 addition & 1 deletion R/add.nodes.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ add.normal <- function(clone.out, node.radius, label.cex, normal.cex = 1) {
'N',
x = unit(0.5, 'npc'),
y = unit(0.5, 'npc'),
name = 'ormal.label',
name = 'normal.label',
just = 'center',
gp = gpar(
col = 'black',
Expand Down
Loading
Loading