Hi all, When running the following command for a m...
# sarek
s
Hi all, When running the following command for a mouse tumor-only sample using nf-core/sarek: nextflow run nf-core/sarek -r 3.5.1 \ -profile singularity \ --input SAMPLE_SHEET \ --outdir somatic \ --step mapping \ --save_mapped \ --genome GRCm38 \ --tools mutect2,cnvkit,vep \ --vep_cache ./vep_cache \ --vep_species mus_musculus -resume I downloaded the file https://ftp.ensembl.org/pub/release-102/variation/indexed_vep_cache/mus_musculus_vep_102_GRCm38.tar.gz and extracted it into the
./vep_cache
directory. After running the pipeline, the
somatic
outdir contains subfolders such as
csv
,
multiqc
, and
variant_calling
, but no
annotation
subfolder. The pipeline completed successfully without any errors. However, when using the parameter "--tools haplotypecaller,vep", the output directory does include an
annotation
subfolder. How to solve the issue? Thanks!
t
I am pretty sure this is because of a bug that has been around for a while and is specific to mouse and other organisms that lack a
germline_resource
file. (If you want, you can confirm that by adding
stelka
and/or
freebayes
to your tools. The bug affects
mutect2
, and your only other
tool
is
cnvkit
, the output of which cannot be meaningfully annotated with VEP.) Basically what happens is that the built-in filtering for Mutect2 uses
germline_variant
and sarek does not accommodate the case where that is not available (even though you could run the actual filtering command from GATK without it, at the cost of not filtering everything that you would get with the resource). This results in the Mutect2 VCF files lacking a populated
FILTER
column, and only the
*.mutect2.vcf.gz
files are generated, while the
*.mutect2.filtered.vcf.gz
files are missing in the output. Those latter files, however, are the input for the
annotation
--step
, i.e. for VEP, so without them it will not run. This is how I have worked around the problem so far (if I find time, I plan to actually fix it): • Run the pipeline to get the (unfiltered) Mutect2 files. (You have already done that.) • Filter the Mutect2 files "manually" (see below) to generate the input files for the annotation. • Rerun the pipeline starting from
--step annotate
with
--tools vep
and an
--input
CSV that points to the filtered VCFs you just created. Run something like this inside the GATK container from the pipeline to do the filtering (for each file):
Copy code
fasta=/path/to/iGenomes/Mus_musculus/Ensembl/GRCm38/Sequence/WholeGenomeFasta/genome.fa
vcf=/path/to/somesample.mutect2.vcf.gz # from 1st sarek run
filtvcf="${vcf%vcf.gz}filtered.vcf.gz"

gatk --java-options "-Xmx9830M -XX:-UsePerfData" \
    FilterMutectCalls \
    --variant "$vcf" \
    --output "$filtvcf" \
    --reference "$fasta" \
    --orientation-bias-artifact-priors "${vcf%vcf.gz}artifactprior.tar.gz" \
    --tmp-dir .
Hope this makes sense, let me know if you have questions.
s
@Thomas Danhorn Thank you very much for your guidance. After creating a new samplesheet with a “vcf” column instead of the previous “fastq_1” and “fastq_2” columns, and running the Sarek pipeline with
--step annotate
, the output now adds the
annotation
subfolder. I truly appreciate your time and support!
👍 1