) {
next if (//);
if( /^(?:[T]?BLAST[NPX])\s*.+$/i ||
/^RPS-BLAST\s*.+$/i ) {
$seentop=1;
}
next if !$seentop;
if( $seentop ) {
print SAVEOUT;
}
}
close SAVEOUT;
close TMP;
return 1;
}
sub _load_input {
my ($self, $input) = @_;
if( ! defined $input ) {
$self->throw("Calling remote blast with no input");
}
my @seqs;
if( ! ref $input ) {
if( -e $input ) {
my $seqio = new Bio::SeqIO(-format => 'fasta', -file => $input);
while( my $seq = $seqio->next_seq ) {
push @seqs, $seq;
}
} else {
$self->throw("Input $input was not a valid filename");
}
} elsif( ref($input) =~ /ARRAY/i ) {
foreach ( @$input ) {
if( ref($_) && $_->isa('Bio::PrimarySeqI') ) {
push @seqs, $_;
} else {
$self->warn("Trying to add a " . ref($_) .
" but expected a Bio::PrimarySeqI");
}
}
if( ! @seqs) {
$self->throw("Did not pass in valid input -- no sequence objects found");
}
} elsif( $input->isa('Bio::PrimarySeqI') ) {
push @seqs, $input;
}
return @seqs;
}
1;
__END__