[e25014]: / man / enrich_circo_bar.Rd

Download this file

156 lines (146 with data), 3.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EnrichCircoBar.R
\name{enrich_circo_bar}
\alias{enrich_circo_bar}
\title{Combine and Visualize Data with Circular Bar Chart}
\usage{
enrich_circo_bar(data_list)
}
\arguments{
\item{data_list}{A list of data frames to be combined.}
}
\value{
A `ggplot` object representing the Circular Bar Chart.
}
\description{
This function combines multiple data frames, arranges them, and visualizes the combined data
in a Circular Bar Chart using the 'ggplot2' and 'ggalluvial' packages.
}
\examples{
# Create sample data frames for each enrichment category
# 1. Biological Process (BP)
filtered_data_BP <- data.frame(
Description = c(
"immune response",
"cell proliferation",
"signal transduction",
"apoptotic process",
"metabolic process"
),
Count = c(120, 85, 150, 60, 95),
color = c(
"#1f77b4", # blue
"#ff7f0e", # orange
"#2ca02c", # green
"#d62728", # red
"#9467bd" # purple
),
stringsAsFactors = FALSE
)
# 2. Cellular Component (CC)
filtered_data_CC <- data.frame(
Description = c(
"nucleus",
"cytoplasm",
"membrane",
"mitochondrion",
"extracellular space"
),
Count = c(90, 110, 75, 65, 80),
color = c(
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
),
stringsAsFactors = FALSE
)
# 3. Molecular Function (MF)
filtered_data_MF <- data.frame(
Description = c(
"protein binding",
"DNA binding",
"enzyme activity",
"transporter activity",
"receptor activity"
),
Count = c(140, 130, 100, 70, 90),
color = c(
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
),
stringsAsFactors = FALSE
)
# 4. Disease Ontology (DO)
filtered_data_DO <- data.frame(
Description = c(
"cancer",
"cardiovascular disease",
"neurological disorder",
"metabolic disease",
"infectious disease"
),
Count = c(200, 150, 120, 90, 160),
color = c(
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
),
stringsAsFactors = FALSE
)
# 5. Reactome Pathways
filtered_data_Reactome <- data.frame(
Description = c(
"Cell Cycle",
"Apoptosis",
"DNA Repair",
"Signal Transduction",
"Metabolism of Proteins"
),
Count = c(110, 95, 80, 130, 85),
color = c(
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
),
stringsAsFactors = FALSE
)
# 6. KEGG Pathways
filtered_data_kegg <- data.frame(
Description = c(
"PI3K-Akt signaling pathway",
"MAPK signaling pathway",
"NF-kappa B signaling pathway",
"JAK-STAT signaling pathway",
"Toll-like receptor signaling pathway"
),
Count = c(175, 160, 145, 130, 155),
color = c(
"#1f77b4",
"#ff7f0e",
"#2ca02c",
"#d62728",
"#9467bd"
),
stringsAsFactors = FALSE
)
# Combine all filtered data frames into a list
data_list <- list(
BP = filtered_data_BP,
CC = filtered_data_CC,
MF = filtered_data_MF,
DO = filtered_data_DO,
Reactome = filtered_data_Reactome,
KEGG = filtered_data_kegg
)
# Create the Circular Bar Chart
combined_and_visualized_data <- enrich_circo_bar(data_list)
}