bcbio / bcbio-nextgen

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis
https://bcbio-nextgen.readthedocs.io
MIT License
985 stars 353 forks source link

running variant calling with custom parameters #3123

Closed ajitjohnson closed 4 years ago

ajitjohnson commented 4 years ago

Dear Team,

Is it possible to pass custom parameter values for the mutect2 variant caller? I would like to pass custom values for the following parameters.

--normal-lod and --minimum-allele-fraction

Also if I use mutect2, does it follow the other best practices that GATK recommends? If you have any documentation in that aspect, can you please point me towards that? Thank you very much.

naumenko-sa commented 4 years ago

Hello Ajit @ajitjohnson!

It is possible to set min VAF in

- algorithm:
    min_allele_fraction: 1

https://bcbio-nextgen.readthedocs.io/en/latest/contents/configuration.html#somatic-variant-calling It is a post-calling filter: https://github.com/bcbio/bcbio-nextgen/blob/master/bcbio/variation/mutect2.py#L189

It was decided to have a common VAF limiting parameter for different callers: https://github.com/bcbio/bcbio-nextgen/issues/314

And, you may set individual parameters in the resource section of the yaml:

resources:
  mutect2_filter:
  - --minimum-allele-fraction
  - 0.01

it will go into FilterMutectCalls, a separate mutect2 step https://github.com/bcbio/bcbio-nextgen/blob/a65f4b102ea42c83aa6cc7e2771285bc2fc73339/bcbio/variation/mutect2.py#L173

Are you sure --normal-lod is this there? https://gatk.broadinstitute.org/hc/en-us/articles/360035531132--How-to-Call-somatic-mutations-using-GATK4-Mutect2 https://gatk.broadinstitute.org/hc/en-us/articles/360036822431-FilterMutectCalls#--min-allele-fraction

https://github.com/bcbio/bcbio-nextgen/blob/a65f4b102ea42c83aa6cc7e2771285bc2fc73339/bcbio/variation/mutect2.py#L79

The focus in bcbio was on supporting multiple callers (vardict, mutect2) in the somatic use case rather than exactly following GATK best practices, but given the extensive feedback from users I think it is optimised well. You may see how exactly we call mutect2 here: https://gatk.broadinstitute.org/hc/en-us/articles/360036822431-FilterMutectCalls#--min-allele-fraction or from cat bcbio-nextge-commands.log | grep mutect in the end of your run.

We plan to outline this workflow step-by-step in the ongoing documentation improving effort here: https://bcbio-nextgen.readthedocs.io/en/latest/contents/internals.html#somatic-tumor-only-variant-calling-pipeline-with-umis-step-by-step

If you have any feedback on how to use mutect2 in bcbio better, let us know.

Sergey

naumenko-sa commented 4 years ago

Feel free to re-open if there are still issues.