| 1 | package Bio::FastParsers::Blast::Table::Hsp; | ||
| 2 | # ABSTRACT: Internal class for tabular BLAST parser | ||
| 3 | 7 | $Bio::FastParsers::Blast::Table::Hsp::VERSION = '0.213510'; | |
| 4 | 7 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 7 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | # public attributes | ||
| 9 | |||
| 10 | has $_ => ( | ||
| 11 | is => 'ro', | ||
| 12 | isa => 'Str', | ||
| 13 | required => 1, | ||
| 14 | 7 | ) for qw(query_id hit_id); | |
| 15 | |||
| 16 | has $_ => ( | ||
| 17 | is => 'ro', | ||
| 18 | isa => 'Num', | ||
| 19 | required => 1, | ||
| 20 | 7 | ) for qw( | |
| 21 | percent_identity hsp_length mismatches gaps | ||
| 22 | query_from query_to | ||
| 23 | hit_from hit_to | ||
| 24 | query_strand | ||
| 25 | hit_strand | ||
| 26 | query_start query_end | ||
| 27 | hit_start hit_end | ||
| 28 | ); | ||
| 29 | |||
| 30 | has $_ => ( | ||
| 31 | is => 'ro', | ||
| 32 | isa => 'Maybe[Num]', | ||
| 33 | required => 1, | ||
| 34 | 7 | ) for qw( | |
| 35 | evalue bit_score | ||
| 36 | ); | ||
| 37 | |||
| 38 | |||
| 39 | |||
| 40 | sub expect { | ||
| 41 | return shift->evalue | ||
| 42 | 0 | ▶ | } |
|
Subroutine
expect: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 43 | |||
| 44 | |||
| 45 | 7 | __PACKAGE__->meta->make_immutable; | |
| 46 | 7 | 1; | |
| 47 | |||
| 48 | __END__ | ||
| 49 | |||
| 50 | =pod | ||
| 51 | |||
| 52 | =head1 NAME | ||
| 53 | |||
| 54 | Bio::FastParsers::Blast::Table::Hsp - Internal class for tabular BLAST parser | ||
| 55 | |||
| 56 | =head1 VERSION | ||
| 57 | |||
| 58 | version 0.213510 | ||
| 59 | |||
| 60 | =head1 SYNOPSIS | ||
| 61 | |||
| 62 | # see Bio::FastParsers::Blast::Table | ||
| 63 | |||
| 64 | =head1 DESCRIPTION | ||
| 65 | |||
| 66 | This class implements a single line of a tabular BLAST report. Such a line | ||
| 67 | does not correspond to a hit but to a High-Scoring-Pair (HSP). All its methods | ||
| 68 | are accessors. Beyond the standard fields found in the BLAST tabular output | ||
| 69 | (e.g., C<hit_id>, C<evalue>), additional methods are available for easier | ||
| 70 | handling of reverse strand coordinates (e.g., C<query_start>, C<hit_strand>). | ||
| 71 | |||
| 72 | =head1 METHODS | ||
| 73 | |||
| 74 | =head2 query_id | ||
| 75 | |||
| 76 | Returns the id of the query sequence. | ||
| 77 | |||
| 78 | This method does not accept any arguments. | ||
| 79 | |||
| 80 | =head2 hit_id | ||
| 81 | |||
| 82 | Returns the id of the hit (or subject) sequence. | ||
| 83 | |||
| 84 | This method does not accept any arguments. | ||
| 85 | |||
| 86 | =head2 percent_identity | ||
| 87 | |||
| 88 | Returns the identity (in percents) of the HSP. | ||
| 89 | |||
| 90 | This method does not accept any arguments. | ||
| 91 | |||
| 92 | =head2 hsp_length | ||
| 93 | |||
| 94 | Returns the length (in nt or aa) of the HSP. | ||
| 95 | |||
| 96 | This method does not accept any arguments. | ||
| 97 | |||
| 98 | =head2 mismatches | ||
| 99 | |||
| 100 | Returns the number of mismatches of the HSP. | ||
| 101 | |||
| 102 | This method does not accept any arguments. | ||
| 103 | |||
| 104 | =head2 gaps | ||
| 105 | |||
| 106 | Returns the number of gaps (or gap openings) of the HSP. | ||
| 107 | |||
| 108 | This method does not accept any arguments. | ||
| 109 | |||
| 110 | =head2 query_from | ||
| 111 | |||
| 112 | Returns the HSP start in query coordinates. The value of C<query_from> is | ||
| 113 | higher than the value of C<query_to> on reverse strands. | ||
| 114 | |||
| 115 | This method does not accept any arguments. | ||
| 116 | |||
| 117 | =head2 query_to | ||
| 118 | |||
| 119 | Returns the HSP end in query coordinates. The value of C<query_to> is lower | ||
| 120 | than the value of C<query_from> on reverse strands. | ||
| 121 | |||
| 122 | This method does not accept any arguments. | ||
| 123 | |||
| 124 | =head2 hit_from | ||
| 125 | |||
| 126 | Returns the HSP start in hit (or subject) coordinates. The value of | ||
| 127 | C<hit_from> is higher than the value of C<hit_to> on reverse strands. | ||
| 128 | |||
| 129 | This method does not accept any arguments. | ||
| 130 | |||
| 131 | =head2 hit_to | ||
| 132 | |||
| 133 | Returns the HSP end in hit (or subject) coordinates. The value of C<hit_to> is | ||
| 134 | lower than the value of C<hit_from> on reverse strands. | ||
| 135 | |||
| 136 | This method does not accept any arguments. | ||
| 137 | |||
| 138 | =head2 evalue | ||
| 139 | |||
| 140 | Returns the E-value (or expect) of the HSP. | ||
| 141 | |||
| 142 | This method does not accept any arguments. | ||
| 143 | |||
| 144 | =head2 bit_score | ||
| 145 | |||
| 146 | Returns the score (in bits) of the HSP. | ||
| 147 | |||
| 148 | This method does not accept any arguments. | ||
| 149 | |||
| 150 | =head2 query_strand | ||
| 151 | |||
| 152 | Returns the strand (+1/-1) of the query in the HSP. | ||
| 153 | |||
| 154 | This method does not accept any arguments. | ||
| 155 | |||
| 156 | =head2 hit_strand | ||
| 157 | |||
| 158 | Returns the strand (+1/-1) of the hit in the HSP. | ||
| 159 | |||
| 160 | This method does not accept any arguments. | ||
| 161 | |||
| 162 | =head2 query_start | ||
| 163 | |||
| 164 | Returns the HSP start in query coordinates. The value of C<query_start> is | ||
| 165 | guaranteed to be lower than the value of C<query_end>. | ||
| 166 | |||
| 167 | This method does not accept any arguments. | ||
| 168 | |||
| 169 | =head2 query_end | ||
| 170 | |||
| 171 | Returns the HSP end in query coordinates. The value of C<query_end> is | ||
| 172 | guaranteed to be higher than the value of C<query_start>. | ||
| 173 | |||
| 174 | This method does not accept any arguments. | ||
| 175 | |||
| 176 | =head2 hit_start | ||
| 177 | |||
| 178 | Returns the HSP start in hit (or subject) coordinates. The value of | ||
| 179 | C<hit_start> is guaranteed to be lower than the value of C<hit_end>. | ||
| 180 | |||
| 181 | This method does not accept any arguments. | ||
| 182 | |||
| 183 | =head2 hit_end | ||
| 184 | |||
| 185 | Returns the HSP end in hit (or subject) coordinates. The value of C<hit_end> | ||
| 186 | is guaranteed to be higher than the value of C<hit_start>. | ||
| 187 | |||
| 188 | This method does not accept any arguments. | ||
| 189 | |||
| 190 | =head1 ALIASES | ||
| 191 | |||
| 192 | =head2 expect | ||
| 193 | |||
| 194 | Alias for C<evalue> method. For API consistency. | ||
| 195 | |||
| 196 | =head1 AUTHOR | ||
| 197 | |||
| 198 | Denis BAURAIN <denis.baurain@uliege.be> | ||
| 199 | |||
| 200 | =head1 COPYRIGHT AND LICENSE | ||
| 201 | |||
| 202 | This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN. | ||
| 203 | |||
| 204 | This is free software; you can redistribute it and/or modify it under | ||
| 205 | the same terms as the Perl 5 programming language system itself. | ||
| 206 | |||
| 207 | =cut | ||