From d6deb67bf28195dfad790ccccbcb1c8db61fb4e2 Mon Sep 17 00:00:00 2001 From: Kelly Vincent Date: Fri, 22 Apr 2011 14:58:44 -0400 Subject: [PATCH] Added -h flag to samtools view command in functional test's bam to sam conversion so that it keeps the header --- test/base/twilltestcase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/base/twilltestcase.py b/test/base/twilltestcase.py index 89217949f1d..e01d0638e2f 100644 --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -680,9 +680,9 @@ class TwillTestCase( unittest.TestCase ): temp_local = tempfile.NamedTemporaryFile( suffix='.sam', prefix='local_bam_converted_to_sam_' ) fd, temp_temp = tempfile.mkstemp( suffix='.sam', prefix='history_bam_converted_to_sam_' ) os.close( fd ) - p = subprocess.Popen( args="samtools view %s -o %s" % ( local_name, temp_local.name ), shell=True ) + p = subprocess.Popen( args="samtools view -h %s -o %s" % ( local_name, temp_local.name ), shell=True ) assert not p.wait(), 'Converting local (test-data) bam to sam failed' - p = subprocess.Popen( args="samtools view %s -o %s" % ( temp_name, temp_temp ), shell=True ) + p = subprocess.Popen( args="samtools view -h %s -o %s" % ( temp_name, temp_temp ), shell=True ) assert not p.wait(), 'Converting history bam to sam failed' os.remove( temp_name ) return temp_local, temp_temp