1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#!/usr/bin/perl
use strict;
use warnings 'all';
use Data::Dumper;
use Bio::SeqIO;
use Bio::DB::Fasta;
use Devel::NYTProf;
my $seqio_obj = Bio::SeqIO->new(-file => "testTESTUSE.fasta",
-format => 'fasta');
while ( my $seq_obj = $seqio_obj->next_seq ) {
my $id = $seq_obj-> display_id;
my $length = $seq_obj->length;
my $half_length;
my $modulo = $length % 2;
if ($modulo == 1){
$half_length = ($length-1)/2;
}
elsif($modulo==0){
$half_length = $length/2;
}
my $TIR_de_debut = $seq_obj->subseq(1,$half_length);
my $TIR_de_fin = $seq_obj->subseq($length+1-$half_length,$length);
my $rev = $seq_obj->revcom;
my $TIR_de_fin_rev = $rev->subseq(1,$half_length);
my $script = `perl scripts/perl/sw_algo.pl $TIR_de_debut $TIR_de_fin_rev`;
print $id,"\n";
print $script;
} |
Partager