def __init__(self, name: str, coh_AASeq: AASeq, doc_AASeq: AASeq, purples: int, j=False, originals=None, doc_wt=False): self.name = name self.coh_AASeq = coh_AASeq self.doc_AASeq = doc_AASeq self.purples = purples if not j: name_split = name.split('_') a_ind = name_split.index('A') self.coh_wt = name_split[a_ind - 1] self.doc_wt = name_split[a_ind + 1] elif doc_wt: self.coh_wt = '1ohz' self.doc_wt = doc_wt else: self.coh_wt = '1ohz' self.doc_wt = originals[name[:-3] + '.pdb.gz'].split('_A_')[1].split('_')[0] pos_str = coh_AASeq.get_positions(positions_dict['1ohz']) self.coh_switch = ''.join( [type_dict[a] if a in type_dict.keys() else 'c' for a in pos_str]) doc_str = doc_AASeq.get_positions(list(doc21ohz[self.doc_wt].keys())) self.doc_switch = ''.join( [type_dict[a] if a in type_dict.keys() else 'c' for a in doc_str])
def __init__(self, name: str, coh_AASeq: AASeq, doc_AASeq: AASeq, purples: int, j=False, originals=None, doc_wt=False): self.name = name self.coh_AASeq = coh_AASeq self.doc_AASeq = doc_AASeq self.purples = purples if not j: name_split = name.split('_') a_ind = name_split.index('A') self.coh_wt = name_split[a_ind-1] self.doc_wt = name_split[a_ind+1] elif doc_wt: self.coh_wt = '1ohz' self.doc_wt = doc_wt else: self.coh_wt = '1ohz' self.doc_wt = originals[name[:-3]+'.pdb.gz'].split('_A_')[1].split('_')[0] pos_str = coh_AASeq.get_positions(positions_dict['1ohz']) self.coh_switch = ''.join([type_dict[a] if a in type_dict.keys() else 'c' for a in pos_str]) doc_str = doc_AASeq.get_positions(list(doc21ohz[self.doc_wt].keys())) self.doc_switch = ''.join([type_dict[a] if a in type_dict.keys() else 'c' for a in doc_str])
def extract_charge_configuration(seq: AASeq, positions: list): res_in_poses = seq.get_positions(positions) charge = [ res2charge[a] if a in res2charge.keys() else 'c' for a in res_in_poses ] return charge
def extract_charge_configuration(seq: AASeq, positions: list): res_in_poses = seq.get_positions(positions) charge = [res2charge[a] if a in res2charge.keys() else "c" for a in res_in_poses] return charge