2927 days ago
Parse a genbank file using regular expressions
...or reading: $!"; # Flag for multiline translation; 1 means translation "in progress" $trans = 0;...tart - $cds_end\n"; } elsif (/(\/translation=")(.*)/) { # protein produc...lse { print "Problems: end of translation product not found.\n";...2927 days ago
Biological Sequence handling with Perl !
...rn $s; } sub longest_orf { my $self = shift; my ($max,$pos,$frame); foreach (-3..-1,1..3) { my $translation = $self->translate($_); while ($translation=~/([^*]+)/g) { if (l...2191 days ago
2136 days ago
Perl script for six frame translation !
...'); my $sequence = $seqio->next_seq; # Step 2: Perform six-frame translation my @frames = (1, 2, 3, -1, -...me > 0 ? "Forward" : "Reverse"; print "Frame $frame_type $frame Translation:\n$translated_seq\n"; } #...104 days ago
Python script for six frame translation of sequences !
...frame)-1:].translate() return translated_seq def six_frame_translation(fasta_file): records = l...else "Reverse" print(f"Frame {frame_type} {abs(frame)} Translation:\n{protein_sequence}\n") #...104 days ago