Skip to main content

Fast Cython-powered one-hot encoding for DNA sequences

Project description

brisket

Fast cython powered 1 hot encoding for DNA sequences.

Installation

$ pip install brisket

Usage

import numpy as np
from brisket import encode_seq

# Encode a DNA sequence to one-hot format
dna_sequence = "ATCG"
encoded = encode_seq(dna_sequence)

print(encoded)
# Output: 2D numpy array with shape (4, seq_length) - PyTorch convention
# [[1 0 0 0]  # A channel: positions 0, 1, 2, 3
#  [0 0 1 0]  # C channel: positions 0, 1, 2, 3
#  [0 0 0 1]  # G channel: positions 0, 1, 2, 3
#  [0 1 0 0]] # T channel: positions 0, 1, 2, 3

# The encoding uses channels-first format:
# - Row 0 = A channel, Row 1 = C channel, Row 2 = G channel, Row 3 = T channel
# - Each row represents one nucleotide type across all positions
# - Each column represents one position in the sequence

# Invalid characters (not A, T, C, G) result in all-zero columns
encoded_with_n = encode_seq("ATCGN")  # Last column will be [0 0 0 0]

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

brisket was created by Natalie Gill and Sean Whalen. It is licensed under the terms of the MIT license.

Credits

brisket was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

brisket-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

brisket-0.1.2-cp312-cp312-win_amd64.whl (31.0 kB view details)

Uploaded CPython 3.12Windows x86-64

brisket-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (121.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

brisket-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (29.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

brisket-0.1.2-cp311-cp311-win_amd64.whl (30.6 kB view details)

Uploaded CPython 3.11Windows x86-64

brisket-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (114.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

brisket-0.1.2-cp311-cp311-macosx_11_0_arm64.whl (28.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

brisket-0.1.2-cp310-cp310-win_amd64.whl (30.6 kB view details)

Uploaded CPython 3.10Windows x86-64

brisket-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (107.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

brisket-0.1.2-cp310-cp310-macosx_11_0_arm64.whl (29.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

brisket-0.1.2-cp39-cp39-win_amd64.whl (30.6 kB view details)

Uploaded CPython 3.9Windows x86-64

brisket-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (106.5 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

brisket-0.1.2-cp39-cp39-macosx_11_0_arm64.whl (29.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file brisket-0.1.2.tar.gz.

File metadata

  • Download URL: brisket-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brisket-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4d176b81f588f2f80606e003afe77b88a3c894c1757902e852df7c6a021e121e
MD5 596eb68b1845cce6ce6d1e9e0811a123
BLAKE2b-256 9021a68ce5c083a2fa2a9b5baa3bf77222a5b89d0e9c07e47471f54276b55117

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2.tar.gz:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: brisket-0.1.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 31.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brisket-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 61581631bf479232ae4009bdba0ef8370166e49597a29b539869c6b8b1f9c661
MD5 9a455c7359bfde72e52982fa9e2ec2a6
BLAKE2b-256 cddae757378c351830777e7f2d2c039c5723c889081c87e1b520ca2740a02c4b

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp312-cp312-win_amd64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 74a6582c95d485c27d4df17c57ab62f5205805fbace6ebae1b0a43f9ed2d1295
MD5 6a9967d9800a7dc2960b63248b5378c3
BLAKE2b-256 06810a86584c77e949b055755ed05f71730dd48de107d423775db6eb1c8a106e

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 efffcaaff2d00617279a9ddc6308808c507680ece8ca3def683e360d11a3d44e
MD5 343b63f31aef853c32422cfd138f281b
BLAKE2b-256 84c43b704c8839398d9ccbed3e8cd9bdd6809a64125a763e9c75cb46af9f9527

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: brisket-0.1.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brisket-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7e15f79c390441dbde5e539d0041652f44870feb3addb3ec71b511890258d859
MD5 05c335182b0041fea8260db3c9cc74dc
BLAKE2b-256 5566de10335c4039851ac891a0df8b9c2ea2bbc66254430bf6b15e7ccb21c8b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d707c0e265c108699dc10f0242c231874c2859cf0cf13d064d96ac1099f56a99
MD5 293558a566fa15a964dd32fcdc31cdc3
BLAKE2b-256 8a0b1a04377d112dc7dd5b1026ffb4990a95467eef5e8a5fbebfb154061765e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16a95ca0164b09c3e1892604ff3341eec1b0f7e67fbf9b4e13ffa75e06f50687
MD5 c567bf14eda0ba3c205c0aefd6c05094
BLAKE2b-256 c5398e9797ec5249d411088dffa0fe75d317a64275cf9dda9940f3d9b5e90651

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: brisket-0.1.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brisket-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b4eeb347176f5d48b9f6994996fc36c0e8668de6fd889cb9540f8b44a1885e67
MD5 06ecc57ad3a2eac63f6fc26b8b52535b
BLAKE2b-256 39d9925e8ea4e56ed63e9f5b991b3540fe91d5268c60e4126da63f44a323883b

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8716cc70aa422f5e36617a984e73687676a2b4b75bf9062e0a06f87a23db6c31
MD5 f5b9406672fe642c4106082768baff7a
BLAKE2b-256 9ae8e8a226c198fcb5f3204cef5641bc01c86c4c437216f60b8a2439784787c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ecd6f4d814c3f03efccfc8007daa6ab5b90a086d1084388a52e98a1a8170e1e8
MD5 a8c83a5ef42baa9c37ed58d97e8298da
BLAKE2b-256 f460c55151dfda39941577521e52c2b328b521e99804a45819542489685ba898

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: brisket-0.1.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 30.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for brisket-0.1.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 d773f0ce3e53ad8280914bc2e42f987556340b1ba7eafbabaa8bf92bd8a750a0
MD5 559385c9252e316755d031a5549b79f4
BLAKE2b-256 fdac624b575d65ac01415ea67c3b1bc9f71600b629afaf64ef16f60bed880af6

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp39-cp39-win_amd64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8bcd1640c42a56250d01bea835a229471cf5cd30fcfa5ce9d71d1b6ced263257
MD5 2ad56730e05e105a4adf8a9219de247b
BLAKE2b-256 72a31bcff5c542c31f4ebf2450c34f9c9e401bd026c4db51ce8959170103a74c

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp39-cp39-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file brisket-0.1.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for brisket-0.1.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2d551eb36de6b8b111ae33b525fb624ca1b3ed798a37efaf0381c1ed5237e9c1
MD5 d7e197e24b15453d256fb38035045ffd
BLAKE2b-256 0034caee6d614ccaa9eb9a5e198a2b1cc7b1be21e94bcce9824759f986dce79e

See more details on using hashes here.

Provenance

The following attestation bundles were made for brisket-0.1.2-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: build_wheels.yaml on gladstone-institutes/brisket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page