Repository navigation
Conversation
…s input DEEPVARIANT_MAKEEXAMPLES writes the local read phasing files as <prefix>-read-phasing_debug-0000i-of-0000N.tsv. The module added a .gz suffix to the sharded path that it gives to --phased_reads_input_path. The DeepVariant merger then opened files that do not exist and did not report an error. It loaded 0 reads and wrote an empty switches file. StitchPhaseSets then used MATCH for every phase set join. Use the .tsv suffix, as run_deepvariant does.
Write the phased reads switches and corrected reads files to the work directory and emit them as optional outputs. Before this change, postprocess_variants wrote them to the default paths in /tmp. Add an ONT test with phasing. The test asserts that the switches file is not empty. Without the .tsv suffix fix, this assertion fails.
awgymer
marked this pull request as ready for review
October 30, 2026 03:47
pinin4fjords
approved these changes
Oct 30, 2026
pinin4fjords
left a comment
Member
There was a problem hiding this comment.
Looks good to me. Optional, fine as follow-ups:
- Could the
deepvariantsubworkflow emitphased_reads_switches/phased_reads_corrected? Otherwise pipelines using it won't get them. - An ONT + phasing case in the subworkflow's
equality.nf.testwould be a nice end-to-end check againstrundeepvariant. It may not match exactly, though, since postprocess doesn't get--checkpoint_jsonlikerun_deepvariantpasses (already the case before this PR).
Member
|
One more: module tests should use a single params {
makeexamples_args = '--checkpoint "/opt/models/wgs" --call_small_model_examples ...'
callvariants_args = '--checkpoint "/opt/models/wgs"'
}
process {
withName: "DEEPVARIANT_MAKEEXAMPLES" { ext.args = params.makeexamples_args }
withName: "DEEPVARIANT_CALLVARIANTS" { ext.args = params.callvariants_args }
}Then |
Remove ont_phasing.config. The test nextflow.config now sets ext.args from params, and the ONT phasing test sets the ONT values in its params block. The nf-core testing specification requires one config file.
Emit phased_reads_switches and phased_reads_corrected from DEEPVARIANT_POSTPROCESSVARIANTS. Pipelines that use the subworkflow can then get these files. The files are only created when with_phasing is true.
The existing phasing equality test uses Illumina data, so no reads are phased. The new test uses ONT data with the ONT_R104 model. It compares the subworkflow output with run_deepvariant, and asserts that the switches file is not empty.
Contributor
Author
|
Robot goes brrrrrr: Single test config
Subworkflow outputs
ONT phasing equality test
The existing equality test with the name "phasing" uses Illumina data with the PacBio model. No reads are phased by that. |
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.
PR checklist
nf-core modules test deepvariant/postprocessvariants --profile dockernf-core modules test deepvariant/postprocessvariants --profile singularityThis PR fixes the path that
DEEPVARIANT_POSTPROCESSVARIANTSgives to--phased_reads_input_path. Before this fix, DeepVariant did not use the read phasing output fromDEEPVARIANT_MAKEEXAMPLES.DEEPVARIANT_MAKEEXAMPLESwrites the read phasing files as<prefix>-read-phasing_debug-0000i-of-0000N.tsv.DEEPVARIANT_POSTPROCESSVARIANTSremoved the.tsvextension and added.gz, so it gave<prefix>-read-phasing_debug@0000N.gzto DeepVariant.This doesn't actually cause DeepVariant to fail, but it results in an empty switches file and the phasing information not actually being used.
run_deepvariantgivesread-phasing_debug@N.tsvtomake_examplesand topostprocess_variants. This PR uses the same.tsvsuffix.Changes
.tsvsuffix in the logical name for--phased_reads_input_path.phased_reads_switchesandphased_reads_corrected. These files are only created whenphase_inputsis given. Before this PR, DeepVariant wrote these files to its default paths in/tmp.homo_sapiens - ont - phasing. It usesnanopore/bam/test.sorted.bamwith theont_r104model andwith_phasing = true. The test makes sure that the switches file is not empty. The PacBio data did not work for this test.sanitizeOutputin the snapshots for this module.Added after review: