Hsp¶
High-scoring Segment Pair Object¶
Introduction¶
The HSP object provides access by name to the fields of a BLAST result. Unlike a standard object, the similarity object is stored as a list reference, not a hash reference. The HSP fields are pulled from the appropriate places in the list.
A blast takes a sequence called the query and matches it against a database. When describing the data in an HSP, we will refer repeatedly to the query sequence and the database sequence. Often, the query and database sequences will be given by peg IDs. In some cases, however, they will be contig IDs. In both cases, the match is represented by an alignment between portions of the sequences. Gap characters may be required to get the alignments to match, and the number of gaps is part of the data in the HSP.
new¶
my $hsp = Hsp->new( @data );
my $hsp = Hsp->new( \@data );
Create an HSP object from an array of fields.
data
An array of data in fields:
0 qid query sequence id 1 qdef query sequence comment 2 qlen total query sequence length 3 sid subject sequence id 4 sdef subject sequence comment 5 slen total subject sequence length 6 scr match score 7 e_val match e-value (probability match is a coincidence) 8 p_n the p-number 9 p_val the Poisson value 10 n_mat match length 11 n_id identity count 12 n_pos positive count 13 n_gap gap count 14 dir frame direction or shift 15 q1 start position of match in the query sequence 16 q2 end position of match in the query sequence 17 qseq query alignment sequence 18 s1 start position of match in the subject sequence 19 s2 end position of match in the subject sequence 20 sseq subject alignment sequence
RETURN
Returns an HSP object that allows the values to be accessed by name.