Last active
January 16, 2024 22:59
-
-
Save hmartiniano/00aabc83f0f20a9f7f803a7aae9b17e3 to your computer and use it in GitHub Desktop.
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
import subprocess | |
from goatools.semantic import get_info_content | |
from goatools.base import get_godag | |
from goatools.semantic import TermCounts | |
from goatools.anno.factory import get_objanno | |
godag = get_godag("go-basic.obo") | |
return_code = subprocess.call("wget https://ftp.ebi.ac.uk/pub/databases/GO/goa/HUMAN/goa_human.gpa.gz && gunzip goa_human.gpa.gz", shell=True) | |
anno = get_objanno('goa_human.gpa', 'gpad', godag=godag) | |
cnt = TermCounts(godag, anno.get_id2gos_nss()) | |
tinf = {t: get_info_content(t, cnt) for t in godag.keys()} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment