This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Coverage mean and standard deviation of autosomes | |
Estimate the mean and standard deviation from a mosdepth coverage BED for | |
positions with coverage in the range (0, 2 * non-zero mode). This estimate | |
behaves well for PacBio HiFi WGS of human germline aligned to either hs37d5 and | |
GRCh38, and may be useful for other situations as well. | |
$ bash mosdepth --threads 3 --no-per-base --by 500 -m "${BAM%.*}.median" "${BAM}" | |
$ tabix ${BAM%.*}.median.regions.bed.gz {1..22} | python depth_mean_stddev.py |