{"action":"opened","issue":{"url":"https://api.github.com/repos/samtools/htslib/issues/348","repository_url":"https://api.github.com/repos/samtools/htslib","labels_url":"https://api.github.com/repos/samtools/htslib/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/samtools/htslib/issues/348/comments","events_url":"https://api.github.com/repos/samtools/htslib/issues/348/events","html_url":"https://github.com/samtools/htslib/issues/348","id":138961458,"number":348,"title":"htslib has problems with positions above ~500000000","user":{"login":"bunop","id":5947792,"avatar_url":"https://avatars.githubusercontent.com/u/5947792?v=3","gravatar_id":"","url":"https://api.github.com/users/bunop","html_url":"https://github.com/bunop","followers_url":"https://api.github.com/users/bunop/followers","following_url":"https://api.github.com/users/bunop/following{/other_user}","gists_url":"https://api.github.com/users/bunop/gists{/gist_id}","starred_url":"https://api.github.com/users/bunop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunop/subscriptions","organizations_url":"https://api.github.com/users/bunop/orgs","repos_url":"https://api.github.com/users/bunop/repos","events_url":"https://api.github.com/users/bunop/events{/privacy}","received_events_url":"https://api.github.com/users/bunop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-07T11:57:19Z","updated_at":"2016-03-07T11:57:19Z","closed_at":null,"body":"Dear all,\r\n\r\nwe faced an issue when dealing with vcf in plant genomes, which can have big chromosomes. Briefly, we can't extract with tabix positions above `5e8`, and also softwares which uses `htslib` have such issue. I've uploaded a [gist](https://gist.github.com/bunop/2ced1915e55e74348e62) with a sample VCF. Here are the instruction to reproduce the issue:\r\n\r\nDownload the latest htslib from [github](https://github.com/samtools/htslib.git). Compile code, then download `moved.vcf` from [gist](https://gist.githubusercontent.com/bunop/2ced1915e55e74348e62/raw/c1a6f2f6a7b35e9b9d284d2332b2b1dd0ab7d621/moved.vcf). Inspect last vcf lines with `tail`:\r\n\r\n```\r\n$ tail -2 moved.vcf | cut -f 1-7\r\n12      1060240521      .       G       T       203.196 .\r\n12      1070240615      .       C       A       378.781 .\r\n```\r\n\r\nNow pack the file with bgzip and index it with tabix:\r\n\r\n```\r\n$ ./bgzip moved.vcf \r\n$ ./tabix moved.vcf.gz\r\n```\r\n\r\nFinally, query the VCF using tabix and chrom `12`:\r\n\r\n```\r\n$ ./tabix moved.vcf.gz 12 | tail -2 | cut -f 1-7\r\n12      520164811       .       G       A       73.6504 .\r\n12      530164817       .       T       C       83.1434 .\r\n```\r\n\r\nAll lines after 109 (POS `530164817`) were lost.\r\n\r\nThanks for your support."}}