{"id":25596831,"url":"https://github.com/nanoporetech/fast5_research","last_synced_at":"2025-04-13T02:31:01.558Z","repository":{"id":21524688,"uuid":"93172187","full_name":"nanoporetech/fast5_research","owner":"nanoporetech","description":"Fast5 API provided by ONT Research","archived":false,"fork":false,"pushed_at":"2022-03-17T16:10:11.000Z","size":16087,"stargazers_count":21,"open_issues_count":0,"forks_count":15,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-06T08:02:14.251Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nanoporetech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-02T14:12:54.000Z","updated_at":"2024-04-15T13:45:55.000Z","dependencies_parsed_at":"2022-08-07T10:00:44.661Z","dependency_job_id":null,"html_url":"https://github.com/nanoporetech/fast5_research","commit_stats":null,"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Ffast5_research","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Ffast5_research/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Ffast5_research/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanoporetech%2Ffast5_research/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanoporetech","download_url":"https://codeload.github.com/nanoporetech/fast5_research/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248231726,"owners_count":21069388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-21T12:34:31.271Z","updated_at":"2025-04-13T02:31:01.509Z","avatar_url":"https://github.com/nanoporetech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Oxford Nanopore Technologies logo](https://github.com/nanoporetech/medaka/raw/master/images/ONT_logo_590x106.png)\n\n\nfast5_research\n==============\n\n[![Build Status](https://travis-ci.org/nanoporetech/fast5_research.svg?branch=master)](https://travis-ci.org/nanoporetech/fast5_research)\n\nPython fast5 reading and writing functionality provided by ONT Research.\n\n© 2018 Oxford Nanopore Technologies Ltd.\n\nFeatures\n--------\n\n * Read interface bulk `.fast5` file for extracting reads, channel states, voltage, ...\n * Read/Write interface to single read files guaranteeing conformity.\n * Works on Linux, MacOS, and Windows.\n * Open source (Mozilla Public License 2.0).\n\nDocumentation can be found at https://nanoporetech.github.io/fast5_research/.\n\nInstallation\n------------\n\n`fast5_research` is available from pypi can can be installed with pip:\n\n    pip install fast5_research\n\n\nUsage\n-----\n\nFull documentation can be found at the link above, below are two simple examples.\n\nTo read a file:\n\n    from fast5_research import Fast5\n    \n    filename='my.fast5'\n    \n    with Fast5(filename) as fh:\n        raw = fh.get_read(raw=True)\n        summary = fh.summary()\n    print('Raw is {} samples long.'.format(len(raw)))\n    print('Summary {}.'.format(summary))\n\nWrite a file, the library will check the given meta data, ensure that all required\nvalues are present, and covert all values to their defined types.\n\n    from uuid import uuid4\n    import numpy as np\n    from fast5_research import Fast5\n    \n    filename='my_new.fast5'\n    mean, stdv, n = 40.0, 2.0, 10000\n    raw_data = np.random.laplace(mean, stdv/np.sqrt(2), int(dwell))\n    \n    # example of how to digitize data\n    start, stop = int(min(raw_data - 1)), int(max(raw_data + 1))\n    rng = stop - start\n    digitisation = 8192.0\n    bins = np.arange(start, stop, rng / digitisation)\n    # np.int16 is required, the library will refuse to write anything other\n    raw_data = np.digitize(raw_data, bins).astype(np.int16)\n    \n    # The following are required meta data\n    channel_id = {\n        'digitisation': digitisation,\n        'offset': 0,\n        'range': rng,\n        'sampling_rate': 4000,\n        'channel_number': 1,\n        }\n    read_id = {\n        'start_time': 0,\n        'duration': len(raw_data),\n        'read_number': 1,\n        'start_mux': 1,\n        'read_id': str(uuid4()),\n        'scaling_used': 1,\n        'median_before': 0,\n    }\n    tracking_id = {\n        'exp_start_time': '1970-01-01T00:00:00Z',\n        'run_id': str(uuid4()).replace('-',''),\n        'flow_cell_id': 'FAH00000',\n    }\n    context_tags = {}\n    \n    with Fast5.New(filename, 'w', tracking_id=tracking_id, context_tags=context_tags, channel_id=channel_id) as h:\n        h.set_raw(raw_data, meta=read_id, read_number=1)\n\n\nHelp\n----\n\n**Licence and Copyright**\n\n© 2018 Oxford Nanopore Technologies Ltd.\n\n`medaka` is distributed under the terms of the Mozilla Public License 2.0.\n\n**Research Release**\n\nResearch releases are provided as technology demonstrators to provide early\naccess to features or stimulate Community development of tools. Support for\nthis software will be minimal and is only provided directly by the developers.\nFeature requests, improvements, and discussions are welcome and can be\nimplemented by forking and pull requests. However much as we would\nlike to rectify every issue and piece of feedback users may have, the \ndevelopers may have limited resource for support of this software. Research\nreleases may be unstable and subject to rapid iteration by Oxford Nanopore\nTechnologies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoporetech%2Ffast5_research","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanoporetech%2Ffast5_research","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanoporetech%2Ffast5_research/lists"}