Skip to content
Open
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,16 @@ upset_data = function(
unique(unlist(intersections_members)),
NOT_IN_KNOWN_SETS
)
provided_intersection_sizes = sapply(intersections_members, length)
provided_intersection_sizes[intersections_members == NOT_IN_KNOWN_SETS] = 0

# TODO: this is slow and memory hungry; ideally we would only get the relevant intersection straight away!
possible_intersections = all_intersections_matrix(intersect, NULL, 0, Inf)
possible_intersections = all_intersections_matrix(
intersect,
NULL,
min(provided_intersection_sizes),
max(provided_intersection_sizes)
)

relevant_intersections = rownames(possible_intersections[
rowSums(possible_intersections[, sets_from_manual_intersections]) > 0,
Expand Down Expand Up @@ -1057,4 +1064,4 @@ create_upset_abc_example = function() {
rep(F, 2)
)
)
}
}