10 use Utils qw(profile);
19 $self->add_pos(split);
23 =head2 $prof->jpred_profile(@Sequence)
25 Creates a PSIBLAST like profile for Jpred.
30 my ($self, @seqs) = @_;
31 croak "Not passed Sequence objects" if grep { not isa $_, 'Sequence' } @seqs;
32 $self->_check_seq_length(@seqs) or croak "Not passed sequences of equal length\n";
34 my @profile = profile( map { join "", $_->seqs } @seqs );
37 $self->add_pos(@{$_});
43 =head2 _check_seq_length(@Sequence);
45 Checks that we've been passed PSISEQ objects and that they are the same length. Returns undef if their not and warns, otherwise returns the length of the sequence.
49 sub _check_seq_length {
54 $lengths{ $_->seq } = 1;
57 if (keys %lengths != 1) {
58 warn "The sequences are of different lengths";
62 return (keys %lengths)[0];