forked from Isabelggayte/DEgenesHunter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enrichment for HCPC clusters inplemented
- Loading branch information
1 parent
e8d9613
commit fe7edee
Showing
4 changed files
with
153 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,103 @@ | ||
--- | ||
title: "ExpHunterSuite: Functional Report" | ||
author: "SysBioLab" | ||
output: | ||
html_document: | ||
toc: true | ||
toc_float: true | ||
df_print: paged | ||
fig_width: 12 | ||
--- | ||
|
||
<style type='text/css'> | ||
body .main-container { | ||
max-width: 90%; | ||
|
||
} | ||
|
||
.plot_real_size { | ||
overflow: scroll; | ||
max-height: 600px; | ||
} | ||
|
||
.plot_real_size img{ | ||
max-width: none; | ||
max-height: none; | ||
} | ||
|
||
embed { | ||
|
||
} | ||
</style> | ||
|
||
```{r config, include=FALSE, message=FALSE} | ||
require(ggplot2) | ||
require(knitr) | ||
require(clusterProfiler) | ||
require(enrichplot) | ||
require(DOSE) | ||
``` | ||
|
||
```{r child="func_initial_details.Rmd"} | ||
``` | ||
```{r child="func_deg_details.Rmd"} | ||
``` | ||
```{r child="func_top_genes.Rmd"} | ||
``` | ||
|
||
|
||
```{r ORA_analysis, echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
res_ora <- list() | ||
for(funsys in names(flags_ora)) { | ||
if(flags_ora[[funsys]] == TRUE) { | ||
enrich_obj <- func_results$ORA[[funsys]] | ||
exp_res <- knitr::knit_expand("ora_plots_all_objects.Rmd") | ||
res_ora[[funsys]] <- knitr::knit(text=exp_res, quiet=TRUE) | ||
} else { | ||
res_ora[[funsys]] <- paste0("## **No ORA enrichment found for ", funsys, "**\n") | ||
} | ||
} | ||
cat(unlist(res_ora), sep = '\n') | ||
res_gsea <- list() | ||
for(funsys in names(flags_gsea)) { | ||
if(flags_gsea[[funsys]] == TRUE) { | ||
enrich_obj <- func_results$GSEA[[funsys]] | ||
exp_res <- knitr::knit_expand("gsea_plots_all_objects.Rmd") | ||
res_gsea[[funsys]] <- knitr::knit(text=exp_res, quiet=TRUE) | ||
} else { | ||
res_gsea[[funsys]] <- paste0("## **No GSEA enrichment found for ", funsys, "**\n") | ||
} | ||
} | ||
cat(unlist(res_gsea), sep = '\n') | ||
``` | ||
|
||
```{r PCA_enr, echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
res_PCA <- list() | ||
for(funsys in names(flags_ora)) { | ||
if (funsys %in% c("BP", "MF", "CC")){ | ||
pca_enr_all <- func_results$PCA_enrichments$all_genes[[funsys]] | ||
pca_enr_degs <- func_results$PCA_enrichments$DEGs[[funsys]] | ||
pca_enr <- knitr::knit_expand("pca_enr.Rmd") | ||
res_PCA[[funsys]] <- knitr::knit(text=pca_enr, quiet=TRUE) | ||
} | ||
} | ||
cat(unlist(res_PCA), sep = '\n') | ||
``` | ||
|
||
## **Values of options passed to the Functional Hunter main function** | ||
First column contains the option names; second column contains the given values for each option. | ||
Note that large data objects (e.g. expression results, | ||
organism table and custom annotation files) are not shown. | ||
```{r opt_vals, echo = FALSE, results='asis'} | ||
final_main_params <- func_results$final_main_params[! sapply(func_results$final_main_params, is.list)] | ||
print(knitr::kable(cbind(final_main_params))) | ||
--- | ||
title: "ExpHunterSuite: Functional Report" | ||
author: "SysBioLab" | ||
output: | ||
html_document: | ||
toc: true | ||
toc_float: true | ||
df_print: paged | ||
fig_width: 12 | ||
--- | ||
|
||
<style type='text/css'> | ||
body .main-container { | ||
max-width: 90%; | ||
|
||
} | ||
|
||
.plot_real_size { | ||
overflow: scroll; | ||
max-height: 600px; | ||
} | ||
|
||
.plot_real_size img{ | ||
max-width: none; | ||
max-height: none; | ||
} | ||
|
||
embed { | ||
|
||
} | ||
</style> | ||
|
||
```{r config, include=FALSE, message=FALSE} | ||
require(ggplot2) | ||
require(knitr) | ||
require(clusterProfiler) | ||
require(enrichplot) | ||
require(DOSE) | ||
``` | ||
|
||
```{r child="func_initial_details.Rmd"} | ||
``` | ||
```{r child="func_deg_details.Rmd"} | ||
``` | ||
```{r child="func_top_genes.Rmd"} | ||
``` | ||
|
||
|
||
```{r ORA_analysis, echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
res_ora <- list() | ||
for(funsys in names(flags_ora)) { | ||
if(flags_ora[[funsys]] == TRUE) { | ||
enrich_obj <- func_results$ORA[[funsys]] | ||
exp_res <- knitr::knit_expand("ora_plots_all_objects.Rmd") | ||
res_ora[[funsys]] <- knitr::knit(text=exp_res, quiet=TRUE) | ||
} else { | ||
res_ora[[funsys]] <- paste0("## **No ORA enrichment found for ", funsys, "**\n") | ||
} | ||
} | ||
cat(unlist(res_ora), sep = '\n') | ||
res_gsea <- list() | ||
for(funsys in names(flags_gsea)) { | ||
if(flags_gsea[[funsys]] == TRUE) { | ||
enrich_obj <- func_results$GSEA[[funsys]] | ||
exp_res <- knitr::knit_expand("gsea_plots_all_objects.Rmd") | ||
res_gsea[[funsys]] <- knitr::knit(text=exp_res, quiet=TRUE) | ||
} else { | ||
res_gsea[[funsys]] <- paste0("## **No GSEA enrichment found for ", funsys, "**\n") | ||
} | ||
} | ||
cat(unlist(res_gsea), sep = '\n') | ||
``` | ||
|
||
```{r PCA_enr, echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
res_PCA <- list() | ||
for(funsys in names(flags_ora)) { | ||
if (funsys %in% c("BP", "MF", "CC")){ | ||
pca_enr_all <- func_results$PCA_enrichments$all_genes[[funsys]] | ||
pca_enr_degs <- func_results$PCA_enrichments$DEGs[[funsys]] | ||
pca_cl_all <- func_results$PCA_clusters_results$all_genes[[funsys]] | ||
pca_cl_degs <- func_results$PCA_clusters_results$DEGs[[funsys]] | ||
pca_enr <- knitr::knit_expand("pca_enr.Rmd") | ||
res_PCA[[funsys]] <- knitr::knit(text=pca_enr, quiet=TRUE) | ||
} | ||
} | ||
cat(unlist(res_PCA), sep = '\n') | ||
``` | ||
|
||
## **Values of options passed to the Functional Hunter main function** | ||
First column contains the option names; second column contains the given values for each option. | ||
Note that large data objects (e.g. expression results, | ||
organism table and custom annotation files) are not shown. | ||
```{r opt_vals, echo = FALSE, results='asis'} | ||
final_main_params <- func_results$final_main_params[! sapply(func_results$final_main_params, is.list)] | ||
print(knitr::kable(cbind(final_main_params))) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters