Commit 30ffb475 by Eric Coissac

Fix the bug related to FIFO writing on macosx

parent 30b6f5a2
...@@ -11,7 +11,7 @@ from shutil import rmtree ...@@ -11,7 +11,7 @@ from shutil import rmtree
from urllib.request import urlopen from urllib.request import urlopen
import atexit import atexit
import os #import os
import os.path import os.path
import sys import sys
import re import re
...@@ -20,8 +20,10 @@ from orgasm.utils.dna import reverseComplement # @UnresolvedImport ...@@ -20,8 +20,10 @@ from orgasm.utils.dna import reverseComplement # @UnresolvedImport
#from orgasm.files import uopen #from orgasm.files import uopen
import zlib import zlib
from collections import Counter, deque #from collections import Counter, deque
from sys import stderr from collections import Counter
#from sys import stderr
from orgasm.indexer import Index from orgasm.indexer import Index
...@@ -424,8 +426,8 @@ def writeToFifo(pairs,forward,reverse,logger): ...@@ -424,8 +426,8 @@ def writeToFifo(pairs,forward,reverse,logger):
logger.info("Forward tmp file : %s" % forward) logger.info("Forward tmp file : %s" % forward)
logger.info("Reverse tmp file : %s" % reverse) logger.info("Reverse tmp file : %s" % reverse)
i=0 i=0
with open(forward,'w') as f, \ with open(forward,'w',buffering=1) as f, \
open(reverse,'w') as r: open(reverse,'w',buffering=1) as r:
for p in pairs: for p in pairs:
i+=1 i+=1
if not i % 1000000: if not i % 1000000:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment