bioinform / somaticseq

An ensemble approach to accurately detect somatic mutations using SomaticSeq
http://bioinform.github.io/somaticseq/
BSD 2-Clause "Simplified" License
189 stars 53 forks source link

makeSomaticScripts.py single mode passing certain arguments #107

Closed dnousome closed 2 years ago

dnousome commented 2 years ago

Hi Li Tai,

Couple of issues using the makeSomaticScripts.py to generate scripts for tumor-only calling 1) Despite passing an arg to -name in the script, the resulting mutect2.cmd generates an empty tumor-sample name

--tumor-sample ${tumor_name}

2) I wanted to add additional --mutect2-arguments including passing a panel of normals VCF file. However, I think this argument might not be able to link the correct directory since the bind path doesn't get added to the argument. It works if it's copied to $HOME; I'm not sure if this is an easy fix with binding paths within docker/singularity.

Thanks for a great pipeline!

litaifang commented 2 years ago

1) In the mutect2.cmd script, the ${tumor_name} refers to the variable earlier in the script, that grabs what's after SM: in the header that starts with @RG. MuTect2 plus all the GATK tools will then use reads from that read group (RG) for that sample. So for GATK tools, you can have one single BAM files with multiple read groups and multiple samples in them to do paired calling, or multiple BAM files with the same sample name to be considered as one sample.... even though no one saves their bam files that way. So the -name argument doesn't do anything for MuTect2.

2) As for now, this is a bit tricky. But you should be able to add extra docker argument such as --extra-docker-options '-v /home/user/path:/home/usr/path' (you'll need the single quote for everything after --extra-docker-options). I haven't tested that with additional file paths so let me know if that works. I can also write that PON argument specifically into MuTect2 script generator.

dnousome commented 2 years ago

Thanks for the quick response.

  1. I figured as much, was just hoping that there weren't going to be any downstream issues esp if we use other callers.

  2. Adding the extra docker arguments works for both singularity and docker. I can bind the paths and mutect2 can access them.

Closing the issue now and thank you again for your help!