Created
August 6, 2018 13:00
-
-
Save elipapa/ad0d02ac7f50dc308d31cf0d0262d939 to your computer and use it in GitHub Desktop.
create a EFO code <=> labels mapping file
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
# pip install ontoma | |
from ontoma.interface import OnToma | |
ot = OnToma() | |
# the following will download the latest EFO OBO file from github | |
# and output a tab separated files of labels <=> codes to a file | |
for k,v in ot.efo_to_name.items(): | |
print(k,v,file=open('efolabel.txt','a'),sep="\t") | |
# you can replace the colon with an underscore: | |
for k,v in ot.efo_to_name.items(): | |
print(k.replace(':',"_"),v,file=open('efolabel.underscore.txt','a'),sep="\t") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment