Hi,
I'm trying to analyze WGS data and I'm currently running Mutect2, however, I've been receiving the following error message stating "Cannot construct fragment from more than two reads
" and I'm not sure where things have gone wrong.
So far here's what I did:
I converted the FASTQ files to unaligned BAM format using FastqToSam, then sorted the BAM files by query using SortSam. I then used MarkIlluminaAdapters to read and re-write the BAM files with the new adapter-trimming tags. I also aligned the FASTQ reads to the genome using bwa-mem2. I then merged the 2 sets of files using the MergeBamAlignment tool to merge the read metadata, then marked the PCR and optical duplicates using GATK's MarkDuplicates with the flag REMOVE_DUPLICATES=TRUE (so I've removed the duplicates). I then used BaseRecalibrator to generate a recalibration table followed by ApplyBQSR. The error below is what I get when I run Mutect2
gatk Mutect2 -R Danio_rerio.GRCz11.dna.primary_assembly.fasta -I input_asoqueryname_bqsr_paired_reads.bam -O output_mutect2.vcf.gz
[29 June 2023 11:20:35 BST] org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2 done. Elapsed time: 1.00 minutes.
Runtime.totalMemory()=1884291072
java.lang.IllegalArgumentException: Cannot construct fragment from more than two reads
at org.broadinstitute.hellbender.utils.Utils.validateArg(Utils.java:725)
at org.broadinstitute.hellbender.utils.read.Fragment.create(Fragment.java:36)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.broadinstitute.hellbender.utils.genotyper.AlleleLikelihoods.groupEvidence(AlleleLikelihoods.java:595)
at org.broadinstitute.hellbender.tools.walkers.mutect.SomaticGenotypingEngine.callMutations(SomaticGenotypingEngine.java:93)
at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2Engine.callRegion(Mutect2Engine.java:251)
at org.broadinstitute.hellbender.tools.walkers.mutect.Mutect2.apply(Mutect2.java:320)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.processReadShard(AssemblyRegionWalker.java:308)
at org.broadinstitute.hellbender.engine.AssemblyRegionWalker.traverse(AssemblyRegionWalker.java:281)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:1048)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:139)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:163)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:206)
at org.broadinstitute.hellbender.Main.main(Main.java:292)