No project description provided
Project description
data-encode-tool
useage
import data_encode_tool
num = "01234567890123"
data = data_encode_tool.encode_u40(num)
ret = data_encode_tool.decode_u40(data)
assert ret==num
gene = "ATCG"
data = data_encode_tool.encode_gene(gene)
ret = data_encode_tool.decode_gene(data)
assert ret==gene
gene text encode
基因文本包含4个元素 ATCG ,将4个基因编码到一个 bytes, 基因数据末尾不足4个元素的,添加一个bytes标记多余基因
number text encode
对数值文本进行编码, 包括 0,1,2,3,4,5,6,7,8,9,. 十一个文本,使用 u40 作为数值编码基础,u40 的范围是 0~1_099_511_627_775, 编码工具只使用前12位对数值进行编码,每次编码12位数值,超过12位的编码空间对小数点和不足12位的数值进行编码
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
data_encode_tool-0.0.1.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for data_encode_tool-0.0.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12909c5987efbd77a0e76a330b359c77f50b781382eca6c5091b83529b4ef3b5 |
|
MD5 | 0fe8847972fc8d5c576369d486100a9f |
|
BLAKE2b-256 | 381ebc8bc101e91ea0205fcdd2c50b30eea08b14172b73a87ff0ac338e92ca05 |