Skip to content

Instantly share code, notes, and snippets.

@idolawoye
Created October 2, 2020 08:30
Show Gist options
  • Select an option

  • Save idolawoye/59c38ba0d6844e253c614e0b94ff3538 to your computer and use it in GitHub Desktop.

Select an option

Save idolawoye/59c38ba0d6844e253c614e0b94ff3538 to your computer and use it in GitHub Desktop.
Calculate average genome coverage on aligned BAM files
samtools depth CIV3724802_ref_bwa_sorted.bam | awk '{sum+=$3} END { print "Average = ",sum/NR}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment