Fix Clair3 model download staging when explicit override bypasses aut… - #191
Open
YannVRB wants to merge 1 commit into
Open
Fix Clair3 model download staging when explicit override bypasses aut…#191YannVRB wants to merge 1 commit into
YannVRB wants to merge 1 commit into
Conversation
…o-detection PREPARE_REFERENCE_FILES computed the WGET/UNTAR staging directory name (meta_new.id) independently from the actual download URL (model): the URL correctly fell back to the samplesheet's explicit clair3_model override when basecall_model_meta didn't match clair3_modelMap, but the staging id did not -- it was only ever clair3_modelMap.get(basecall_model_meta), which resolves to null on any unmapped model. UNTAR then failed with "mkdir: missing operand" because its output directory name came out empty, even though the model itself downloaded successfully under the correct override. This isn't specific to any one basecall model -- it triggers for any sample whose auto-detected basecall_model_meta isn't in clair3_modelMap (currently only dna_r10.4.1_e8.2_*_sup@v4.x/v5.x and hifi_revio are mapped), whether that's because the model genuinely isn't supported yet, or because BAM header metadata is missing/malformed. Hit this validating the SAVANA PR against both public and internal real-world ONT data. Fix: derive meta_new.id from the same resolved `model` value used for the download URL, so an explicit clair3_model override always works regardless of whether the auto-detected model has a modelMap entry. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DhE7yZ2qRjaG86P7JgZbA4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…o-detection
PREPARE_REFERENCE_FILES computed the WGET/UNTAR staging directory name (meta_new.id) independently from the actual download URL (model): the URL correctly fell back to the samplesheet's explicit clair3_model override when basecall_model_meta didn't match clair3_modelMap, but the staging id did not -- it was only ever clair3_modelMap.get(basecall_model_meta), which resolves to null on any unmapped model. UNTAR then failed with "mkdir: missing operand" because its output directory name came out empty, even though the model itself downloaded successfully under the correct override.
This isn't specific to any one basecall model -- it triggers for any sample whose auto-detected basecall_model_meta isn't in clair3_modelMap (currently only dna_r10.4.1_e8.2_*_sup@v4.x/v5.x and hifi_revio are mapped), whether that's because the model genuinely isn't supported yet, or because BAM header metadata is missing/malformed. H
Fix: derive meta_new.id from the same resolved
modelvalue used for the download URL, so an explicit clair3_model override always works regardless of whether the auto-detected model has a modelMap entry.Claude-Session: https://claude.ai/code/session_01DhE7yZ2qRjaG86P7JgZbA4
PR checklist
nf-core pipelines lint).nextflow run . -profile test,docker --outdir <OUTDIR>).nextflow run . -profile debug,test,docker --outdir <OUTDIR>).docs/usage.mdis updated.docs/output.mdis updated.CHANGELOG.mdis updated.README.mdis updated (including new tool citations and authors/contributors).