Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional documentation for specifying ext.args for Mutect2 to avoid join mismatch error #1455

Open
pulintz-um opened this issue Apr 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pulintz-um
Copy link

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

@pulintz-um pulintz-um added the enhancement New feature or request label Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant