Description
openedon Apr 3, 2024
Description of feature
I was getting a join mismatch exception when running Mutect2 workflows and specifying additional parameters. The specific error I was seeing was as follows:
nextflow.exception.AbortOperationException: Join mismatch for the following entries: key=[id:JTI018-T-01_vs_JTI018-B-01, normal_id:JTI018-B-01, patient:JTI018, sex:NA, tumor_id:JTI018-T-01] values=
There didn’t appear to be much information in the logs that suggested an upstream error. I’m attempting to use two additional params to mutect2 (to set up a purecn analysis): --genotype-germline-sites true
and --genotype-pon-sites true
. The error seemed to have something to do with them, since the workflow completed without error when they were not utilized.
Based on a suggestion in the Slack channel, it was pointed out that additional parameters need to be added to tell Mutect2 to generate the f1r2 file:
{ params.ignore_soft_clipped_bases ?
"--dont-use-soft-clipped-bases true --f1r2-tar-gz ${task.ext.prefix}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}" :
"--f1r2-tar-gz ${task.ext.prefix}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}" }
}
This fixed the error, but it was suggested that perhaps additional documentation should be put in place to articulate the case since it seems to have tripped up multiple users. Upon request, I’m opening this issue as a reminder for the team to look into documenting this.
In my case, the final process block I provided that permitted the pipeline to run without error was as follows:
process {
withName: 'NFCORE_SAREK:SAREK:BAM_VARIANT_CALLING_SOMATIC_ALL:BAM_VARIANT_CALLING_SOMATIC_MUTECT2:MUTECT2_PAIRED' {
ext.args = {[
"--genotype-germline-sites true --genotype-pon-sites true",
(params.ignore_soft_clipped_bases) ? "--dont-use-soft-clipped-bases true --f1r2-tar-gz ${task.ext.prefix}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}" :
"--f1r2-tar-gz ${task.ext.prefix}.f1r2.tar.gz --normal-sample ${meta.patient}_${meta.normal_id}",
].join(' ').trim()}
}
}
The log file showing the original exception is attached:
nextflow.log