UpsetjsPlot | R Documentation |
Create an interactive UpSet plot of overlapping DEGs using "UpsetJS".
UpsetjsPlot(
WD_samples,
Th_logFC,
Th_Pvalue,
collapseName,
nintersects,
st_significance
)
WD_samples |
Character. Directory containing DEG result CSV files. |
Th_logFC |
Numeric. Absolute log2 fold-change threshold to include a gene. |
Th_Pvalue |
Numeric. P-value threshold for significance (0 < Th_Pvalue <= 1). |
collapseName |
Logical. If TRUE, strip method/model prefixes from file names when labeling sets. |
nintersects |
Integer. Maximum number of intersections to display. |
st_significance |
Character. Which p-value to use: "adjustPvalue" (FDR or FWER) or "PValue". |
This function reads DEG CSV files from a directory, filters genes by log-FC and p-value thresholds (adjusted or raw), optionally simplifies file names, and visualizes the intersections of gene sets using the "UpsetJS" package.
Lists all CSV files in "WD_samples" and reads each into a data frame.
Checks for duplicate IDs and selects "ID", "logFC", and either "adjustPvalue" or "PValue".
Filters each set by "|logFC| >= Th_logFC" and p-value < "Th_Pvalue".
Renames each gene-ID list to the (optionally collapsed) file name.
Feeds the list of gene sets into "upsetjs::upsetjs()"
An interactive "UpsetJS" object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.