Hi guys,
I have mapped metagenomic sequencing reads to a collection of assembled sequences that represent several MAGs (previously binned from the metagenome sample) obtaining my bam file, and my idea is to get the average coverage values within 5 Kbp sliding windows sampled every 100 bp in each MAG draft genome.
I found the function samtools depth that gives you depth of coverage per base pair, but anyone can tell me how to obtain the average coverage of the desire region that i want.
Thanks in advance.