Created
September 18, 2015 11:40
-
-
Save mvdbeek/91d6acb442e94a98519b to your computer and use it in GitHub Desktop.
fix planemo shed_test when comparing bam files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/base/twilltestcase.py b/test/base/twilltestcase.py | |
index bced847..e2009f5 100644 | |
--- a/test/base/twilltestcase.py | |
+++ b/test/base/twilltestcase.py | |
@@ -2487,9 +2487,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 ) | |
- command = 'samtools view -h -o "%s" "%s"' % ( temp_local.name, local_name ) | |
+ command = 'samtools sort -o "%s" - |samtools view -h -o "%s" -' % ( local_name, temp_local.name ) | |
self._check_command( command, 'Converting local (test-data) bam to sam' ) | |
- command = 'samtools view -h -o "%s" "%s"' % ( temp_temp, temp_name ) | |
+ command = 'samtools sort -o "%s" - |samtools view -h -o "%s" -' % ( temp_name, temp_temp ) | |
self._check_command( command, 'Converting history bam to sam ' ) | |
os.remove( temp_name ) | |
return temp_local, temp_temp | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment