def makeMutationAddendum(target=None, template=None, options=None): """ converting two residue labels to a mutation tag """ if target == " gap " or template == " gap ": return None else: code1, resName = convertResidueCode(resName=target[:3]) code2, resName = convertResidueCode(resName=template[:3]) resNumb = int(target[3:7]) return "%s%d%s" % (code1, resNumb, code2)
def makeSequence(self, mutation=None): """ creates a sequence from the chain object to be used in Scwrl-mutations """ sequence = "" for residue in self.residues: if residue.resName in lib.residueList("standard"): if mutation == None: code, resName = lib.convertResidueCode(resName=residue.resName) sequence += code.lower() elif residue.label in mutation: new_label = mutation[residue.label]['label'] code, resName = lib.convertResidueCode(resName=new_label[:3]) sequence += code.upper() else: code, resName = lib.convertResidueCode(resName=residue.resName) sequence += code.lower() return sequence
def makeSequence(self, mutation=None): """ creates a sequence from the chain object to be used in Scwrl-mutations """ sequence = "" for residue in self.residues: if residue.resName in lib.residueList("standard"): if mutation == None: code, resName = lib.convertResidueCode( resName=residue.resName) sequence += code.lower() elif residue.label in mutation: new_label = mutation[residue.label]['label'] code, resName = lib.convertResidueCode( resName=new_label[:3]) sequence += code.upper() else: code, resName = lib.convertResidueCode( resName=residue.resName) sequence += code.lower() return sequence
def setAlignment(self, alignment=None): """ Sets the alignment information (from self) """ if alignment == None: print("setting alignment according to protein") self.alignment = "" for residue in self.residues: if residue.resName != "N+ " and residue.resName != "C- ": code, resName = lib.convertResidueCode(resName=residue.resName) if code in "ARNDCQEGHILKMFPSTWYV": self.alignment += (code) print(self.alignment) print( len(self.alignment) ) else: self.alignment = alignment
def setAlignment(self, alignment=None): """ Sets the alignment information (from self) """ if alignment == None: pka_print("setting alignment according to protein") self.alignment = "" for residue in self.residues: if residue.resName != "N+ " and residue.resName != "C- ": code, resName = lib.convertResidueCode( resName=residue.resName) if code in "ARNDCQEGHILKMFPSTWYV": self.alignment += (code) pka_print(self.alignment) pka_print(len(self.alignment)) else: self.alignment = alignment