I have pairs of coding DNA sequences which I wish to perform pairwise codon alignments via Python, I have "half completed" the process.
So far..
- I retrive pairs of orthologous DNA sequences from genbank using
Biopython
package. - I translate the orthologous pairs into peptide sequences and then align them using
EMBOSS Needle
program.
I wish to..
- Transfer the gaps from the peptide sequences into the original DNA sequences.
Question
I would appreciate suggestions for programs/code (called from Python) that can transfer gaps from aligned peptide sequence pairs onto codons of the corresponding nucleotide sequence pairs. Or programs/code that can carry out the pairwise codon alignment from scratch.
All you need to do is split the nucleotide sequence into triplets. Each amino-acid is a triplet, each gap is three gaps. so in pseudo code: