cbgen
Python wrapper around a BGEN library. (cbgen documentation).
BGEN is a file format for storing large genetic datasets. It supports both unphased genotypes and phased haplotype data with variable ploidy and number of alleles. It was designed to provide a compact data representation without sacrificing variant access performance. This Python package is a wrapper around the bgen library, a low-memory footprint reader that efficiently reads bgen files. It fully supports the bgen format specifications: 1.2 and 1.3; as well as their optional compressed formats.
Installation
pip install cbgen
Usage example
>>> import cbgen
>>>
>>> bgen = cbgen.bgen_file(cbgen.example.get("haplotypes.bgen"))
>>> bgen.create_metafile("haplotypes.bgen.metafile")
>>> mf = cbgen.bgen_metafile("haplotypes.bgen.metafile")
>>> print(mf.npartitions)
1
>>> print(mf.nvariants)
4
>>> print(mf.partition_size)
4
>>> part = mf.read_partition(0)
>>> gt = bgen.read_genotype(part.variants.offset[0])
>>> print(gt.probability)
[[1. 0. 1. 0.]
[0. 1. 1. 0.]
[1. 0. 0. 1.]
[0. 1. 0. 1.]]
>>> mf.close()
>>> bgen.close()
Authors
License
This project is licensed under the MIT License.
Metadata
Release files for cbgen 1.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cbgen-1.0.6.tar.gz | 12.4 kB | Details |
Built distributions (wheels)
Total release size: 9.3 MB
Release files / cbgen-1.0.6.tar.gz
| Download URL | cbgen-1.0.6.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edcf856c9b0cafae7f6e999ed5d08aacdf1e09dadec766b79990fe5861e8cf7e
|
|
BLAKE2b-256 checksum How to use checksums |
a097cc69e0d0accb46965332ae247f3289832e546f8d30cb77218d6eb0f47b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp312-cp312-win_amd64.whl
| Download URL | cbgen-1.0.6-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 319.7 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e56d6a01fb71d5c7fbf7039cc23089edd7a749fafb9f2898efffeacbd14a2bba
|
|
BLAKE2b-256 checksum How to use checksums |
eceb493f97d94704a5078770477d03924c6bd74c2d98d041d25848f4b735034d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp312-cp312-musllinux_1_2_x86_64.whl
| Download URL | cbgen-1.0.6-cp312-cp312-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 914.9 kB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
e1279d9881844018d27d6cd3ec8475e08d68136a1862c8eadf41745b373393d1
|
|
BLAKE2b-256 checksum How to use checksums |
a9246613c31e2346bd583ebbd4f32eccca4cd894364daf751ed0b632665013b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cbgen-1.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 767.5 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
8e95a3b83d58343f5a7026dcee9dfce7ab9845406feb8b1c065151636b9fbefc
|
|
BLAKE2b-256 checksum How to use checksums |
a5363e8550e6d05baea8eb2eae8c27887e81ea0085f8246d13e030d73f9f87fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp312-cp312-macosx_14_0_arm64.whl
| Download URL | cbgen-1.0.6-cp312-cp312-macosx_14_0_arm64.whl |
|---|---|
| Size | 380.3 kB |
| Tags | CPython 3.12 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
07d8d9209d24005f8f492b82f3793ac4ac8596263b07c5f68b7ab3e57eb0bc83
|
|
BLAKE2b-256 checksum How to use checksums |
c0157c42414b690d937ca6c4c75d08964e1e7bb19d9bb2fc06b5698ee18e53b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp312-cp312-macosx_13_0_x86_64.whl
| Download URL | cbgen-1.0.6-cp312-cp312-macosx_13_0_x86_64.whl |
|---|---|
| Size | 554.3 kB |
| Tags | CPython 3.12 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
e05037fabfd12711836b0cd26da961fc271b56080871e3508177c6c08b1247b1
|
|
BLAKE2b-256 checksum How to use checksums |
09ce6abc744f0b17d24ce47fd177b81aafc0a8afe005439b18e57db6caa564f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-win_amd64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 243.9 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
733a11d2eb2b06adf4ef0dd7675ce18e011c12df99e42fea93b3222efad5293b
|
|
BLAKE2b-256 checksum How to use checksums |
4084f0660542361cfe3a97e553d61e91d92bb26ea04a87cdd7d06522f1852dcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 729.1 kB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
fc40d9e917155125057adbad5477537a3974a7908080b60715449298f5c686d7
|
|
BLAKE2b-256 checksum How to use checksums |
c4bbfa9ed88dca04be210707e00bf329a337b78cbfc154c4cfa0250a7f589b0b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-musllinux_1_2_aarch64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 345.4 kB |
| Tags | CPython 3.11 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
9beb0fe67968020344b47c0f5f648418202ead39b1cc599adc481a49daace99b
|
|
BLAKE2b-256 checksum How to use checksums |
b87b10cff399b0255d1426a1498aeb2eda7a94167a034fbd9f0bca5da2c66fdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 578.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9c04f5860e7c35296777af14b0749c3b0c0210825644ac98cae9f169822a40bd
|
|
BLAKE2b-256 checksum How to use checksums |
1aaa7b37e68dda0f95b5fde96d20aab5163c61f35268914d4df110923953fbb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 180.6 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
85560c53ea769902e9516b86d6bd2f3e6718dcac8ce4c3d7c0ac9fb43863b19f
|
|
BLAKE2b-256 checksum How to use checksums |
adcc0a735cc723989189177d00a57937e44184b57ca42245570b0b8e86720d57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-macosx_14_0_arm64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-macosx_14_0_arm64.whl |
|---|---|
| Size | 289.0 kB |
| Tags | CPython 3.11 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a0ddcaa25f19ea383931605d4627da06339662d0ef5bc07fda706d2592a11b31
|
|
BLAKE2b-256 checksum How to use checksums |
8171260966997bdad39615e3430375fbca020ca103c1f601ec95f969e0b02296
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp311-cp311-macosx_13_0_x86_64.whl
| Download URL | cbgen-1.0.6-cp311-cp311-macosx_13_0_x86_64.whl |
|---|---|
| Size | 419.5 kB |
| Tags | CPython 3.11 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
b97ab995397d56fa007dfd4e3d01f0ee7bc02ee5685b4e174161615af6a1dad0
|
|
BLAKE2b-256 checksum How to use checksums |
ff05360448e10fbe7bed04450d2e2f9df6c8ddfa6e86beb367e426eb6b06fb49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-win_amd64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 167.6 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d4f599d86f35d219093e885c35efb74b64e9d0d8a5a6ff6f5e73d87f1e7eb158
|
|
BLAKE2b-256 checksum How to use checksums |
e96a489bbf9b822572dc130ac10342314d5c05c88957cfef30a08d250700294a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 543.9 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
de6da1a148478851ed50a6dca99c6e48d5cf1a98560eea1fbfceaaa42d7c7269
|
|
BLAKE2b-256 checksum How to use checksums |
6e383c6d281b4d14dc99e8536dbc3840e43884a4c2ec51853c471c165e849320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-musllinux_1_2_aarch64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 345.4 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
e0b7a71d7bc7b0427b4e21e2d775a3700f122115c2617fbbe47436994e0f38cd
|
|
BLAKE2b-256 checksum How to use checksums |
a5327b3d8a0efe32b67833b491faafd9dfc895d0ccf66e3e55ba1d07218be06d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 391.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
332852813515c293956640ac0fce95bb9a4813d37792981aca4ecca49c8a8b8b
|
|
BLAKE2b-256 checksum How to use checksums |
7c1f460de7436623ab3687f22bb03116d03bd5fbb34505a379853e210e50427d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 180.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
0fe460460c29af60f3b1b378683d9ae559f8986b3dd5cc23a030ce108f569ab0
|
|
BLAKE2b-256 checksum How to use checksums |
ec55b07aa26859e22982c823822fbd384d136bbeeec386c826d685e0d1acfe0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-macosx_14_0_arm64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-macosx_14_0_arm64.whl |
|---|---|
| Size | 197.7 kB |
| Tags | CPython 3.10 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4d13799e89bbdc80cdb782c15592e3056381dfdeddd9b67fc21c6e5c96e52432
|
|
BLAKE2b-256 checksum How to use checksums |
5e490f9e0e73d9f4b3578b511af00857f4274219fc411a0433fa96f8aad91091
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp310-cp310-macosx_13_0_x86_64.whl
| Download URL | cbgen-1.0.6-cp310-cp310-macosx_13_0_x86_64.whl |
|---|---|
| Size | 284.7 kB |
| Tags | CPython 3.10 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
6175728aa6db4ef235f67b35e8a2d6cd7d73bd7f9595cca3e584a7c70d210984
|
|
BLAKE2b-256 checksum How to use checksums |
0cd90e8b194ff5c223eb85fa84f84eb215f578835b6cadbdd39940a0dc8c9a81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-win_amd64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 91.2 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
80526b425586272f5d5c721de3e7c6595f9f855e94b023bd5377d54667349fde
|
|
BLAKE2b-256 checksum How to use checksums |
68861d5388c64fef248beed558fdba295596d1f16c5e0a6b2b0e37b00f8d56a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-musllinux_1_2_x86_64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 358.8 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
f2dfcad5b7432c62db50c8c2ebde9fe107720af87a613c3366f78550a9de3761
|
|
BLAKE2b-256 checksum How to use checksums |
e0ee4cb92a53646970d0dea3ef007620176a89ff484a69745b9fbc22f20136d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-musllinux_1_2_aarch64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 345.4 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 |
|
SHA-256 checksum How to use checksums |
6b61998d7aaa1fe75162096a5b5bb3d2997bca7814290c4d75576396175dec16
|
|
BLAKE2b-256 checksum How to use checksums |
07dc3ca8b3aa7cf18ab38e103db129763c171479f931fda734f9c302faafec78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 203.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
d26b6034e15a6c67c5b1d3caf127e2a79ed08bd90d23c8a157ff5652231acf0a
|
|
BLAKE2b-256 checksum How to use checksums |
ae377c8c79b2913461fe3a81e6bff48a49a83592266065e47330da0ef70d016f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 180.6 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
7e2e3c9ed4461791e056efb17d8bbf9559f0ef68d90a3366f788ec69858e252f
|
|
BLAKE2b-256 checksum How to use checksums |
a9e0462f0cde8b72b5170c5d7e441325d0969be22e2fa249b1d2c04c56cc6637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-macosx_14_0_arm64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-macosx_14_0_arm64.whl |
|---|---|
| Size | 106.4 kB |
| Tags | CPython 3.9 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f4eb1f07398a37daaf40327de5e491ede311a933d26f6868e1f3d74982c5d569
|
|
BLAKE2b-256 checksum How to use checksums |
b39bff50f251077b0972bd9a262ed9ae781b565d83adc799d6ce6bcd1ca28a05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / cbgen-1.0.6-cp39-cp39-macosx_13_0_x86_64.whl
| Download URL | cbgen-1.0.6-cp39-cp39-macosx_13_0_x86_64.whl |
|---|---|
| Size | 149.9 kB |
| Tags | CPython 3.9 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
f32275bbd77c32a40129e0d37450de019f74fefecdd337217116d1a4cdf21713
|
|
BLAKE2b-256 checksum How to use checksums |
9ad4207566dd60778e5c868dc887bddc0cc20a9c4ebdb06bd451669d12064ef7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|