From 062a50c6005a5fa1da65b59b8545c7a47b014113 Mon Sep 17 00:00:00 2001 From: Jacob Pfeil Date: Sat, 25 Mar 2017 17:34:23 -0700 Subject: [PATCH] Fix check for coordinate sorted bam --- run_varscan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_varscan b/run_varscan index 6ea1143..e1a9954 100755 --- a/run_varscan +++ b/run_varscan @@ -131,7 +131,7 @@ fi # Check that the bam files are sorted issort(){ - didsort=$(samtools view -H $1 | grep ^@HD | cut -f3) + didsort=$(samtools view -H $1 | grep -o 'SO:coordinate') if [[ "$didsort" != 'SO:coordinate' ]]; then graceful_death "it looks like $1 is not sorted by coordinate, please run samtools sort" fi