You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/usr/bin/env python
import sys
import pysam
with pysam.Samfile(sys.argv[1]) as input_handle:
with pysam.Samfile(sys.argv[2], "wbu", template=input_handle) as output_handle:
for record in input_handle:
output_handle.write(record)
and Pysam v0.7.8, both SAMTools 0.1.19 and 1.x is able to read the files. However, when using Pysam 0.8.0, only SAMTools v1.x is able to read the file, while SAMTools v0.1.19 produces the follow output:
$ python example.py input.bam output.bam
$ samtools0.1.19 view output.bam
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[main_samview] fail to read the header from "out.bam".
This is in contrast with uncompressed output from SAMTools v1.x, which is readable by SAMTools v0.1.19.
When using the following script:
and Pysam v0.7.8, both SAMTools 0.1.19 and 1.x is able to read the files. However, when using Pysam 0.8.0, only SAMTools v1.x is able to read the file, while SAMTools v0.1.19 produces the follow output:
This is in contrast with uncompressed output from SAMTools v1.x, which is readable by SAMTools v0.1.19.
Similarly, the uncompressed output from Pysam 0.8.0 is not readable by Pysam 0.7.x either.
The text was updated successfully, but these errors were encountered: