Added -h flag to samtools view command in functional test's bam to sam conversion so that it keeps the header

This commit is contained in:
Kelly Vincent
2011-04-22 14:58:44 -04:00
parent bc29722f05
commit d6deb67bf2
+2 -2
View File
@@ -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