deepvariant_germline has the option “–keep-duplicates”, which to me implies that duplicate reads are not kept by default. This is confusing to me because it doesn’t match the behavior of the compatibility commands and this option is not there for just fq2bam alone. Would anyone be able to clear up my confusion?
Sorry for the confusion here. Actually “–keep-duplicates“ is a flag for deepvariant instead of fq2bam. Since deepvariant_germline calls fq2bam and deepvariant back-to-back, it includes arguments for both tools. By default deepvariant ignores all duplicate reads for variant calling, but you can pass “–keep-duplicates“ to force it to include duplicate reads for variant calling.
And no matter you pass this flag or not, all duplicate reads will be preserved in the output bam file.