Skip to content

Instantly share code, notes, and snippets.

@hbeale
Created December 12, 2016 00:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hbeale/16429cd113b45c1d85574c349768ac44 to your computer and use it in GitHub Desktop.
Save hbeale/16429cd113b45c1d85574c349768ac44 to your computer and use it in GitHub Desktop.
check bam for EOF error
for i in *.bam ; do echo -n $i; samtools view -h $i | head -1 ; done 2>&1 | grep '\['
# for malformed bams, the output is "EGAD00001001620_ICGC_MB110.sorted.bam[bam_header_read] EOF marker is
absent. The input is probably truncated."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment