Skip to content

Commit

Permalink
Merge pull request #163 from krassowski/cran-and-docs
Browse files Browse the repository at this point in the history
Minor fixes for CRAN, docs improvements, revert `linewidth` for now
  • Loading branch information
krassowski authored Nov 11, 2022
2 parents 21373e6 + 6b5be4e commit bb3f10a
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ComplexUpset
Type: Package
Title: Create Complex UpSet Plots Using 'ggplot2' Components
Version: 1.3.4
Version: 1.3.5
Authors@R: person(
"Michał", "Krassowski", email = "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-9638-7785"))
Expand Down
31 changes: 31 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# Version 1.3.5

2022-11-11

Maintenance:

- Revert `size``linewidth` migration for now to retain compatibility with older ggplot2 versions
- Use `inherits` to satisfy CRAN checks

# Version 1.3.4

2022-11-11

Enhancements:

- Accept `tibble`s in `arrange_venn`, thanks @maximilian-heeg! #159

Maintenance:

- Pass `width=0.9` to workaround change of behaviour in ggplot2 3.4 overextending the width of bars highlighted with `upset_query`
- Fix deprecation warnings for ggplot 3.4 `size` to `linewidth` transition

Expand All @@ -14,30 +25,35 @@ Maintenance:
2021-12-07

Bug fixes:

- Makes zero-degree intersection size for `intersections='all'` mode follow the same behavior as the bar plot #144

# Version 1.3.2

2021-12-06

Bug fixes:

- Enable displaying degree 0 intersection with `group_by='sets'`. The old behavior of not displaying degree zero intersection can be achieved by using `min_degree=1` argument #143

# Version 1.3.1

2021-08-04

Fixes:

- use `guide="none"` instead of `guide=FALSE` to silence ggplot2 deprecation warning, thanks @MilouArts! #129

# Version 1.3.0

2021-06-06

Changes:

- sets on intersection matrix can now be highlighted using `upset_query()` #115

Bug fixes:

- alleviate visual glitch of `geom_segment` in intersections matrix showing up with an outline #113
- fixed aesthetics assigned by `upset_query()` which was sometimes not behaving as expected #123

Expand All @@ -46,23 +62,27 @@ Bug fixes:
2021-04-25

Bug fixes:

- fixed metadata order in data frame returned by `arrange_venn()` function #116

# Version 1.2.0

2021-04-03

Bug fixes:

- [critical] fixed display order of labels when using `encode_sets=TRUE` #110
- encoding of set names will now properly work around name conflicts #110

Major improvements:

- manually specified intersections will now display empty intersections and non-exclusive intersections correctly #109
- manually specified intersections do not require modifying the `intersect` argument to obtain the intended result any longer #109
- stripes size and other attributes of underlying `geom_segment()` can now be customised with new function: `upset_stripes()` #111
- stripes colour and other attributes can now be mapped to data #111

Minor improvements:

- data.table can be passed instead of data.frame (the conversion will be performed automatically) #105
- warning will be shown if a vector is provided instead of a list to the `intersections` argument #109
- when `intersections` argument includes sets not specified in `intersect`, a warning will be issued and execution will proceed as if those were included in `intersect` #109
Expand All @@ -73,6 +93,7 @@ Minor improvements:
2021-01-13

New features:

- it is now possible to select specific intersections passing `intersections = list('Drama', c('Comedy', 'Romance'))`
- it is now possible to define custom order of intersections passing `intersections = list('Drama', c('Comedy', 'Romance'))` and `sort_intersections = FALSE`

Expand All @@ -81,6 +102,7 @@ New features:
2021-01-05

Bug fixes:

- Major performance and memory use improvements, especially when using `intersections = 'all'`
- The `max_combinations_n` fail-safe was replaced by a more useful `max_combinations_datapoints_n` with more precise error message
- The atypical use case of filtering with `max_degree = 0` is now accepted again
Expand All @@ -91,6 +113,7 @@ Bug fixes:
2021-01-04

Bug fixes:

- Fixed regression of non-observed sets causing "no vector columns were selected" caused by fix addressing #90
- Reduced length of file names for some test doppelgangers

Expand All @@ -99,6 +122,7 @@ Bug fixes:
2021-01-04

Bug fixes:

