Bio::HTS::Tabix - Object oriented access to the underlying tbx C methods
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; }
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.
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
header
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
Licensed under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)
Copyright 2015 Congenica Ltd.
Alex Hodgkins
To install Bio::HTS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::HTS
CPAN shell
perl -MCPAN -e shell install Bio::HTS
For more information on module installation, please visit the detailed CPAN module installation guide.