Skip to content

Rc4.2.7#219

Merged
karlnyr merged 8 commits intomasterfrom
rc4.2.7
Nov 11, 2025
Merged

Rc4.2.7#219
karlnyr merged 8 commits intomasterfrom
rc4.2.7

Conversation

@karlnyr
Copy link
Contributor

@karlnyr karlnyr commented Nov 10, 2025

Description

This pull request updates the microSALT application with a minor version bump and several code and template improvements. The main changes focus on improving error handling, refactoring species name parsing for better reliability, updating template content for clarity, and cleaning up import statements.

Template and Documentation Improvements:

  • The analysis limitations section in typing_page.html was restructured for improved readability and now dynamically lists verified organisms using the verified_organisms variable.

Code Refactoring and Reliability:

  • Species name parsing logic in referencer.py was refactored to handle edge cases (e.g., species with extra names or suffixes) more robustly, improving organism matching and reference retrieval. [1] [2]
  • Error handling in multiple functions within referencer.py was updated to avoid referencing unused exception variables, simplifying the code and logging only relevant messages. [1] [2] [3]

Code Quality and Consistency:

  • Imports in referencer.py were reordered and cleaned up for clarity and consistency.
  • Minor syntax improvements, such as using not in instead of not ... in and updating string comparison logic for clarity. [1] [2]

Version Update:

  • The application version was incremented from 4.2.5 to 4.2.7 in __init__.py.

Primary function of PR

  • Hot-fix
  • Patch
  • Minor functionality improvement
  • New type of analysis
  • Backward-breaking functionality improvement
  • This change requires internal documents to be updated
  • This change requires another repository to be updated

Testing

  • bash /home/proj/production/servers/resources/hasta.scilifelab.se/install-microsalt-stage.sh BRANCHNAME
  • us
  • conda activate S_microSALT
  • microSALT analyse --input /path/to/fastq/ SAMPLEINFO_FILE

Test results

These are the results of the tests, and necessary conclusions, that prove the stability of the PR.

Sign-offs

  • Approved to run at Clinical-Genomics by @karlnyr or @Clinical-Genomics/micro

@karlnyr karlnyr requested a review from a team as a code owner November 10, 2025 08:26
@karlnyr
Copy link
Contributor Author

karlnyr commented Nov 10, 2025

Typing report properly renders the list, but it looks kinda oddly indented. See attached image:

image

Will try to correct the positioning in a new pr.

@karlnyr
Copy link
Contributor Author

karlnyr commented Nov 10, 2025

Testing updating the problematic external references:

[15:05] [use@server:~/] [env]  (rc4.2.7) $ microSALT utils resync update-organism --external --force-update 'klebsiella pneumoniae'
2025-11 15:06:10	INFO	pasteur reference for Klebsiella pneumoniae updated to 2025-11-06
2025-11 15:06:10	INFO	Profiles CSV downloaded to references/ST_profiles/klebsiella_pneumoniae
2025-11 15:06:11	INFO	Locus FASTA downloaded: gapA.tfa
2025-11 15:06:12	INFO	Locus FASTA downloaded: infB.tfa
2025-11 15:06:12	INFO	Locus FASTA downloaded: mdh.tfa
2025-11 15:06:13	INFO	Locus FASTA downloaded: pgi.tfa
2025-11 15:06:14	INFO	Locus FASTA downloaded: phoE.tfa
2025-11 15:06:14	INFO	Locus FASTA downloaded: rpoB.tfa
2025-11 15:06:15	INFO	Locus FASTA downloaded: tonB.tfa
2025-11 15:06:19	INFO	Re-indexed contents of references/ST_loci/klebsiella_pneumoniae
INFO - Execution finished!

The unordered list now also looks good!

image

@karlnyr karlnyr merged commit 001a316 into master Nov 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants