MaciekAber / pysam

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

pysam.sort aborts if the size of the BAM file requires temporary files #43

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
STEPS TO REPRODUCE THE PROBLEM:
Run pysam.sort() on a BAM file which is large enough to require samtools to 
write temporary files in order to do the sorting.
When it comes time for sort to merge those files, it outputs a message to 
stderr, which is read and thrown as a SamtoolsError by SamtoolsDispatcher, 
prematurely ending the sort run.

VERSION/OS: pysam-0.3 on RHEL 5.0

I've attached a patch which seems to solve the problem.

Original issue reported on code.google.com by kebettin...@gmail.com on 1 Oct 2010 at 6:27

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for reporting this and providing the patch.

I have applied it and checked it in to the 0.3 branch.

BW, Andreas

Original comment by andreas....@gmail.com on 7 Oct 2010 at 3:44

GoogleCodeExporter commented 8 years ago
I see that this fix made it into the 0.3.1 release, but it still has a logic 
error which my patch fixed.  The "if not" condition is missing the necessary 
parentheses: without them, the 'not' only applies to the first condition in the 
'or' list.

I've attached a patch for 0.3.1 that corrects that.

Keith

Original comment by kebettin...@gmail.com on 16 Nov 2010 at 7:53

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks and sorry.

Applied to rel-0.3.1 and dev-0.4.
Bw,
Andreas

Original comment by andreas....@gmail.com on 28 Jan 2011 at 10:16