PEATDB/DNAtool/mutation.py
def check_DNA(DNA_sequence):
    """Check that we have a DNA sequence without junk"""
    #
    import string
    # Remove all spaces
    DNA_sequence=string.replace(DNA_sequence,' ','')
    # Upper case
    DNA_sequence=string.upper(DNA_sequence)
    # Check that we only have DNA bases in the seq
    ok=1
    garbage={}
    DNA_bases=['A','G','C','T']
    for letter in DNA_sequence:
        if not letter in DNA_bases:
            ok=None
            garbage[letter]=1
    if ok:
        return ok, DNA_sequence
    return ok,garbage.keys()
Check that we have a DNA sequence without junk
Check that we have a DNA sequence without junk
Check that we have a DNA sequence without junk
def check_DNA(DNA_sequence):
    import string
     Remove all spaces
    DNA_sequence=string.replace(DNA_sequence,' ','')
     Upper case
    DNA_sequence=string.upper(DNA_sequence)
     Check that we only have DNA bases in the seq
    ok=1
    garbage={}
    DNA_bases=['A','G','C','T']
    for letter in DNA_sequence:
        if not letter in DNA_bases:
            ok=None
            garbage[letter]=1
    if ok:
        return ok, DNA_sequence
    return ok,garbage.keys()
def check_DNA ( DNA_sequence ) : import string DNA_sequence = string . replace ( DNA_sequence , ' ' , '' ) DNA_sequence = string . upper ( DNA_sequence ) ok = 1 garbage = { } DNA_bases = [ 'A' , 'G' , 'C' , 'T' ] for letter in DNA_sequence : if not letter in DNA_bases : ok = None garbage [ letter ] = 1 if ok : return ok , DNA_sequence return ok , garbage . keys ( )
Check that we have a DNA sequence without junk
Check that we have a DNA sequence without junk
"""Check that we have a DNA sequence without junk""" # # Remove all spaces # Upper case # Check that we only have DNA bases in the seq
DNA_sequence