NAME

Bio::FastParsers::Blast::Xml::Iteration - NCBI BLAST DTD-derived internal class

VERSION

version 0.221230

SYNOPSIS

# see Bio::FastParsers::Blast::Xml

DESCRIPTION

This class implements the Iteration level of the XML BLAST parser.

ATTRIBUTES

hits

ArrayRef of Bio::FastParsers::Blast::Xml::Hit

stat

Bio::FastParsers::Blast::Xml::Statistics composed object

METHODS

count_hits

Returns the number of Hits of the Iteration.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $count = $iteration->count_hits;

This method does not accept any arguments.

all_hits

Returns all the Hits of the Iteration (not an array reference).

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my @hits = $iteration->all_hits;

This method does not accept any arguments.

get_hit

Returns one Hit of the Iteration by its index. You can also use negative index numbers, just as with Perl's core array handling. If the specified Hit does not exist, this method will return undef.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $hit = $iteration->get_hit($index);
croak "Hit $index not found!" unless defined $hit;

This method accepts just one argument (and not an array slice).

next_hit

Shifts the first Hit of the array off and returns it, shortening the array by 1 and moving everything down. If there are no more Hits in the array, returns undef.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
while (my $hit = $iteration->next_hit) {
    # process $hit
    # ...
}

This method does not accept any arguments.

iter_num

Returns the value of the element <Iteration_iter-num>.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $iter_num = $iteration->iter_num;

This method does not accept any arguments.

message

Returns the value of the element <Iteration_message>.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $message = $iteration->message;

This method does not accept any arguments.

query_def

Returns the value of the element <Iteration_query-def>.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $query_def = $iteration->query_def;

This method does not accept any arguments.

query_id

Returns the value of the element <Iteration_query-ID>.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $query_id = $iteration->query_id;

This method does not accept any arguments.

query_len

Returns the value of the element <Iteration_query-len>.

# $iteration is a Bio::FastParsers::Blast::Xml::Iteration
my $query_len = $iteration->query_len;

This method does not accept any arguments.

ALIASES

statistics

Alias for stat method. For API consistency.

num

Alias for iter_num method. For API consistency.

AUTHOR

Denis BAURAIN <denis.baurain@uliege.be>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by University of Liege / Unit of Eukaryotic Phylogenomics / Denis BAURAIN.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.