| 1 | package Bio::MUST::Apps::OmpaPa::Hmmer; | ||||||||||||
| 2 | # ABSTRACT: internal class for tabular HMMER parser | ||||||||||||
| 3 | # CONTRIBUTOR: Amandine BERTRAND <amandine.bertrand@doct.uliege.be> | ||||||||||||
| 4 | 1 | $Bio::MUST::Apps::OmpaPa::Hmmer::VERSION = '0.260260'; | |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use namespace::autoclean; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 1 | ▶ | use autodie; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 1 | ▶ | use feature qw(say); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 1 | ▶ | use Smart::Comments '###'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | use Carp; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | 1 | ▶ | use List::AllUtils qw(mesh); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 15 | |||||||||||||
| 16 | 1 | extends 'Bio::FastParsers::Hmmer::DomTable'; | |||||||||||
| 17 | 1 | with 'Bio::MUST::Apps::OmpaPa::Roles::Parsable'; | |||||||||||
| 18 | |||||||||||||
| 19 | |||||||||||||
| 20 | 4 | ▶ | sub collect_hits { | ||||||||||
|
Subroutine
collect_hits: called CC=5 SCAR=16.1
Pod
undocumented
| |||||||||||||
| 21 | 4 | my $self = shift; | |||||||||||
| 22 | |||||||||||||
| 23 | 4 | my @hits; | |||||||||||
| 24 | |||||||||||||
| 25 | # parse HMMER report | ||||||||||||
| 26 | HIT: | ||||||||||||
| 27 | 4 | ▶ | while (my $hit = $self->next_hit) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 28 | |||||||||||||
| 29 | # honor --max-hits limit | ||||||||||||
| 30 | 749 | ▶ | if (@hits >= $self->max_hits) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 31 | 1 | carp 'Reached --max-hits limit; truncating report!'; | |||||||||||
| 32 | 1 | last HIT; | |||||||||||
| 33 | } | ||||||||||||
| 34 | |||||||||||||
| 35 | 748 | ▶ | if ($hit->rank == 1) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 36 | |||||||||||||
| 37 | # collect useful hit attributes | ||||||||||||
| 38 | 736 | ▶ | push @hits, { | ||||||||||
|
Condition50%1/2
$hit->target_description // "none"
MC/DC0%0/1
$hit->target_description // "none"
$hit->target_description
Truth table50%1/2
A
A= $hit->target_description
| |||||||||||||
| 39 | 'acc' => $hit->target_name, | ||||||||||||
| 40 | 'dsc' => $hit->target_description // 'none', | ||||||||||||
| 41 | 'exp' => $hit->evalue, | ||||||||||||
| 42 | 'bit' => $hit->score, | ||||||||||||
| 43 | 'qlen' => $hit->qlen, | ||||||||||||
| 44 | 'len' => $hit->tlen, | ||||||||||||
| 45 | 'hmm_from' => $hit->hmm_from, | ||||||||||||
| 46 | 'hmm_to' => $hit->hmm_to, | ||||||||||||
| 47 | }; | ||||||||||||
| 48 | } | ||||||||||||
| 49 | } | ||||||||||||
| 50 | |||||||||||||
| 51 | 4 | return \@hits; | |||||||||||
| 52 | } | ||||||||||||
| 53 | |||||||||||||
| 54 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||
| 55 | 1 | 1; | |||||||||||
| 56 | |||||||||||||
| 57 | __END__ | ||||||||||||