LICENSE
Copyright [1999-2016] Wellcome Trust Sanger Institute and the 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
http://www.apache.org/licenses/LICENSE-2.0
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.
NAME
Bio::DB::HTS::Tabix - Object oriented access to the underlying tbx C methods
SYNOPSIS
use feature qw( say );
use Bio::DB::HTS::Tabix;
my $tabix = Bio::DB::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)
Methods
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::DB::HTS::Tabix::Iterator for the specified region
seqnames
-
Returns an array ref of chromosomes that are in the indexed file
AUTHOR
Alex Hodgkins Rishi Nag <rishi@ebi.ac.uk>