Some scripts to prepare ontology long table for enrichment and GSEA analysis.
python3 -m pip install pandas owlready2 retrying openpyxl
Just run this, annotation will be downloaded from Oryzabase annotation.
python3 scripts/get_ontologies_from_oryzabase.py
First, download Sitalica_312_v2.2.annotation_info.txt
from JGI Sitalica annotation
Then replace the jgi_si_annotation
path in scripts/clean_jgi_si_annotation.py
.
Finally, run this.
python3 scripts/clean_jgi_si_annotation.py
First download GO annotation from TAIR
aria2c "https://www.arabidopsis.org/api/download-files/download?filePath=GO_and_PO_Annotations/Gene_Ontology_Annotations/ATH_GO_GOSLIM.txt.gz"
gzip -d ATH_GO_GOSLIM.txt.gz
Then run the script.
python3 scripts/clean_ath_go.py
in TAIR Gene Search page, use different chromosome as filter, after clicking "Submit Query" bottom and search results displayed, click "Download All" bottom to download result tsv file.
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()