Skip to content

Instantly share code, notes, and snippets.

@dalexander
Last active August 29, 2015 13:55
Show Gist options
  • Save dalexander/8693679 to your computer and use it in GitHub Desktop.
Save dalexander/8693679 to your computer and use it in GitHub Desktop.
script for interrogating PacBio sequencing chemistry used
#!/usr/bin/env python
import sys
import h5py
fname = sys.argv[1]
f = h5py.File(fname, "r")
if fname.endswith("bax.h5"):
ri = f["/ScanData/RunInfo"]
try:
chem = ri.attrs["SequencingChemistry"]
print sys.argv[1], chem
except:
print sys.argv[1], "absent"
else:
assert fname.endswith("cmp.h5")
for (movieName, chemistry) in zip(f["/MovieInfo/Name"],
f["/MovieInfo/SequencingChemistry"]):
print movieName, chemistry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment