Skip to content

Instantly share code, notes, and snippets.

Created April 28, 2011 07:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/945949 to your computer and use it in GitHub Desktop.
Save anonymous/945949 to your computer and use it in GitHub Desktop.
use Bio::SeqIO;
$in_file = Bio::SeqIO->new(-file => 'test1.txt',
-format => 'EMBL');
$out_file = Bio::SeqIO->new(-file => '>test_final.txt',
-format => 'EMBL' );
while ($file = $in_file->next_seq){
for $feature ($file -> get_SeqFeatures) {
if ($feature -> primary_tag eq "CDS") {
$feature->spliced_seq->seq;
$feature =~ s/A/G/g;
}
}
$out_file -> write_seq($in_file);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment