sub color { my($colorkey) = @_; my $color = ''; my %color_key = ( A => " A ", C => " C ", G => " G ", T => " T ", R => " R ", Y => " Y ", M => " M ", K => " K ", S => " S ", W => " W ", B => " F ", D => " F ", H => " H ", V => " V ", N => " N ", L => " L ", P => " P ", Q => " Q ", I => " I ", E => " E ", _ => " _ ", ); # Translate each character in the sequence coloured character for ( my $i = 0 ; $i < length($colorkey) ; ++$i ) { $color .= $color_key{substr($colorkey, $i, 1)}; } return } #### print "please enter the start point of your DNA sequence\n\n"; $dnastart = ; chomp $dnastart; print "please enter the end point of your DNA sequence\n\n"; $dnaend = ; chomp $dnaend; $dna = substr($dna, $dnastart, ($dnaend - $dnastart)); print"Here is your selected DNA sequence:\n\n $dna\n\n"; } #start the string from position 0 $protein = substr($dna,0); #Translate the DNA to protein $protein = dna2peptide($protein); #Print the sequence in lines of 50 characters long print"\n\n<----------------Peptide frame 1----------------> \n\n"; print_sequence ($protein,50); # printing data sequences to HTML print OUTFILE "
Peptide sequence frame 1
$protein
";