Exemplo n.º 1
0
def get_seq_property(property, filepath):
    """
    Find, or possibly compute, a given property of a sequence.

    :param property: the desired property
    :param filepath: fully qualified path of sequence file
    :return: Status
    """

    d = DNASequence(filepath)
    err_flag = 0
    m = d.get_property(property, err_flag)
    if not err_flag:
        print "The", property, "of", filepath, "is", str(m)


    return d
from DNASequence import DNASequence

valid = False

while valid != True:
    input = raw_input("Enter a DNA Sequence:")
    try:
        x = DNASequence(input)
        valid = True
    except:
        print "sequence not valid"

print "\n\n", x.reverse_complement()
Exemplo n.º 3
0
from DNASequence import DNASequence

x = DNASequence("AAAACTGCGCGT")
print x.sequence
print x.base_count("A")
print x.gc_content()
print x.revcomp()

# this a comment