Last active
August 29, 2015 13:55
-
-
Save dalexander/8693679 to your computer and use it in GitHub Desktop.
script for interrogating PacBio sequencing chemistry used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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