The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::HTS::Tabix - Object oriented access to the underlying tbx C methods

SYNOPSIS

    use feature qw( say );
    use Bio::HTS::Tabix;

    my $tabix = Bio::HTS::Tabix->new( filename => "gerp_plus_plus_31July2014.gz" );

    say $tabix->header;
    my $iter = $tabix->query("1:4000005-4000009");

    while ( my $n = $iter->next ) {
        say $n;
    }

DESCRIPTION

A high level object oriented interface to the htslib tabix (tbx.h) api. Currently it only supports retrieving regions from a tabixed file, because that's all I needed it for.

Attributes

filename

The gzipped file you want to query. Must have a filename.tbi (the index is not created automatically)

warnings

Set to 0 to turn off all the warnings. Default is on

Methods

Returns all the header lines as a single scalar from the tabixed file

query

Takes a single region like: '1:4000005-4000009' or '12:5000000' Note: this works exactly the same way as the tabix executable, so '12:5000000' actually means get all results from position 5,000,000 up to the very end of the chromosome. To get results only at position 5,000,000 you should do '12:5000000-5000001'

Returns a Bio::HTS::Tabix::Iterator for the specified region

seqnames

Returns an array ref of chromosomes that are in the indexed file

LICENSE

Licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)

COPYRIGHT

Copyright 2015 Congenica Ltd.

AUTHOR

Alex Hodgkins