effidotpy / mito-variant-calling

GNU General Public License v3.0
0 stars 0 forks source link

Read Group is required for Mutect2 variant calling #8

Closed effidotpy closed 8 months ago

effidotpy commented 8 months ago

When running Mutect2 with my development BAMs, where I removed the @RG information, I get following error:

java.lang.IllegalArgumentException: samples cannot be empty

According to this biostars post HaplotypeCaller (so I assume Mutect2 as well) needs Read Group in the BAM file.

effidotpy commented 8 months ago

I solve this by adding the read group in the first process/step ADD_READGROUP with:

samtools addreplacerg -r '@RG\tID:${meta.sample_id}_${meta.source}\tSM:${meta.sample_id}_${meta.source}' ${bam_file} -o readgroup.bam