Some scripts to prepare ontology long table for enrichment and GSEA analysis.
python3 -m pip install pandas owlready2 retrying openpyxl
python3 scripts/get_ontologies_from_oryzabase.py
python3 scripts/clean_jgi_si_annotation.py
install.packages("readxl")
install.packages("BiocManager")
BiocManager::install("clusterProfiler")
onto = readxl::read_excel("results/oryzabase-ontologies.xlsx", sheet="RAP_GO")
gene = c("Os01g0118100", "Os01g0549700", "Os02g0710800", "Os03g0108600", "Os03g0158200", "Os03g0746500")
universe = NULL
enrich_res = clusterProfiler::enricher(
gene=gene,
universe=universe,
TERM2GENE=onto[c("OntoID", "GeneID")],
TERM2NAME=onto[c("OntoID", "Description")]
)
write.csv(as.data.frame(enrich_res), "enrich_res.csv")
svg("demo_dotplot.svg")
clusterProfiler::dotplot(enrich_res)
dev.off()