Very large input and piping using subprocess.Popen

前端 未结 5 714
北恋
北恋 2020-12-25 15:40

I have pretty simple problem. I have a large file that goes through three steps, a decoding step using an external program, some processing in python, and then recoding usi

5条回答
  •  -上瘾入骨i
    2020-12-25 16:09

    Try to make this small change, see if the efficiency is better.

     for line in samtoolsin.stdout:
            if(line.startswith("@")):
                samtoolsout.stdin.write(line)
            else:
                linesplit = line.split("\t")
                if(linesplit[10]=="*"):
                    linesplit[9]="*"
                samtoolsout.stdin.write("\t".join(linesplit))
    

提交回复
热议问题