Skip to content

Commit

Permalink
Write the files properly
Browse files Browse the repository at this point in the history
svn path=/bioperl-run/trunk/; revision=13451
  • Loading branch information
shawnh committed May 26, 2003
1 parent 61e8b2c commit 7989a21
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Bio/Tools/Run/FootPrinter.pm
Expand Up @@ -271,12 +271,10 @@ sub run {
$#seq > 0 || $self->throw("Need at least two sequences");
$self->tree || $self->throw("Need to specify a phylogenetic tree using -tree option");

my ($infile_tfh,$infile) = $self->_setinput(@seq);
my $infile = $self->_setinput(@seq);

my $param_string = $self->_setparams();
my @footprint_feats = $self->_run($infile,$self->tree,$param_string);
close ($infile_tfh);
undef ($infile_tfh);
return @footprint_feats;

}
Expand Down Expand Up @@ -379,12 +377,14 @@ sub _setparams {
sub _setinput {
my ($self,@seq) = @_;
my ($tfh1,$outfile1) = $self->io->tempfile(-dir=>$self->tempdir);
my $out1 = Bio::SeqIO->new(-fh=> $tfh1 , '-format' => 'Fasta');
foreach my $seq(@seq){
$seq->isa("Bio::PrimarySeqI") || $self->throw("Need a Bio::PrimarySeq compliant object for FootPrinter");
my $out1 = Bio::SeqIO->new(-fh=> $tfh1 , '-format' => 'Fasta');
$out1->write_seq($seq);
}
return ($tfh1,$outfile1);
$tfh1->close;
undef($tfh1);
return ($outfile1);
}


Expand Down

0 comments on commit 7989a21

Please sign in to comment.