mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #12061 from bernt-matthias/topic/pysam-fix
[21.01] Fix pysam.view call
This commit is contained in:
@@ -184,12 +184,12 @@ def _bam_to_sam(local_name, temp_name):
|
||||
temp_local = tempfile.NamedTemporaryFile(suffix='.sam', prefix='local_bam_converted_to_sam_')
|
||||
with tempfile.NamedTemporaryFile(suffix='.sam', prefix='history_bam_converted_to_sam_', delete=False) as temp:
|
||||
try:
|
||||
pysam.view('-h', '-o%s' % temp_local.name, local_name)
|
||||
pysam.view('-h', '--no-PG', '-o', temp_local.name, local_name, catch_stdout=False)
|
||||
except Exception as e:
|
||||
msg = "Converting local (test-data) BAM to SAM failed: %s" % unicodify(e)
|
||||
raise Exception(msg)
|
||||
try:
|
||||
pysam.view('-h', '-o%s' % temp.name, temp_name)
|
||||
pysam.view('-h', '--no-PG', '-o', temp.name, temp_name, catch_stdout=False)
|
||||
except Exception as e:
|
||||
msg = "Converting history BAM to SAM failed: %s" % unicodify(e)
|
||||
raise Exception(msg)
|
||||
|
||||
@@ -11,7 +11,7 @@ cat '$input1' > '$out_file1'
|
||||
<tests>
|
||||
<test>
|
||||
<param name="input1" value="sam_with_header.sam" ftype="sam"/>
|
||||
<output name="out_file1" file="bam_from_sam.bam"/>
|
||||
<output name="out_file1" file="bam_from_sam.bam" ftype="bam"/>
|
||||
</test>
|
||||
</tests>
|
||||
<help>
|
||||
|
||||
Reference in New Issue
Block a user