def __init__(self, query=None): self.string = query self.query = None self.card = _target_df.copy() self.run_query() self.update_results(index_result=0)
def update_results(self,index_result=0): uniprot_id = self.query[index_result][0] self.card = _target_df.copy() self.card = self.card.append(_target_id_2_card_dict(uniprot_id), ignore_index=True) self.compounds = _compound_from_target_df.copy() self.interactions = None
def __init__(self, query=None): self.string = query self.query = None self.card = _target_df.copy() self.compounds = _compound_from_target_df.copy() if query is not None: self.run_query()
def info_results(self): from chembl_webresource_client.new_client import new_client tmp_df = _target_df.copy() for result in self.query: chembl_id = result['target_chembl_id'] tmp_df =tmp_df.append(_target_id_2_card_dict(chembl_id, new_client),ignore_index=True) del(new_client) return tmp_df
def info_results(self,last=30): tmp_df = _target_df.copy() ii=0 for result in self.query: uniprot_id = result[0] tmp_df =tmp_df.append(_target_id_2_card_dict(uniprot_id),ignore_index=True) ii+=1 if ii==last: break return tmp_df
def update_results(self,index_result=0): from chembl_webresource_client.new_client import new_client chembl_id = self.query[index_result]['target_chembl_id'] self.card = _target_df.copy() self.card =self.card.append(_target_id_2_card_dict(chembl_id, new_client),ignore_index=True) self.activity_filter = new_client.molecule.filter(target_chembl_id__in=chembl_id) self.molecule_filter = new_client.activity.filter(target_chembl_id__in=chembl_id) self.compounds = _compound_from_target_df.copy() for result in self.molecule_filter: tmp_dict = _compound_from_target_2_card_dict(result, new_client) self.compounds = self.compounds.append(tmp_dict,ignore_index=True)