Skip to content

Instantly share code, notes, and snippets.

@steve-federowicz
Last active August 29, 2015 14:08
Show Gist options
  • Save steve-federowicz/f81d88f15c93d88fe628 to your computer and use it in GitHub Desktop.
Save steve-federowicz/f81d88f15c93d88fe628 to your computer and use it in GitHub Desktop.
Bash one-liner for getting total reads of all bam files in a folder with samtools
for i in *.bam; do echo -n -e $i'\t'; samtools flagstat $i | head -n1 | cut -c 1-8; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment