This is a test version of Biostars. For the public version, visit https://www.biostars.org.
mosdepth exclude soft clipped bases to calculate coverage?

Does the mosdepth exclude the soft clipped bases present in the aligned reads to calculate the coverage?

Default it exclude the mark duplicate and secondary alignment reads (-F 1796) and avoid double counting overlapping read pairs.

mosdepth --no-per-base --by 1000 --mapq 20 --threads 4 ${biosample_id} ${bam}
samtools depth wgs mosdepth

1 answer

Does the mosdepth exclude the soft clipped bases

yes it uses the SAM start position (!= unclipped start) sequtils.to_seq(gen_start_ends(rec.cigar, rec.start.int))

https://github.com/brentp/mosdepth/blob/master/mosdepth.nim#L299

Thank you so much

Log in to answer this question.