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.
Functional enrichments report for PCs has been created
- Loading branch information
1 parent
524c9ca
commit 6dea593
Showing
10 changed files
with
137 additions
and
43 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
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
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
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
```{r , echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
print_go_tables <- function(all_enr) { | ||
cat("\n\n\n<br>") | ||
cat('<div style="display:flex; flex-wrap: wrap;">') | ||
for (dimension in names(all_enr)) { | ||
cat('<div style ="width:50%">') | ||
cat(paste0("\n**",dimension,"**<br>")) | ||
top_GOs <- head(all_enr[[dimension]], 10) | ||
if (nrow(top_GOs) != 0){ | ||
top_GOs <- top_GOs[,c("GO.ID","Term","p.value","fdr")] | ||
print(htmltools::tagList( | ||
DT::datatable(top_GOs, filter = 'top', rownames = FALSE, extensions = c('Buttons','ColReorder'), | ||
options = list( | ||
colReorder = TRUE, | ||
dom = 'lftBip', | ||
buttons = c('copy', 'csv', 'excel'))) | ||
)) | ||
} else { | ||
cat("\n**No enrichments found**\n") | ||
} | ||
cat("</div>") | ||
} | ||
cat("</div>") | ||
} | ||
``` | ||
```{r "{{funsys}}_enr", echo=FALSE, results='asis', message=FALSE, warning=FALSE} | ||
cat("\n## **{{funsys}} - Enrichments for Principal Components**\n") | ||
cat("### **Functional enrichments of PCs using all genes**\n") | ||
FactoMineR::plot.PCA(func_results$pca_data$all_genes$pca_data, invisible = "quali" , title = "") | ||
print_go_tables(pca_enr_all) | ||
cat("### **Functional enrichments of PCs using only DEGs**\n") | ||
FactoMineR::plot.PCA(func_results$pca_data$DEGs$pca_data, invisible = "quali" , title = "") | ||
print_go_tables(pca_enr_degs) | ||
# for (dimension in names(pca_enr_degs)) { | ||
# cat(paste0("\n**",dimension,"**\n")) | ||
# top_GOs <- head(pca_enr_degs[[dimension]], 10) | ||
# if (nrow(top_GOs) != 0){ | ||
# top_GOs <- top_GOs[,c("GO.ID","Term","p.value","fdr")] | ||
# print(htmltools::tagList( | ||
# DT::datatable(top_GOs, filter = 'top', rownames = FALSE, extensions = c('Buttons','ColReorder'), | ||
# options = list( | ||
# colReorder = TRUE, | ||
# dom = 'lftBip', | ||
# buttons = c('copy', 'csv', 'excel'))) | ||
# )) | ||
# } else { | ||
# cat("\n**No enrichments found**\n") | ||
# } | ||
# } | ||
# pca_enr_degs | ||
``` |