-
Notifications
You must be signed in to change notification settings - Fork 0
Ontologies
Ontosunburst allow you to use multiple integrated ontologies or to import yours.
You can use integrated ontologies with the ontology
parameter
or --ontology
and --onto
arguments.
Ex:
ontosunburst --onto ec
ontosunburst(ontology='ec')
The different ontologies are :
- Metacyc classes :
metacyc
- Enzyme commission numbers :
ec
- Kegg classes :
kegg
- Gene Ontology classes :
go
- ChEBI roles :
chebi
Ontologies can be used through integrated local files or through SPARQL requests.
If you don't precise a path to your own ontology file, default integrated files will be used :
-
metacyc
:ontosunburst/Inputs/MetaCyc26_0_classes.json
-
ec
:ontosunburst/Inputs/enzymes_ontology.json
-
kegg
:ontosunburst/Inputs/kegg_onto.json
If you don't want to use the default integrated files for the 3 previous ontologies you can
give yours as input with the class_ontology
parameter
or --class_ontology
and -cl
arguments.
Ex :
ontosunburst --onto ec -cl path/to/my/ec/ontology/file
ontosunburst(ontology='ec', class_ontology='path/to/my/ec/ontology/file')
For Chebi and Gene Ontology you must set up SPARQL servers and download OWL files to make queries.
You must launch the server before making each execution for these ontologies.
Requests are send by and URL linked to server.
You can precise your own URL with the endpoint_url
parameter or --url
argument.
Ex:
ontosunburst --onto chebi --url my/chebi/url
ontosunburst(ontology='go', endpoint_url='my/go/url')
Or use the default if you don't fill the parameter :
-
go
:http://localhost:3030/go/
-
chebi
:http://localhost:3030/chebi/
If you want to make sunburst with an ontology not integrated in the package you can do it by generating your own files with the right format and passing them as arguments.
To do so ypu need to :
- Define a class ontology json file (or dictionary) in
class_ontology
parameter or--class_ontology
and-cl
arguments. - Define the root of the ontology in
root
parameter or--root
and-r
arguments. - Not fill (=None) the
ontology
parameter or--ontology
and--onto
arguments.
You must define all the concepts of your ontology and associate all their direct parents.
Ex :
CT_ONTO = {'a': ['ab'], 'b': ['ab'], 'c': ['cde', 'cf'], 'd': ['cde'],
'e': ['cde', 'eg'], 'f': ['cf'], 'g': ['gh', 'eg'],
'h': ['gh'], 'ab': ['ROOT'], 'cde': ['cdecf', 'cdeeg'],
'cf': ['cdecf'], 'eg': ['cdeeg', 'ROOT'], 'gh': ['ROOT'],
'cdecf': ['ROOT'], 'cdeeg': ['cdeeg+'], 'cdeeg+': ['ROOT']}
You have also to precise the root of your ontology, here : 'ROOT'
.
You can pass it at argument as the dictionary or write it in a .json file and pass it as argument as the path of the file.
If you use command line you can only give a path to a .json file.
Ex :
ontosunburst -cl path/to/json/file -r ROOT
ontosunburst(class_ontology=CT_ONTO, root='ROOT')
# OR
ontosunburst(class_ontology='path/to/json/file', root='ROOT')
You will obviously need to indicate at least your interest set to generate the associated
sunburst (ex: ['a', 'b', 'c']
)
IRISA RENNES / Dyliss