Upset.Binary.Dataframe: Compute a usable matrix to make an Upset plot

Description Usage Arguments Value Examples

View source: R/Visualization.R

Description

Fill the dataframe with binary values. 0 for non differentially expressed genes and 1 for the other.

Usage

1
Upset.Binary.Dataframe(data.to.comp, threshold)

Arguments

data.to.comp

Dataframe of DEG pvalues with genes in columns, and methods in rows.

threshold

Threshold value to fill the dataframe with binary values. By default threshold = 0.05

Value

dataframe filled with binary values

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Import the dataset
Data = matrix(runif(5000, 10, 100), ncol=20)
group = paste0(rep(c("control", "case"), each = 10),rep(c(1:10),each = 1))
genes <- paste0(rep(LETTERS[1:25], each=10), rep(c(1:10),each = 1))
colnames(Data) = group
row.names(Data) = genes 

# Compute Pvalues for all the methods 
# res.DEG = tools.DEG.RNAseq.merge(Data)
# Make a binary matrix to construct an Upset plot
# Upset = Upset.Binary.Dataframe(res.DEG)
#upset(Upset, sets = names(Upset), 
#          sets.bar.color = "#56B4E9", 
#          order.by = "freq", 
#          empty.intersections = NULL )

jtcasemajor/GENEXPRESSO documentation built on Dec. 21, 2021, 4:11 a.m.