Data processing for Dogma
Project description
Dogma Data
Dogma Data is a Python package built for fast and efficient parsing of FASTA files, optimized for high-performance computing. It leverages multi-threading to fully utilize all available system threads, enabling parallel processing. Additionally, the package supports exporting parsed data to the HDF5 file format for easy storage and access.
Installation
To install Dogma Data, you can use pip:
pip install dogma-data
Usage
import dogma_data
vocab = {
'a': 0,
'g': 1,
'c': 2,
't': 3,
...
}
mapping = dogma_data.FastaMapping(vocab, vocab['a'])
(tokens, sequences, (taxons)) = dogma_data.parse_fasta('input_path.fa', mapping, dogma_data.HeaderType.TaxonId)
header_info = {"taxons": taxons}
dogma_data.export_hdf5(
'output_path.h5',
dogma_data.Splitter(
train_prop=0.95,
val_prop=0.025,
test_prop=0.025,
length=len(sequences) - 1,
),
tokens,
sequences,
header_info,
)
Requirements
- Python 3.10
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any questions, feel free to reach out:
- Marcel Rød - roed@stanford.edu
- Miha Krajnc - miha.krajnc@cs.stanford.edu
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for dogma_data-0.2.18-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b33ebc57e7ebba422af0e341e379e1845dcdcd5d7507cffd74369efa76ad509 |
|
MD5 | b94900357dc6d3d911de2b1ae18f5308 |
|
BLAKE2b-256 | 58bcfaffaffb889fa5be3831adfec8e0afb6fe23c9175404318a6245c29aa3df |
Close
Hashes for dogma_data-0.2.18-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf482cb9476ddd7ec6f462515219eec85a596fe99d06f3ccc4d5e503ac7d390 |
|
MD5 | d2d411db74a5ddb5c02d41054a3106f8 |
|
BLAKE2b-256 | d00f1bb9df146c1b1a582422c9fbf9fad82c678f68fbc0eebafc8d3eae89272b |
Close
Hashes for dogma_data-0.2.18-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6c0ed39925f963a6216df4e7a75f1819115c4d5b0c72ae32555321e9d63aeab |
|
MD5 | ed8af68a59b69762140fab1e4b14cc91 |
|
BLAKE2b-256 | 63fdf461565a69698443ca760f32fa1ec0981876da24dea06290437095e783b5 |