Hello Everyone,
I have sequences that occasionally have an erronious stop codon. Is there a way to filter a biopython Sequence Record of all stop codons?
Edit: The sequence is in frame and I would like to remove the whole codon for all sequences in the SeqRec. Apologies for the lack of clarity.
Thank you so much! Chris
Thank you for your help!
This was helpful. I used a variant of this code to prepare alignments for codeml. If you are using it in an alignment it is important to maintain sequence length, so instead of deleting the stop codon I replaced it with ambiguous characters.