pKa/pKD_tools.py
def check_mutation_syntax(operations,sequence=None):
    """Check the syntax of an operation string and check that the residue is present in the sequence"""
    single=get_single_operations(operations)
    for op in single:
        resid=get_resid_from_mut(op)
        new=get_newrestyp_from_mut(op)
        old=get_oldrestyp_from_mut(op)
        import Protool
        X=Protool.structureIO()
        if not X.aminoacids.has_key(old) or not X.aminoacids.has_key(new):
            raise Exception('New or old residue is not an amino acid: %s' %op)
        if sequence:
            if not [resid,old] in sequence:
                raise Exception('Original sequence does not contain this residue: %s:%s' %(resid,old))
    return combine_operations(single)
Check the syntax of an operation string and check that the residue is present in the sequence
Check the syntax of an operation string and check that the residue is present in the sequence
Check the syntax of an operation string and check that the residue is present in the sequence
def check_mutation_syntax(operations,sequence=None):
    single=get_single_operations(operations)
    for op in single:
        resid=get_resid_from_mut(op)
        new=get_newrestyp_from_mut(op)
        old=get_oldrestyp_from_mut(op)
        import Protool
        X=Protool.structureIO()
        if not X.aminoacids.has_key(old) or not X.aminoacids.has_key(new):
            raise Exception('New or old residue is not an amino acid: %s' %op)
        if sequence:
            if not [resid,old] in sequence:
                raise Exception('Original sequence does not contain this residue: %s:%s' %(resid,old))
    return combine_operations(single)
def check_mutation_syntax ( operations , sequence = None ) : single = get_single_operations ( operations ) for op in single : resid = get_resid_from_mut ( op ) new = get_newrestyp_from_mut ( op ) old = get_oldrestyp_from_mut ( op ) import Protool X = Protool . structureIO ( ) if not X . aminoacids . has_key ( old ) or not X . aminoacids . has_key ( new ) : raise Exception ( 'New or old residue is not an amino acid: %s' % op ) if sequence : if not [ resid , old ] in sequence : raise Exception ( 'Original sequence does not contain this residue: %s:%s' % ( resid , old ) ) return combine_operations ( single )
Check the syntax of an operation string and check that the residue is present in the sequence
Check the syntax of an operation string and check that the residue is present in the sequence
"""Check the syntax of an operation string and check that the residue is present in the sequence"""
operations
sequence