R
Rita
Hi All,
I am getting some result through loop.I want to store all the result
which i am getting.
but i am using temprary file ,so it is using same file every time,and i
couldnt figure out that how i can store the result in 1 file every
time. Here is my program.
use warnings;
use strict;
use Bio::SeqIO;
use Bio::SearchIO;
my $outputfile = 'result.out';
open OUTPUT3 '>', $outputfile || die "Can't open \"$outputfile\" $!";
my $filename = 'file.fasta';
#either open the file, or exit from the program
open FILE,$filename ||die "Cannot open file \"$filename\"\n\n $!";
<FILE>;
#Read the all data of the file in variable called $line;
while(my $line =<FILE>){
#Remove the white space or new line from the data
chomp $line;
(my ( $sequence) = (split /\t/, $line)[4]);
print "Sequence - $sequence\n\n";
my $seqio = Bio::SeqIO-> new(-file =>'>temp1',-format=>'fasta');
$sequence = Bio::Seq-> new(-seq => $sequence, -display_id=>'test1');
$seqio->write_seq($sequence);
system ("mfold SEQ='temp1'");
This mfold generate output in file called "temp1.out"
I tried this line but this is just printing text temp1.out every time
in 'result.out'.
print OUTPUT3 'temp1.out';
}
Inputs are some sequences -
Thanks
I am getting some result through loop.I want to store all the result
which i am getting.
but i am using temprary file ,so it is using same file every time,and i
couldnt figure out that how i can store the result in 1 file every
time. Here is my program.
use warnings;
use strict;
use Bio::SeqIO;
use Bio::SearchIO;
my $outputfile = 'result.out';
open OUTPUT3 '>', $outputfile || die "Can't open \"$outputfile\" $!";
my $filename = 'file.fasta';
#either open the file, or exit from the program
open FILE,$filename ||die "Cannot open file \"$filename\"\n\n $!";
<FILE>;
#Read the all data of the file in variable called $line;
while(my $line =<FILE>){
#Remove the white space or new line from the data
chomp $line;
(my ( $sequence) = (split /\t/, $line)[4]);
print "Sequence - $sequence\n\n";
my $seqio = Bio::SeqIO-> new(-file =>'>temp1',-format=>'fasta');
$sequence = Bio::Seq-> new(-seq => $sequence, -display_id=>'test1');
$seqio->write_seq($sequence);
system ("mfold SEQ='temp1'");
This mfold generate output in file called "temp1.out"
I tried this line but this is just printing text temp1.out every time
in 'result.out'.
print OUTPUT3 'temp1.out';
}
Inputs are some sequences -
Thanks