How bojarlab/glycowork works
Main Components
a. Package Modules (Code)
• core: Fundamental utilities and shared functions
• glycan_data: Data loaders and helpers for CSV/JSON/Pickle datasets
• ml: Model training, inference, and helper pipelines
• motif: Motif detection, annotation, graph algorithms, drawing
• network: Biosynthetic/network analysis functions
b. Static Resources
• CSV/JSON/PKL files under glycowork/glycan_data, glycowork/motif, glycowork/network
• Pretrained deep‐learning models (downloaded via prep_model)
c. User Interfaces
• Python API (import glycowork in scripts or notebooks)
• CLI/GUI: glycoworkGUI.py executable
d. Development & Deployment
• Notebooks (00_core.ipynb … 05_examples.ipynb)
• Tests (tests/)
• CI/CD: GitHub Actions, Docker (docker-compose.yml)
Relationships & Data Flows
• User → selects interface
• CLI/GUI → invokes core/modules
• Notebook/Python → import glycowork → calls modules
• core orchestrates calls into other modules.
• glycan_data loads static files → returns DataFrames/objects to
• motif, ml, network
• motif and network transform sequences into graphs or features.
• ml consumes features (from motif or direct from glycan_data) → trains/models → optionally writes outputs or returns predictions.
• prep_model (in ml) retrieves pretrained models from remote storage.
• Tests validate each module independently.
Architectural Patterns & Principles
• Modular Separation of Concerns: each subpackage focuses on one domain
• Resource Abstraction: data files treated as internal “database”
• Extensibility Points:
• Optional extras (glycowork[ml], [chem])
• Clear module APIs for adding new motif/dataset types
• Plugin-style CLI/GUI: wraps core APIs