Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor internal data structure #338

Merged
merged 8 commits into from
Oct 15, 2024
Merged

Refactor internal data structure #338

merged 8 commits into from
Oct 15, 2024

Conversation

oschwengers
Copy link
Owner

@oschwengers oschwengers commented Oct 15, 2024

Since its first draft, Bakta has come a very long way and has undergone many feature extensions, code additions and minor amendments. In order to keep the code base as lean & clean as possible, we restructured the internal main data structure and renamed and streamlined many variable names.

The main change (without breaking any external APIs) addresses the main data object which has been restructured and renamed from genome to data:

genome = {
        'genus': ...
        'species': ...,
        'strain': ...,
        'taxon': ...,
        'gram': ...,
        'translation_table': ...,
        'size': ...,
        'complete': ...,
        'features': {},
        'contigs': contigs
    }

Now:

data = {
        'genome': {
            'genus': ...,
            'species': ...,
            'strain': ...,
            'taxon': ...,
            'complete': ...,
            'gram': ...,
            'translation_table': ...
        },
        'stats': {
            'size': ...,
        },
        'features': [],
        'sequences': sequences
    }

This internal structure is now aligned with the document structure of the JSON result file. Also, former contigs are now denoted with the more general concept of sequences.

@oschwengers oschwengers added the enhancement New feature or request label Oct 15, 2024
@oschwengers oschwengers added this to the v1.10.0 milestone Oct 15, 2024
@oschwengers oschwengers self-assigned this Oct 15, 2024
@oschwengers oschwengers merged commit 0ebd7cc into main Oct 15, 2024
30 checks passed
@oschwengers oschwengers deleted the refactor-data-structure branch October 15, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant