1 package CXGN
::BioTools
::SearchIOHTMLWriter
;
5 use CXGN
::Tools
::Identifiers
;
8 use base qw
/Bio::SearchIO::Writer::HTMLResultWriter/;
11 my ($class,$db_id, @args) = @_;
12 my $self = $class->SUPER::new
(@args);
16 $self->id_parser( sub {
18 my ($ident,$acc) = Bio
::SearchIO
::Writer
::HTMLResultWriter
::default_id_parser
($idline);
19 #The default implementation checks for NCBI-style identifiers in the given string ('gi|12345|AA54321').
20 #For these IDs, it extracts the GI and accession and
21 #returns a two-element list of strings (GI, acc).
23 return ($ident,$acc) if $acc;
24 return CXGN
::Tools
::Identifiers
::clean_identifier
($ident) || $ident;
27 my ($self, $hit, $result) = @_;
28 #see if we can link it as a CXGN identifier. Otherwise,
29 #use the default bioperl link generator
30 my $url = CXGN
::Tools
::Identifiers
::link_identifier
($hit->name())
31 || $self->default_hit_link_desc($hit,$result,$db_id);
35 $self->hit_link_desc($hit_link);
36 $self->hit_link_align($hit_link);
37 $self->start_report(sub {''});
46 sub default_hit_link_desc
{
55 map $_->start('subject').'-'.$_->end('subject'),
58 my $id = $hit->name();
59 return qq{<a href
="show_match_seq.pl?blast_db_id=$db_id&id=$id&$coords_string">$id</a
>};