Release v1.5.0
This release introduces several significant updates to the Loculus submission workflow and related configuration, focusing on stricter environment variable handling, improved duplicate submission detection, enhanced file upload logic, and more robust metadata handling. The changes also include dependency and workflow updates, and some cleanup of environment and requirements files. We also resolve a critical but +1 shift in positions of amino acid alignments.
Key changes include:
Critical Bug Fix: Amino Acid Alignment Shift
- turned out this was a double bug
- for one, positions were taken equal to offsets, but offset = position - 1
- This led to a shift in amino acids and nucleotides by +1
- was compensated by 0-indexing error of -bam in pysam
- corrected bam_to_fastq_handle_indels()
- done in (#350)
Loculus Submission Workflow Improvements
-
The
submitmethod inLoculusClientnow requires both a processed file and a nucleotide alignment file, uploading both via pre-signed URLs and mapping them with correct key names (siloReadsandnucleotideAlignment). It also adds aresubmit_duplicateflag to control duplicate submission behavior and checks for previously released samples using a newreleased_samplesfunction. [1] [2] [3] [4] [5] -
Added the
released_samplesandget_original_metadatautility functions to fetch and process released sample IDs from the Loculus API, handling revoked entries and supporting both JSON and NDJSON API responses.
Metadata and Field Handling
- The
create_metadata_filemethod now maps specific metadata fields from snake_case to camelCase and writes only the specified fields, ensuring consistent output. Theparse_metadatamethod is updated to return metadata in snake_case, aligning with internal conventions. [1] [2] [3]
Configuration and Dependency Updates
-
The
.env.examplefile is removed, and all code for loading.envfiles viapython-dotenvis deleted, reflecting a move to rely solely on system environment variables. Corresponding dependencies (python-dotenv) are removed frompyproject.tomlandconda-recipe/meta.yaml. [1] [2] [3] [4] -
The
get_organismfunction now enforces that theORGANISMenvironment variable must be set, exiting with an error if it is missing.
CI and Workflow Modernization
- GitHub Actions workflows are updated to use
actions/setup-python@v6instead of@v5for both documentation and testing jobs. [1] [2]
Minor Cleanups
- Imports and function calls in
main.pyare updated to reflect the refactored submission logic. [1] [2]
Full Changelog: v1.5.0...v1.5.0