cuffmerge报错解决方案:run_log = open(logging_dir + "run.log", "w", 0), ValueError: can't have unbuffered text I/O
运行命令${src}/cuffmerge -o ./merge -g ${input}/gencode.v44.primary_assembly.annotation_sorted.gtf merge.list
时报错:
run_log = open(logging_dir + "run.log", "w", 0)
ValueError: can't have unbuffered text I/O
解决方案:修改${src}/cuffmerge
代码。
修改第一处:在${src}/cuffmerge
的第53行插入以下代码
class Unbuffered(object):
def __init__(self, stream):
self.stream = stream
def write(self, data):
self.stream.write(data)
self.stream.flush()
def writelines(self, datas):
self.stream.writelines(datas)
self.stream.flush()
def __getattr__(self, attr):
return getattr(self.stream, attr)
效果如下所示:
修改第二处:
把在${src}/cuffmerge
的第526行代码run_log = open(logging_dir + "run.log", "w", 0)
改为run_log = Unbuffered(open(logging_dir + "run.log", "w"))
效果如下所示:
代码来源:https://github.com/cole-trapnell-lab/cufflinks/issues/130
本文来自博客园,作者:橙子牛奶糖(陈文燕),转载请注明原文链接:https://www.cnblogs.com/chenwenyan/p/17571394.html