---
title: "GO-term analysis"
date: last-modified
author:
   - name:  "Srimeenakshi Sankaranarayanan"
title-block-banner: true
format: 
    html:
        theme: flatly
        self-contained: true
        code-fold: true
        code-tools: true
        code-summary: "Show the code"
        toc: true
        number-sections: true
        anchor-sections: true
editor: visual
execute:
  echo: true
  error: false
  warning: false
  message: false
---

```{r}
# Libraries
library(BSgenome.Umaydis.ENSMBL.UM1) # forged ustilago genome
library(ggplot2)
library(forcats)
library(tidyr)
library(dplyr)
library(tidyverse)
library(magrittr)
library(ggpp)
library(gginnards)
library(ggrepel)
library(ggpubr)
library(ggforce)
library(ggrastr)
library(viridis)
library(reshape2)
library(gprofiler2)
```


```{r}
load("C:/Users/Sri/Documents/Khd4/DGE_analysis_SM_PhD/Kathis_lab/hyperTRIBE/hyperTRIBE.rds")
```


GO-term enrichment analysis with high confidence Khd4 targets were analysed using gprofiler2.

```{r}
highConf.gene=data.frame(high.conf.khd4)
highConf.gene=unique(highConf.gene$gene.id)



HCgO= gost(query = highConf.gene, 
                organism = "umaydis", ordered_query = FALSE, 
                multi_query = FALSE, significant = TRUE, exclude_iea = FALSE, 
                measure_underrepresentation = FALSE, evcodes = TRUE, 
                user_threshold = 0.05, correction_method = "g_SCS", 
                domain_scope = "annotated", custom_bg = NULL, 
                numeric_ns = "", sources = NULL, as_short_link = FALSE)

#visualization
vis.HCgO<- gostplot(HCgO, capped = TRUE, interactive = TRUE)
vis.HCgO
```


```{r}
#get the link to download .gem files
gost(query = highConf.gene, 
                organism = "umaydis", ordered_query = FALSE, 
                multi_query = FALSE, significant = TRUE, exclude_iea = FALSE, 
                measure_underrepresentation = FALSE, evcodes = TRUE, 
                user_threshold = 0.05, correction_method = "g_SCS", 
                domain_scope = "annotated", custom_bg = NULL, 
                numeric_ns = "", sources = NULL, as_short_link = TRUE)
```


```{r}
sessionInfo()
```


