Beispiel #1
0
 def go_graph(self, locus_identifier, are_ids=False):
     from src.sgd.backend.nex import graph_tools
     from src.sgd.model.nex.auxiliary import Bioconceptinteraction
     if are_ids:
         locus_id = locus_identifier
     else:
         locus_id = get_obj_id(locus_identifier, class_type='BIOENTITY', subclass_type='LOCUS')
     return None if locus_id is None else json.dumps(graph_tools.make_graph(locus_id, Bioconceptinteraction, 'GO', 'LOCUS'))
Beispiel #2
0
 def protein_domain_graph(self, locus_identifier, are_ids=False):
     import graph_tools
     from src.sgd.model.nex.auxiliary import Bioiteminteraction
     from src.sgd.model.nex.bioitem import Domain
     if are_ids:
         locus_id = locus_identifier
     else:
         locus_id = get_obj_id(locus_identifier, class_type='BIOENTITY', subclass_type='LOCUS')
     return None if locus_id is None else json.dumps(graph_tools.make_graph(locus_id, Bioiteminteraction, 'DOMAIN', 'LOCUS'))