PEATDB/Actions.py
def checkMutation(self, DB, name, ref=None, X=None):
        """Check mutations based on ref sequence and current mutant
           sequence, should be triggered whenever ref protein is altered so 
           that the mutation codes are updated."""
        prot = DB.get(name)
        if prot.aaseq == None:
            return
        if ref == None:
            ref = self.DB.meta.refprotein            
        refseq = self.AAList2String(DB.get(ref).aaseq)        
        if prot.aaseq == None:
            return
        #get mutations from sequence
        seq = self.AAList2String(prot.aaseq)       
        if seq == refseq:
            return
            
        #get alignment for pdb seq and AA from DNA seq    
        import PEATSA.Core as Core
        if X == None:
            #we need to also provide the ref structure
            import Protool
            X=Protool.structureIO()
            X.parsepdb(DB.get(ref).Structure)
        print X 
        mset = Core.Data.mutationSetFromSequencesAndStructure(refseq, seq, X)
        #prot.Mutations = '+'.join(mset.mutationCodes())
        prot.Mutations = mset.codeString(X)
        return
Check mutations based on ref sequence and current mutant
           sequence, should be triggered whenever ref protein is altered so 
           that the mutation codes are updated.
Check mutations based on ref sequence and current mutant
sequence, should be triggered whenever ref protein is altered so
that the mutation codes are updated.
Check mutations based on ref sequence and current mutant sequence should be triggered whenever ref protein is altered so that the mutation codes are updated .
def checkMutation(self, DB, name, ref=None, X=None):
        prot = DB.get(name)
        if prot.aaseq == None:
            return
        if ref == None:
            ref = self.DB.meta.refprotein            
        refseq = self.AAList2String(DB.get(ref).aaseq)        
        if prot.aaseq == None:
            return
        seq = self.AAList2String(prot.aaseq)       
        if seq == refseq:
            return
        import PEATSA.Core as Core
        if X == None:
            import Protool
            X=Protool.structureIO()
            X.parsepdb(DB.get(ref).Structure)
        print X 
        mset = Core.Data.mutationSetFromSequencesAndStructure(refseq, seq, X)
        prot.Mutations = mset.codeString(X)
        return
def checkMutation ( self , DB , name , ref = None , X = None ) : prot = DB . get ( name ) if prot . aaseq == None : return if ref == None : ref = self . DB . meta . refprotein refseq = self . AAList2String ( DB . get ( ref ) . aaseq ) if prot . aaseq == None : return seq = self . AAList2String ( prot . aaseq ) if seq == refseq : return import PEATSA . Core as Core if X == None : import Protool X = Protool . structureIO ( ) X . parsepdb ( DB . get ( ref ) . Structure ) print X mset = Core . Data . mutationSetFromSequencesAndStructure ( refseq , seq , X ) prot . Mutations = mset . codeString ( X ) return
Check mutations based on ref sequence and current mutant
sequence, should be triggered whenever ref protein is altered so
that the mutation codes are updated.
Check mutations based on ref sequence and current mutant sequence should be triggered whenever ref protein is altered so that the mutation codes are updated .
"""Check mutations based on ref sequence and current mutant
           sequence, should be triggered whenever ref protein is altered so 
           that the mutation codes are updated.""" #get mutations from sequence #get alignment for pdb seq and AA from DNA seq     #we need to also provide the ref structure #prot.Mutations = '+'.join(mset.mutationCodes())
self
DB
name
ref
X