def regulation_target_enrichment(self, locus_identifier, are_ids=False): from src.sgd.model.nex.evidence import Regulationevidence from src.sgd.backend.nex import view_go if are_ids: locus_id = locus_identifier else: locus_id = get_obj_id(locus_identifier, class_type='BIOENTITY', subclass_type='LOCUS') target_ids = set([x.locus2_id for x in DBSession.query(Regulationevidence).filter_by(locus1_id=locus_id).all()]) if len(target_ids) > 0: return json.dumps(view_go.make_enrichment(target_ids)) else: return '[]'
def domain_enrichment(self, domain_identifier, are_ids=False): from src.sgd.model.nex.evidence import Domainevidence from src.sgd.backend.nex import view_go if are_ids: domain_id = domain_identifier else: domain_id = get_obj_id(domain_identifier, class_type='BIOITEM', subclass_type='DOMAIN') target_ids = set([x.locus_id for x in DBSession.query(Domainevidence).filter_by(domain_id=domain_id).all()]) if len(target_ids) > 0: return json.dumps(view_go.make_enrichment(target_ids)) else: return '[]'
def go_enrichment(self, bioent_ids): from src.sgd.backend.nex import view_go return json.dumps(view_go.make_enrichment(bioent_ids))