Crates.io | variantkey |
lib.rs | variantkey |
version | 0.1.0 |
source | src |
created_at | 2020-08-30 04:42:52.682747 |
updated_at | 2020-08-30 04:42:52.682747 |
description | Pure rust implementation of variantkey |
homepage | https://github.com/informationsea/variantkey-rs |
repository | https://github.com/informationsea/variantkey-rs |
max_upload_size | |
id | 282552 |
size | 6,571,989 |
Pure rust implementation of variantkey
use variantkey::{encode_variant_key, decode_variant_key, Variant};
assert_eq!(
Ok(0x0807728e88e80000),
encode_variant_key(b"1", 976157, b"T", b"C"),
);
assert_eq!(
decode_variant_key(0x0806b567a0fee000),
Ok(Variant {
chrom: b"1".to_vec(),
position: 879311,
reference: Some(b"TTTC".to_vec()),
alternative: Some(b"T".to_vec()),
})
);