Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • B Bio-DB-HTS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ensembl-gh-mirror
  • Bio-DB-HTS
  • Issues
  • #13

Closed
Open
Created Apr 28, 2016 by Marek Szuba@mks

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";
}
Assignee
Assign to
Time tracking