Bio::DB::HTS::Tabix - docs not accurate
Created by: keiranmraine
The docs need rewording for 'query' to make it very clear that the coordinate format is 1-based for start and stop, unlike the legacy Tabix module (which was 0-based start).
It is also inaccurate to say that to retrieve 1 coordinate that a string of '12:5000000-5000001' is required:
$ zcat test.bed.gz
1 9 10 . stuff
1 10 11 . more
$ perl htsTabix.pl test.bed.gz 1 9 10
1 9 10 . stuff
$ perl htsTabix.pl test.bed.gz 1 9 11
1 9 10 . stuff
1 10 11 . more
$ perl htsTabix.pl test.bed.gz 1 10 11
1 9 10 . stuff
1 10 11 . more
$ perl htsTabix.pl test.bed.gz 1 11 11
1 10 11 . more
$ perl htsTabix.pl test.bed.gz 1 12 12
script:
use strict;
use warnings;
use Bio::DB::HTS::Tabix;
my $file = shift @ARGV;
my $tabix = Bio::DB::HTS::Tabix->new(filename => $file);
my $iter = $tabix->query(sprintf '%s:%d-%d', @ARGV);
while(my $l = $iter->next) {
print $l, "\n";
}