nilesh-iiita / pysam

Automatically exported from code.google.com/p/pysam
0 stars 0 forks source link

No error is raised when file system quota is reached. #111

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.  Writing to an output BAM file on a file system that is full, while 
iterating through an input BAM file until end of file.

What is the expected output? What do you see instead?

I expect the script to stop running and raise an error once the size, of the 
output BAM file, has reached the filesystem quota.  Samfile.write() should 
return 0 (bytes).  However, Samfile.write() keeps writing to the output file 
(despite the filesystem being full) and returns integers greater than 0 
(ranging 256 to 320).  The script runs to completion when it should stop 
running.  

What version of the product are you using? On what operating system?

I'm using version 0.6 of pysam on CentOS 5.

Please provide any additional information below.

When I try to index the output BAM file with samtools (after the script has 
stopped running), the following output is generated:

[bam_header_read] EOF marker is absent. The input is probably truncated.

After I receive that message, samtools just hangs there in the terminal.  The 
command I used to index the output file is:

samtools index testout.rg.bam

Original issue reported on code.google.com by alex.mar...@gmail.com on 9 Jan 2013 at 4:52

GoogleCodeExporter commented 9 years ago
Thanks.

pysam uses the samtools samwrite API function and returns its status.

This issue might best be raised with the samtools developers.

Best wishes,
Andreas

Original comment by andreas....@gmail.com on 26 Jun 2013 at 8:09