This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Sequencing Depth (Read Depth) Calculations

Hi Community,

I have to calculate the read depth of HG002 UCSC Nanopore Sequencing data for my benchmarking.

I downloaded 3 fastq files provided in GIAB and mapped them with minimap2.

minimap2 -ax map-ont --secondary=no --MD

ChatGPT gives me following cmd to calculate:

sequencing_depth=$(samtools depth -a "$sorted_bam_file" | awk '{sum += $3} END {print sum/NR}')

echo "Sequencing Depth: $sequencing_depth"

This cmd works and gives me 40.5235, I was wondering whether this cmd is right or wrong, and does anyone have a sense on the correctness of this 40x depth?

Thanks a lot

depth

Thank u very much!

1 answer

You could also use pandepth (LINK) or mosdepth (LINK) as well. These will allow you to be flexible about windowed coverage etc.

Understood! Gonna try those two!

Log in to answer this question.