Sequences producing significant alignments: | Score (bits) | E value |
---|---|---|
%s %s | %s | %.2g |
\n".$hspstr."
Parameter | Value | \n"; foreach my $param ( $result->available_parameters ) { $str .= "
---|---|
$param | ". $result->get_parameter($param) ." |
Statistic | Value |
---|---|
$stat | ". $result->get_statistic($stat). " | \n"; } $str .= "
".$self->footer() . "
\n";
return $str;
}
=head2 hit_link_desc
Title : hit_link_desc
Usage : $self->hit_link_desc(\&link_function);
Function: Get/Set the function which provides an HTML
link(s) for the given hit to be used
within the description section at the top of the BLAST report.
This allows a person reading the report within
a web browser to go to one or more database entries for
the given hit from the description section.
Returns : Function reference
Args : Function reference
See Also: L
Database: %s
},
$result->query_name,
$result->query_description,
&_numwithcommas($result->query_length),
$result->database_name(),
&_numwithcommas($result->database_entries()),
&_numwithcommas($result->database_letters()),
);
}
=head2 end_report
Title : end_report
Usage : $self->end_report()
Function: The method to call when ending a report, this is
mostly for cleanup for formats which require you to
have something at the end of the document ()
for HTML
Returns : string
Args : none
=cut
sub end_report {
return "\n\n";
}
# copied from Bio::Index::Fasta
# useful here as well
=head2 id_parser
Title : id_parser
Usage : $index->id_parser( CODE )
Function: Stores or returns the code used by record_id to
parse the ID for record from a string. Useful
for (for instance) specifying a different
parser for different flavours of FASTA file.
Returns \&default_id_parser (see below) if not
set. If you supply your own id_parser
subroutine, then it should expect a fasta
description line. An entry will be added to
the index for each string in the list returned.
Example : $index->id_parser( \&my_id_parser )
Returns : ref to CODE if called without arguments
Args : CODE
=cut
sub id_parser {
my( $self, $code ) = @_;
if ($code) {
$self->{'_id_parser'} = $code;
}
return $self->{'_id_parser'} || \&default_id_parser;
}
=head2 default_id_parser
Title : default_id_parser
Usage : $id = default_id_parser( $header )
Function: The default Fasta ID parser for Fasta.pm
Returns $1 from applying the regexp /^>\s*(\S+)/
to $header.
Returns : ID string
The default implementation checks for NCBI-style
identifiers in the given string ('gi|12345|AA54321').
For these IDs, it extracts the GI and accession and
returns a two-element list of strings (GI, acc).
Args : a fasta header line string
=cut
sub default_id_parser {
my ($string) = @_;
my ($gi,$acc);
if( $string =~ s/gi\|(\d+)\|?// )
{ $gi = $1; $acc = $1;}
if( $string =~ /(\w+)\|([A-Z\d\.\_]+)(\|[A-Z\d\_]+)?/ ) {
$acc = defined $2 ? $2 : $1;
} else {
$acc = $string;
$acc =~ s/^\s+(\S+)/$1/;
$acc =~ s/(\S+)\s+$/$1/;
}
return ($gi,$acc);
}
sub MIN { $a <=> $b ? $a : $b; }
sub MAX { $a <=> $b ? $b : $a; }
sub footer {
my ($self) = @_;
return " ";
if( $result->algorithm_version =~ /WashU/i ) {
return $res .
"Copyright (C) 1996-2000 Washington University, Saint Louis, Missouri USA.
Reference: Gish, W. (1996-2000) http://blast.wustl.edu ";
} else {
return $res .
"Reference: Altschul, Stephen F., Thomas L. Madden, Alejandro A. Schaffer, ";
}
} elsif( $result->algorithm =~ /FAST/i ) {
return $result->algorithm . " " . $result->algorithm_version . " ";
} else {
return '';
}
}
# from Perl Cookbook 2.17
sub _numwithcommas {
my $num = reverse( $_[0] );
$num =~ s/(\d{3})(?=\d)(?!\d*\.)/$1,/g;
return scalar reverse $num;
}
=head2 Methods Bio::SearchIO::SearchWriterI
L HTML
containing text such as:
"Bioperl Reformatted HTML of BLASTP Search Report
for gi|1786183|gb|AAC73113.1|"
Args : First argument is a Bio::Search::Result::ResultI
=cut
sub default_title {
my ($result) = @_;
return sprintf(
qq{
Bioperl Reformatted HTML of %s Search Report
for %sProduced by Bioperl module ".ref($self)." on $DATE
\n"
}
=head2 algorithm_reference
Title : algorithm_reference
Usage : my $reference = $writer->algorithm_reference($result);
Function: Returns the appropriate Bibliographic reference for the
algorithm format being produced
Returns : String
Args : L
Revision: $Revision
All Rights Reserved.
Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997),
\"Gapped BLAST and PSI-BLAST: a new generation of protein database search
programs\", Nucleic Acids Res. 25:3389-3402.
" .
"\nReference: Pearson et al, Genomics (1997) 46:24-36