Title: Not a gzipped file · Issue #84 · bionumpy/bionumpy · GitHub
Open Graph Title: Not a gzipped file · Issue #84 · bionumpy/bionumpy
X Title: Not a gzipped file · Issue #84 · bionumpy/bionumpy
Description: Hi, I received the following error when trying to read a standard bgzipped VCF file in kage: File "/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py", line 52, in main run_argument_parser(sys.ar...
Open Graph Description: Hi, I received the following error when trying to read a standard bgzipped VCF file in kage: File "/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py", lin...
X Description: Hi, I received the following error when trying to read a standard bgzipped VCF file in kage: File "/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py&...
Opengraph URL: https://github.com/bionumpy/bionumpy/issues/84
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Not a gzipped file","articleBody":"Hi,\n\nI received the following error when trying to read a standard bgzipped VCF file in kage:\n\n```\nFile \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py\", line 52, in main\n run_argument_parser(sys.argv[1:])\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py\", line 559, in run_argument_parser\n args.func(args)\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/indexing/main.py\", line 305, in make_index_cli\n r = make_index(args.reference, args.vcf, args.out_base_name,\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/indexing/main.py\", line 74, in make_index\n validate_input_vcf(vcf_file_name)\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/indexing/main.py\", line 40, in validate_input_vcf\n with bnp.open(vcf_file_name) as f:\n ^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/bionumpy/io/files.py\", line 183, in bnp_open\n return _get_buffered_file(filename, suffix, mode, is_gzip=is_gzip, buffer_type=buffer_type, lazy=lazy)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/bionumpy/io/files.py\", line 68, in _get_buffered_file\n file_reader = NumpyFileReader(open_func(filename, \"rb\"), buffer_type) # , **kwargs2)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/bionumpy/io/parser.py\", line 68, in __init__\n self._header_data = self._buffer_type.read_header(self._file_obj)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/bionumpy/io/file_buffers.py\", line 163, in read_header\n file_object.seek(-len(line), 1)\n File \"/home/kevin/miniforge3/envs/kage/lib/python3.12/gzip.py\", line 421, in seek\n return self._buffer.seek(offset, whence)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\ngzip.BadGzipFile: Not a gzipped file (b'\\x00\\x00')\n```\n\nIt took me a while to track the issue down, but it seems this was due to the use of the isal igzip module. As soon as I replaced the import with the standard gzip module everything worked fine. Let me know if there are any other details that might be helpful.","author":{"url":"https://github.com/lordkev","@type":"Person","name":"lordkev"},"datePublished":"2025-01-25T08:10:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/84/bionumpy/issues/84"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6905d4ad-697d-b9f7-c0fb-0b7860ab54f0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAEC:89420:CBD498:10B8981:698FB583 |
| html-safe-nonce | b7c834eb69b4a5abaed71c38549cd2c552b86242fc5c27a208beeef3faf06d69 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUVDOjg5NDIwOkNCRDQ5ODoxMEI4OTgxOjY5OEZCNTgzIiwidmlzaXRvcl9pZCI6IjMwMzE0Mjg0MzY3Njg2NTkyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 28e0e9cacc2f553c583a700f2da126868135dc199068bf3e5f4d9a024c9e9ad2 |
| hovercard-subject-tag | issue:2810841773 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bionumpy/bionumpy/84/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b8d6b44bdcb87242fb42ed37e0c70de1fe8f7dc3601981d38754f1dda9003b03/bionumpy/bionumpy/issues/84 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b8d6b44bdcb87242fb42ed37e0c70de1fe8f7dc3601981d38754f1dda9003b03/bionumpy/bionumpy/issues/84 |
| og:image:alt | Hi, I received the following error when trying to read a standard bgzipped VCF file in kage: File "/home/kevin/miniforge3/envs/kage/lib/python3.12/site-packages/kage/command_line_interface.py", lin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lordkev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6df359c0989bb4eb7656e0047ab7a57a6657880db88f5a202f4e51ddbc3dfce8 |
| turbo-cache-control | no-preview |
| go-import | github.com/bionumpy/bionumpy git https://github.com/bionumpy/bionumpy.git |
| octolytics-dimension-user_id | 115636236 |
| octolytics-dimension-user_login | bionumpy |
| octolytics-dimension-repository_id | 542265970 |
| octolytics-dimension-repository_nwo | bionumpy/bionumpy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 542265970 |
| octolytics-dimension-repository_network_root_nwo | bionumpy/bionumpy |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d09a7639fca70dcd33f2b127cabd422a73b10aef |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width