Skip to content

Instantly share code, notes, and snippets.

@alexomics
Created January 8, 2021 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexomics/5df8070e96a01a9b6f0ee8bc9cdf0753 to your computer and use it in GitHub Desktop.
Save alexomics/5df8070e96a01a9b6f0ee8bc9cdf0753 to your computer and use it in GitHub Desktop.
Guppy Version from FAST5 file
from ont_fast5_api.fast5_interface import get_fast5_file
def guppy_from_file(fn):
"""
>>> guppy_from_file("single.fast5")
'3.0.7+427b5a11'
>>> guppy_from_file("multi.fast5")
'3.0.7+427b5a11'
"""
with get_fast5_file(fn, mode="r") as f5:
r = next(f5.get_reads())
return r.get_tracking_id().get("guppy_version")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment