R
Rita
Hi All,
I am posting my program code here and it is working ,But i am sure ther
will be another way to do it.this program taking one sequence from
<Data> and putting in MFOLD server and making structure of it. and
result is storing in result.out
any suggeation will be appriciated.Thanks
use warnings;
use strict;
use Bio::SeqIO;
my $outputfile = 'result.out';
open (OUTPUT, '>', $outputfile) || die "Can't open \"$outputfile\" $!";
my $filename1 = <DATA>;
open (FILE1,$filename1 )||die "Cannot open file \"$filename1\"\n\n $!";
<FILE1>;
while(my $line =<FILE1>){
(my ($id,$hit_name,$hairpin_sequence) = (split /\t/, $line)[0,2,4]);
my $seqio = Bio::SeqIO-> new(-file =>'>temp1',-format=>'fasta');
$hairpin_sequence = Bio::Seq-> new(-seq => $hairpin_sequence,
-display_id=>$hit_name);
$seqio->write_seq($hairpin_sequence);
system (" mfold SEQ='temp1'");
open( my $rpt, 'temp1.out') or die("Can't open temp1.out: $!");
print OUTPUT "Hit Name-$hit_name\t,Sequence name-$id\n";
while(<$rpt>) {
print OUTPUT3;
}
close($rpt) or die ;
}
close FILE1;
close OUTPUT;
I am posting my program code here and it is working ,But i am sure ther
will be another way to do it.this program taking one sequence from
<Data> and putting in MFOLD server and making structure of it. and
result is storing in result.out
any suggeation will be appriciated.Thanks
use warnings;
use strict;
use Bio::SeqIO;
my $outputfile = 'result.out';
open (OUTPUT, '>', $outputfile) || die "Can't open \"$outputfile\" $!";
my $filename1 = <DATA>;
open (FILE1,$filename1 )||die "Cannot open file \"$filename1\"\n\n $!";
<FILE1>;
while(my $line =<FILE1>){
(my ($id,$hit_name,$hairpin_sequence) = (split /\t/, $line)[0,2,4]);
my $seqio = Bio::SeqIO-> new(-file =>'>temp1',-format=>'fasta');
$hairpin_sequence = Bio::Seq-> new(-seq => $hairpin_sequence,
-display_id=>$hit_name);
$seqio->write_seq($hairpin_sequence);
system (" mfold SEQ='temp1'");
open( my $rpt, 'temp1.out') or die("Can't open temp1.out: $!");
print OUTPUT "Hit Name-$hit_name\t,Sequence name-$id\n";
while(<$rpt>) {
print OUTPUT3;
}
close($rpt) or die ;
}
close FILE1;
close OUTPUT;