Bio-SamTools

 view release on metacpan or  search on metacpan

lib/Bio/DB/Bam/Pileup.pm  view on Meta::CPAN

package Bio::DB::Bam::Pileup;

# $Id$

# documentation only

1;

=head1 NAME

Bio::DB::Bam::Pileup -- Object passed to pileup() callback

=head1 SYNOPSIS

See L<Bio::DB::Sam/The generic fetch() and pileup() methods> for how
this object is passed to pileup callbacks.

=head1 DESCRIPTION

A Bio::DB::Bam::Pileup object (or a Bio::DB::Bam::PileupWrapper
object) is passed to the callback passed to the Bio::DB::Sam->pileup()
method for each column in a sequence alignment. The only difference
between the two is that the latter returns the more convenient
Bio::DB::Bam::AlignWrapper objects in response to the alignment()
method, at the cost of some performance loss.

=head2 Methods

=over 4

=item $alignment = $pileup->alignment

Return the Bio::DB::Bam::Alignment or Bio::DB::Bam::AlignWrapper
object representing the aligned read.

=item $alignment = $pileup->b

This method is an alias for alignment(). It is available for
compatibility with the C API.

=item $qpos = $pileup->qpos

Return the position of this aligned column in read coordinates, using
zero-based coordinates.

=item $pos  = $pileup->pos

Return the position of this aligned column in read coordinates, using
1-based coordinates.

=item $indel = $pileup->indel

If this column is an indel, return a positive integer for an insertion
relative to the reference, a negative integer for a deletion relative
to the reference, or 0 for no indel at this column.

=item $is_del = $pileup->is_del

True if the base on the padded read is a deletion.

=item $level  = $pileup->level

If pileup() or fast_pileup() was invoked with the "keep_level" flag,
then this method will return a positive integer indicating the level
of the read in a printed multiple alignment.

=item $pileup->is_head

=item $pileup->is_tail

These fields are defined in bam.h but their interpretation is obscure.

=back

=head1 SEE ALSO



( run in 1.263 second using v1.01-cache-2.11-cpan-140bd7fdf52 )