- Filtering by degree when using non-default mode and `intersections='all'` now correctly accounts for all observations (#89)
- Empty sets/groups are now correctly removed when filtering with a non-default mode (#90)
- Missing values are now converted to FALSE and a warning is issued to the user rather than causing an undefined behavior (#88)
Expand All @@ -108,6 +132,7 @@ Bug fixes:
2020-12-30

Changes:

- Lists with computed sizes are now returned in a single list called `sizes` by `upset_data()`
- Set sizes are now **not** filtered by default when selecting intersections by `min_*` or `max_*` criteria. Pass `filter_intersections=TRUE` to `upset_set_sizes()` to restore the previous behaviour
- Union sizes are now calculated before data trimming which provides more accurate ratio estimates
Expand All @@ -117,12 +142,14 @@ Changes:
- `min_max_early` argument is no longer required and was removed

New features:

- Annotations can now access data for any of the available modes by adding `upset_mode()` layer. By default the annotations are given data corresponding to the same mode as the mode of the passed in the `upset()` call.
- It is now possible to display all intersections, even if those are not present in the data by passing `intersections='all'` to `upset()`; this is only feasible for <20 sets, but filtering by degree can allow to explore a subset of all intersections when there are many more sets; this is only useful for modes different from the default exclusive intersection.
- If filtering leads to no intersections, an informative error is shown (#80)


Bug fixes:

- Modes passed to `upset()` are now also used for sorting and trimming
- Size calculation for modes was optimised for better performance
- User-added layers are now shown on top of `intersection_size()` and `intersection_union()`
Expand All @@ -133,20 +160,24 @@ Bug fixes:
2020-12-20

Changes:

- Pass metadata to the `ggplot2` when arranging Venn diagram, allowing to map elements aesthetics details

# Version 0.9.0

2020-12-20

New features:

- Intersection modes were formalised with the default remaining `exclusive_intersection` (alias `distinct`); additional modes are: `inclusive_intersection` (alias `intersect`), `inclusive_union` and `exclusive_union`; please read the [relevant part of the documentation](https://krassowski.github.io/complex-upset/articles/Examples_R.html#0-2-region-selection-modes) for details (#78).
- Simple Venn diagrams (for two or three sets) can now be constructed using same input (binary presence data frame) using pseudo geoms: `geom_venn_circle()`, `geom_venn_label_region()`, `geom_venn_label_set()`, `geom_venn_region()` and scales `scale_color_venn_mix()` and `scale_fill_venn_mix()`; while developed mostly for the documentation needs, it provides unique capability of highlighting relevant regions of the Venn diagram and placing observations within appropriate regions (which allows to demonstrate their attributes with appropriate aesthetics mapping).

Changes:

- Breaking: union size for "empty" intersection is now equal to its size

Bug fixes:

- Layers added to `upset_set_size()` and `intersection_matrix()` will now always go on top (avoiding geoms being hidden underneath)
- Declare layer in NAMESPACE to allow basic usage without loading `ggplot2`
- `upset_query()` will now throw an informative error when the user forgets to pass any aesthetics (#79)
Expand Down
6 changes: 3 additions & 3 deletions R/upset.R
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ matrix_background_stripes = function(data, stripes, orient='horizontal') {
#' @param colors a vector of colors to repeat as many times as needed for the fill of stripes, or a named vector specifying colors for values of the variable mapped to the color aesthetics in the mapping argument
#' @param data the dataset describing the sets with a column named `set` and any other columns as needed for mapping
#' @export
upset_stripes = function(mapping=aes(), geom=geom_segment(linewidth=7), colors=c('white', 'grey95'), data=NULL) {
upset_stripes = function(mapping=aes(), geom=geom_segment(size=7), colors=c('white', 'grey95'), data=NULL) {
stripes = list(
mapping=mapping,
geom=geom,
Expand Down Expand Up @@ -962,7 +962,7 @@ upset = function(

mode = solve_mode(mode)

if (class(base_annotations) == 'character') {
if (inherits(base_annotations, 'character')) {
if (base_annotations != 'auto') {
stop('Unsupported value for `base_annotations`: provide a named list, or `"auto"`')
} else {
Expand All @@ -973,7 +973,7 @@ upset = function(
}

# for backwards compatibility pre 1.2
if (class(stripes) != 'upset_stripes') {
if (!inherits(stripes, 'upset_stripes')) {
stripes = upset_stripes(colors=stripes)
}

Expand Down
2 changes: 1 addition & 1 deletion man/upset_stripes.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bb3f10a

Please sign in to comment.