Hi I am busy working with biological sequences, but I am having some problems to finilize my script
Let's say that I want to compare two dna sequences i.e
seq1='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAACGTG
CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC
TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC
CCCTTCAACGGGGACTGCCGCATCACCAAGGACAACCGACGCCACTGCCAGGCCTGCCGG
CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATTCTGACAGATGAGGAAGTG'
seq2='ATGGAGGCAATGGCGGCCAGCACTTCCCTGCCTGACCCTGGAGACTTTGACCGGAATGTG
CCCCGGATCTGTGGGGTGTGTGGAGACCGAGCCACTGGCTTTCACTTCAATGCTATGACC
TGTGAAGGCTGCAAAGGCTTCTTCAGGCGAAGCATGAAGCGGAAGGCACTATTCACCTGC
CCCTTCAATGGGGACTGCCGCATCACCAAGGACAACCGGCGCCACTGCCAGGCCTGCCGG
CTCAAACGCTGTGTGGACATCGGCATGATGAAGGAGTTCATCCTGACAGATGAGGAAGTG
CAGAGGAAGCGGGAGATGATCCTGAAGCGGAAGGAGGAGGAGGCCTTGAAGGACAGTCTG
CGGCCCAAGCTGTCTGAGGAGCAGCAGCGCATCATTGCCATACTGCTGGACGCCCACCAT
AAGACCTACGACCCCACCTACTCCGACTTCTGCCAGTTCCGGCCTCCAGTTCGTGTGAAT
GATGGTGGAGGGAGCCATCCTTCCAGGCCCAACTCCAGACACACTCCCAGCTTCTCTGGG
GACTCCTCCTCCTCCTGCTCAGATCACTGTATCACCTCTTCAGACATGATGGAC---TCG'
Thus my aim is to identify variations between those two sequences in term of codons, and the position in which the changed codon falls. Then I want to know the amino acid product related to that codon. Any helps?
this is what I done so far but I cannot see exactly want I want:
def sequence_compare(seq_a, seq_b):
len1= len(seq_a)
len2= len(seq_b)
mismatches = []
for pos in range (0,min(len1,len2)) :
if seq_a[pos] != seq_b[pos]:
mismatches.append('|')
else:
mismatches.append(' ')
print (seq_a)
print (mismatches)
print (seg_b)
sequence_compare(seq_a,seq_b)
this gives me just the position of the mismatches, but if i want to know the related codon?
Basically I would like to see something like: ATC-ATT and the related amino acid changed.
does anyone help me in this, any assuggestion please?