++ed by:

2 PAUSE users

Author image Alessandro Vullo
and 1 contributors


Copyright [2015-2018] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


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


See "The generic fetch() and pileup() methods" in Bio::DB::HTS for how this object is passed to pileup callbacks.


A Bio::DB::HTS::Pileup object (or a Bio::DB::HTS::PileupWrapper object) is passed to the callback passed to the Bio::DB::HTS->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::HTS::AlignWrapper objects in response to the alignment() method, at the cost of some performance loss.


$alignment = $pileup->alignment

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

$alignment = $pileup->b

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

$qpos = $pileup->qpos

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

$pos = $pileup->pos

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

$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.

$is_del = $pileup->is_del

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

$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.


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


Rishi Nag <rishi@ebi.ac.uk<gt>


Bio::Perl, Bio::DB::HTS, Bio::DB::HTS::Alignment, Bio::DB::HTS::Constants