-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHit.pir
42 lines (34 loc) · 1.2 KB
/
Hit.pir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# A simple container for XML Blast Output; based on NCBI's DTD.
#
- PerlClass PirObject::BlastOutput::Iteration::Hit
- InheritsFrom PirObject
- FieldsTable
# Field name Struct Type Comments
#---------------------- --------------- --------------- -----------------------
Hit_num single int8
Hit_id single string
Hit_def single string
Hit_accession single string
Hit_len single int8
Hit_hsps array <Hsp>
- EndFieldsTable
- Methods
our $RCS_VERSION='$Id: Hit.pir,v 1.4 2008/09/10 19:08:32 riouxp Exp $';
our ($VERSION) = ($RCS_VERSION =~ m#,v ([\w\.]+)#);
# This is compatible with BioPerl, where the significance of a
# hit was coded as being the significance of the top HSP
sub significance {
my $self = shift;
my $hsps = $self->get_Hit_hsps();
die "Cannot find significance: No HSPs in hit!\n"
unless @$hsps;
$hsps->[0]->get_Hsp_evalue();
}
sub score {
my $self = shift;
my $hsps = $self->get_Hit_hsps();
die "Cannot find score: No HSPs in hit!\n"
unless @$hsps;
$hsps->[0]->get_Hsp_bit_score(); # as in bioperl
}