|
a |
|
b/man/adjust_export_pathway.Rd |
|
|
1 |
% Generated by roxygen2: do not edit by hand |
|
|
2 |
% Please edit documentation in R/EnrichCirclize.R |
|
|
3 |
\name{adjust_export_pathway} |
|
|
4 |
\alias{adjust_export_pathway} |
|
|
5 |
\title{Adjust and Export Pathway Analysis Results} |
|
|
6 |
\usage{ |
|
|
7 |
adjust_export_pathway(fgseaRes, nTop = 10) |
|
|
8 |
} |
|
|
9 |
\arguments{ |
|
|
10 |
\item{fgseaRes}{Dataframe containing fgsea results with columns 'pathway', 'ES', and 'pval'.} |
|
|
11 |
|
|
|
12 |
\item{nTop}{Integer, number of top pathways to select based on the p-value.} |
|
|
13 |
} |
|
|
14 |
\value{ |
|
|
15 |
A vector containing combined top upregulated and downregulated pathways. |
|
|
16 |
} |
|
|
17 |
\description{ |
|
|
18 |
This function processes a dataframe containing fgsea results. It adjusts pathway names |
|
|
19 |
by removing underscores, converting to lowercase, then capitalizing the first letter, |
|
|
20 |
and joining the components with spaces. It selects and merges the top upregulated |
|
|
21 |
and downregulated pathways based on enrichment score (ES) and p-value. |
|
|
22 |
} |
|
|
23 |
\examples{ |
|
|
24 |
# Create a synthetic fgseaRes dataframe |
|
|
25 |
fgseaRes <- data.frame( |
|
|
26 |
pathway = c("KEGG_APOPTOSIS", |
|
|
27 |
"GO_CELL_CYCLE", |
|
|
28 |
"REACTOME_DNA_REPAIR", |
|
|
29 |
"KEGG_METABOLISM", |
|
|
30 |
"GO_TRANSPORT"), |
|
|
31 |
ES = c(0.45, -0.22, 0.56, -0.35, 0.33), |
|
|
32 |
pval = c(0.001, 0.02, 0.0003, 0.05, 0.01) |
|
|
33 |
) |
|
|
34 |
|
|
|
35 |
# Run the function to get top pathways |
|
|
36 |
result <- adjust_export_pathway(fgseaRes = fgseaRes, nTop = 2) |
|
|
37 |
|
|
|
38 |
} |