Skip to content

Instantly share code, notes, and snippets.

@tclv
Last active November 22, 2015 13:17
Show Gist options
  • Save tclv/2834a787e1883f026d3d to your computer and use it in GitHub Desktop.
Save tclv/2834a787e1883f026d3d to your computer and use it in GitHub Desktop.
Checks fastqlr fils against chunks
from itertools import cycle
if __name__ == "__main__":
f1 = open("./fastq1.fq")
f2 = open("./fastq2.fq")
reference = cycle([f1, f2])
for i in range(8):
print("Checking chunk{}".format(i))
with open('./chunk{}'.format(i)) as chunkfile:
for chunk in chunkfile:
chunk = chunk.strip()
ref_file = reference.next()
ref = ""
for i in range(4):
ref += ref_file.readline().strip()
assert chunk == ref, "\n" + chunk + "\n" + ref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment