{"action":"opened","issue":{"url":"https://api.github.com/repos/Ensembl/Bio-HTS/issues/13","repository_url":"https://api.github.com/repos/Ensembl/Bio-HTS","labels_url":"https://api.github.com/repos/Ensembl/Bio-HTS/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/Ensembl/Bio-HTS/issues/13/comments","events_url":"https://api.github.com/repos/Ensembl/Bio-HTS/issues/13/events","html_url":"https://github.com/Ensembl/Bio-HTS/issues/13","id":151660617,"number":13,"title":"Bio::DB::HTS::Tabix - docs not accurate","user":{"login":"keiranmraine","id":3740323,"avatar_url":"https://avatars.githubusercontent.com/u/3740323?v=3","gravatar_id":"","url":"https://api.github.com/users/keiranmraine","html_url":"https://github.com/keiranmraine","followers_url":"https://api.github.com/users/keiranmraine/followers","following_url":"https://api.github.com/users/keiranmraine/following{/other_user}","gists_url":"https://api.github.com/users/keiranmraine/gists{/gist_id}","starred_url":"https://api.github.com/users/keiranmraine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keiranmraine/subscriptions","organizations_url":"https://api.github.com/users/keiranmraine/orgs","repos_url":"https://api.github.com/users/keiranmraine/repos","events_url":"https://api.github.com/users/keiranmraine/events{/privacy}","received_events_url":"https://api.github.com/users/keiranmraine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-28T14:44:15Z","updated_at":"2016-04-28T14:44:15Z","closed_at":null,"body":"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).\r\n\r\nIt is also inaccurate to say that to retrieve 1 coordinate that a string of '12:5000000-5000001' is required:\r\n\r\n````\r\n$ zcat test.bed.gz\r\n1\t9\t10\t.\tstuff\r\n1\t10\t11\t.\tmore\r\n\r\n$ perl htsTabix.pl test.bed.gz 1 9 10\r\n1\t9\t10\t.\tstuff\r\n$ perl htsTabix.pl test.bed.gz 1 9 11\r\n1\t9\t10\t.\tstuff\r\n1\t10\t11\t.\tmore\r\n$ perl htsTabix.pl test.bed.gz 1 10 11\r\n1\t9\t10\t.\tstuff\r\n1\t10\t11\t.\tmore\r\n$ perl htsTabix.pl test.bed.gz 1 11 11\r\n1\t10\t11\t.\tmore\r\n$ perl htsTabix.pl test.bed.gz 1 12 12\r\n````\r\n\r\nscript:\r\n\r\n````\r\nuse strict;\r\nuse warnings;\r\nuse Bio::DB::HTS::Tabix;\r\n\r\nmy $file = shift @ARGV;\r\nmy $tabix = Bio::DB::HTS::Tabix->new(filename => $file);\r\n\r\nmy $iter = $tabix->query(sprintf '%s:%d-%d', @ARGV);\r\nwhile(my $l = $iter->next) {\r\n  print $l, \"\\n\";\r\n}\r\n````"}}