Suggestion: Include an example to extract gene combinations from UpSetR output

Open Beginner friendly
#1,251 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
r
Domain
documentation

Research direction

Open the UpSetR section in the project documentation, choosing the relevant book or vignette mentioned in the issue. Add the supplied example for extracting gene combinations and readable labels, then verify that it renders clearly and demonstrates the resulting list structure for downstream analysis.

Written by the indexing model from the issue text.

Description

Hi! First of all, thank you for the great work on the package <3. I'm currently using it for a gene expression analysis comparing experimental groups, and I encountered a recurring need: extracting the specific gene lists that correspond to each combination shown in the UpSet plot.

I’d like to propose adding the following example to the documentation (book or vignette) under the UpSetR section, as it could benefit researchers working with biological datasets—particularly those dealing with transcriptomics or pathway analysis.

# Obtain set names
set_names <- set_name(m1)

# Get binary names of combinations
comb_bin <- comb_name(m1)

# Create list with subsets by combination
comb_sets <- lapply(comb_name(m1), function(nm) extract_comb(m1, nm))

# Generate readable names for combinations
comb_labels <- sapply(comb_bin, function(bin) {
  active <- as.logical(as.integer(strsplit(bin, "")[[1]]))
  paste(set_names[active], collapse = ",")
})

# Assign these names to the list
names(comb_sets) <- comb_labels

str(comb_sets) # list 15

This approach provides a modular and interpretable way to bridge the visual output of the plot with downstream analyses like enrichment testing (e.g., GO or KEGG). It's especially useful when prioritizing subsets based on their biological relevance or visual prominence in the plot.

Thanks for considering this addition—and again, congrats on the great tool!

Dominant language
R
Stars
1.6k
Forks
255
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jokergoo/ComplexHeatmap

All issues in jokergoo/ComplexHeatmap

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.