diff --git a/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm b/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm
index 545fa17bf2af923c4e054e6119e7d4e079d10fe3..6b71badc4e5d8147bff8c52af33fb2ba43ccc81f 100644
--- a/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm
+++ b/modules/Bio/EnsEMBL/Utils/TranscriptSNPs.pm
@@ -129,6 +129,9 @@ sub get_all_peptide_variations {
     #calculate the peptide coordinate of the snp
     my $peptide = ($start - $translation_start +
 		   ($codon_length - $codon_pos)) / $codon_length;
+	
+	# skip this SNP if it falls in a partial codon
+	next if $start - $codon_pos + $codon_length > length($cdna);
 
     #retrieve the codon
     my $codon = substr($cdna, $start - $codon_pos-1, $codon_length);