Created
January 8, 2021 17:26
-
-
Save alexomics/5df8070e96a01a9b6f0ee8bc9cdf0753 to your computer and use it in GitHub Desktop.
Guppy Version from FAST5 file
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
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