Showing preview only (2,424K chars total). Download the full file or copy to clipboard to get everything.
Repository: nanoporetech/pod5-file-format
Branch: master
Commit: 6356e5c97b36
Files: 297
Total size: 2.3 MB
Directory structure:
gitextract_n9lck0re/
├── .clang-format
├── .codespellrc
├── .flake8
├── .gitattributes
├── .github/
│ └── ISSUE_TEMPLATE/
│ └── bug_report.md
├── .gitignore
├── .gitlab-ci.yml
├── .gitmodules
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── CHANGELOG.md
├── CMakeLists.txt
├── CMakePresets.json
├── DEV.md
├── LICENSE.md
├── README.md
├── benchmarks/
│ ├── .gitignore
│ ├── README.md
│ ├── build.sh
│ ├── convert/
│ │ ├── run_blow5.sh
│ │ └── run_pod5.sh
│ ├── find_all_read_ids/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_all_samples/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_read_number/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_sample_count/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_samples/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── image/
│ │ ├── Dockerfile.base
│ │ ├── install_slow5.sh
│ │ └── requirements-benchmarks.txt
│ ├── run_benchmarks.py
│ ├── run_benchmarks_in_docker.sh
│ └── tools/
│ ├── check_csvs_consistent.py
│ ├── fast5_to_single_blow5.sh
│ ├── find_and_get_fast5.py
│ ├── find_and_get_pod5.py
│ ├── pyslow5_tests.py
│ ├── run_benchmarks_docker_entry.sh
│ └── select-random-ids.py
├── c++/
│ ├── CMakeLists.txt
│ ├── examples/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── find_all_read_data.cpp
│ │ ├── find_all_read_ids.cpp
│ │ ├── find_specific_read_ids.cpp
│ │ └── find_specific_read_ids_with_signal.cpp
│ ├── pod5_format/
│ │ ├── async_signal_loader.cpp
│ │ ├── async_signal_loader.h
│ │ ├── c_api.cpp
│ │ ├── c_api.h
│ │ ├── dictionary_writer.h
│ │ ├── expandable_buffer.h
│ │ ├── file_output_stream.h
│ │ ├── file_reader.cpp
│ │ ├── file_reader.h
│ │ ├── file_recovery.h
│ │ ├── file_updater.cpp
│ │ ├── file_updater.h
│ │ ├── file_writer.cpp
│ │ ├── file_writer.h
│ │ ├── flatbuffers/
│ │ │ └── footer.fbs
│ │ ├── internal/
│ │ │ ├── async_output_stream.h
│ │ │ ├── combined_file_utils.h
│ │ │ ├── linux_output_stream.h
│ │ │ └── tracing/
│ │ │ └── tracing.h
│ │ ├── io_manager.cpp
│ │ ├── io_manager.h
│ │ ├── memory_pool.cpp
│ │ ├── memory_pool.h
│ │ ├── migration/
│ │ │ ├── migration.cpp
│ │ │ ├── migration.h
│ │ │ ├── migration_utils.h
│ │ │ ├── v0_to_v1.cpp
│ │ │ ├── v1_to_v2.cpp
│ │ │ ├── v2_to_v3.cpp
│ │ │ └── v3_to_v4.cpp
│ │ ├── read_table_reader.cpp
│ │ ├── read_table_reader.h
│ │ ├── read_table_schema.cpp
│ │ ├── read_table_schema.h
│ │ ├── read_table_utils.cpp
│ │ ├── read_table_utils.h
│ │ ├── read_table_writer.cpp
│ │ ├── read_table_writer.h
│ │ ├── read_table_writer_utils.cpp
│ │ ├── read_table_writer_utils.h
│ │ ├── result.h
│ │ ├── run_info_table_reader.cpp
│ │ ├── run_info_table_reader.h
│ │ ├── run_info_table_schema.cpp
│ │ ├── run_info_table_schema.h
│ │ ├── run_info_table_writer.cpp
│ │ ├── run_info_table_writer.h
│ │ ├── schema_field_builder.h
│ │ ├── schema_metadata.cpp
│ │ ├── schema_metadata.h
│ │ ├── schema_utils.cpp
│ │ ├── schema_utils.h
│ │ ├── signal_builder.h
│ │ ├── signal_compression.cpp
│ │ ├── signal_compression.h
│ │ ├── signal_table_reader.cpp
│ │ ├── signal_table_reader.h
│ │ ├── signal_table_schema.cpp
│ │ ├── signal_table_schema.h
│ │ ├── signal_table_utils.h
│ │ ├── signal_table_writer.cpp
│ │ ├── signal_table_writer.h
│ │ ├── svb16/
│ │ │ ├── common.hpp
│ │ │ ├── decode.hpp
│ │ │ ├── decode_scalar.hpp
│ │ │ ├── decode_x64.hpp
│ │ │ ├── encode.hpp
│ │ │ ├── encode_scalar.hpp
│ │ │ ├── encode_x64.hpp
│ │ │ ├── generate_shuffle_tables.py
│ │ │ ├── intrinsics.hpp
│ │ │ ├── shuffle_tables.hpp
│ │ │ ├── simd_detect_x64.hpp
│ │ │ ├── streamvbytedelta_decode_16.c
│ │ │ ├── streamvbytedelta_encode_16.c
│ │ │ ├── streamvbytedelta_x64_decode_16.c
│ │ │ ├── streamvbytedelta_x64_encode_16.c
│ │ │ ├── svb16.c
│ │ │ └── svb16.h
│ │ ├── table_reader.cpp
│ │ ├── table_reader.h
│ │ ├── thread_pool.cpp
│ │ ├── thread_pool.h
│ │ ├── tuple_utils.h
│ │ ├── types.cpp
│ │ ├── types.h
│ │ ├── uuid.h
│ │ └── version.h.in
│ ├── pod5_format_pybind/
│ │ ├── CMakeLists.txt
│ │ ├── _version.py.in
│ │ ├── api.h
│ │ ├── bindings.cpp
│ │ ├── build_wheel.cmake
│ │ ├── repack/
│ │ │ ├── repack_functions.h
│ │ │ ├── repack_output.cpp
│ │ │ ├── repack_output.h
│ │ │ ├── repack_states.h
│ │ │ ├── repack_utils.h
│ │ │ ├── repacker.cpp
│ │ │ └── repacker.h
│ │ ├── subset.cpp
│ │ ├── subset.h
│ │ └── utils.h
│ └── test/
│ ├── CMakeLists.txt
│ ├── TemporaryDirectory.h
│ ├── c_api_build_test.c
│ ├── c_api_null_input.cpp
│ ├── c_api_test_utils.h
│ ├── c_api_tests.cpp
│ ├── file_reader_writer_tests.cpp
│ ├── main.cpp
│ ├── output_stream_tests.cpp
│ ├── read_table_tests.cpp
│ ├── read_table_writer_utils_tests.cpp
│ ├── run_info_table_tests.cpp
│ ├── schema_tests.cpp
│ ├── signal_compression_tests.cpp
│ ├── signal_table_tests.cpp
│ ├── svb16_scalar_tests.cpp
│ ├── svb16_x64_tests.cpp
│ ├── test_utils.h
│ ├── thread_pool_tests.cpp
│ ├── utils.h
│ └── uuid_tests.cpp
├── ci/
│ ├── docker/
│ │ ├── Dockerfile.conda
│ │ ├── Dockerfile.py39.arm64
│ │ └── Dockerfile.py39.x64
│ ├── generate_coverage_report.sh
│ ├── get_tag_version.cmake
│ ├── gitlab-ci-common.yml
│ ├── install.sh
│ ├── package.sh
│ └── unpack_libs_for_python.sh
├── cmake/
│ ├── BuildFlatBuffers.cmake
│ ├── Findzstd.cmake
│ ├── conan_provider.cmake
│ ├── pod5_fuzz.cmake
│ ├── pod5_packaging.cmake
│ └── presets/
│ ├── conan-build-options.json
│ ├── conan-profiles.json
│ └── conan-provider.json
├── conanfile.py
├── docs/
│ ├── DESIGN.md
│ ├── README.md
│ ├── SPECIFICATION.md
│ └── tables/
│ ├── reads.toml
│ ├── run_info.toml
│ └── signal.toml
├── fuzz/
│ ├── .gitattributes
│ ├── CMakeLists.txt
│ ├── fuzz_compress.cpp
│ ├── fuzz_file.cpp
│ └── runner.cpp
├── pod5_make_version.py
├── pyproject.toml
├── pytest.ini
├── python/
│ ├── .gitignore
│ ├── lib_pod5/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── pyproject.toml
│ │ ├── setup.py
│ │ └── src/
│ │ ├── lib_pod5/
│ │ │ ├── __init__.py
│ │ │ ├── pod5_format_pybind.pyi
│ │ │ └── py.typed
│ │ └── test/
│ │ └── test_lib_pod5.py
│ └── pod5/
│ ├── Makefile
│ ├── README.md
│ ├── examples/
│ │ ├── find_all_reads.py
│ │ └── find_specific_reads.py
│ ├── pyproject.toml
│ ├── setup.py
│ ├── src/
│ │ ├── pod5/
│ │ │ ├── __init__.py
│ │ │ ├── api_utils.py
│ │ │ ├── dataset.py
│ │ │ ├── pod5_types.py
│ │ │ ├── reader.py
│ │ │ ├── repack.py
│ │ │ ├── signal_tools.py
│ │ │ ├── tools/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── main.py
│ │ │ │ ├── parsers.py
│ │ │ │ ├── pod5_convert_from_fast5.py
│ │ │ │ ├── pod5_convert_to_fast5.py
│ │ │ │ ├── pod5_filter.py
│ │ │ │ ├── pod5_inspect.py
│ │ │ │ ├── pod5_merge.py
│ │ │ │ ├── pod5_recover.py
│ │ │ │ ├── pod5_repack.py
│ │ │ │ ├── pod5_subset.py
│ │ │ │ ├── pod5_update.py
│ │ │ │ ├── pod5_view.py
│ │ │ │ ├── polars_utils.py
│ │ │ │ └── utils.py
│ │ │ └── writer.py
│ │ └── tests/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_api.py
│ │ ├── test_convert_from_fast5.py
│ │ ├── test_convert_to_fast5.py
│ │ ├── test_dataset.py
│ │ ├── test_filter.py
│ │ ├── test_inspect.py
│ │ ├── test_merge.py
│ │ ├── test_reader.py
│ │ ├── test_recover.py
│ │ ├── test_repack.py
│ │ ├── test_signal_tools.py
│ │ ├── test_subset.py
│ │ ├── test_tools.py
│ │ ├── test_update.py
│ │ ├── test_view.py
│ │ └── test_writer.py
│ └── test_utils/
│ └── check_pod5_files_equal.py
├── test_data/
│ ├── multi_fast5_zip.fast5
│ ├── multi_fast5_zip_v0.pod5
│ ├── multi_fast5_zip_v1.pod5
│ ├── multi_fast5_zip_v2.pod5
│ ├── multi_fast5_zip_v3.pod5
│ ├── multi_fast5_zip_v4.pod5
│ ├── single_read_fast5/
│ │ └── fe85b517-62ee-4a33-8767-41cab5d5ab39.fast5.single-read
│ ├── split_1_v4.pod5
│ ├── split_2_v4.pod5
│ └── subset_mapping_examples/
│ ├── read_ids.txt
│ ├── subset.csv
│ └── subset.summary
├── test_package/
│ ├── CMakeLists.txt
│ ├── conanfile.py
│ ├── test_cpp_api.cpp
│ └── test_package.cpp
└── third_party/
├── build_instructions.txt
├── gsl-disable-gsl-suppress.patch
├── include/
│ ├── .editorconfig
│ ├── catch2/
│ │ └── catch.hpp
│ ├── gsl/
│ │ ├── gsl
│ │ ├── gsl-lite-vc6.hpp
│ │ ├── gsl-lite.h
│ │ └── gsl-lite.hpp
│ └── gsl.h
├── jsoncons-0.166-icc-fix.patch
├── licenses/
│ ├── catch2.txt
│ └── gsl-lite.txt
└── software_versions.yaml
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
---
# See https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html
BasedOnStyle: Chromium
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
# AlignArrayOfStructures can cause crashes, see https://github.com/llvm/llvm-project/issues/55269
#AlignArrayOfStructures: Left
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: All
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
BraceWrapping:
# NB: due to https://github.com/llvm/llvm-project/issues/55582 the Multiline setting will not
# always work (should be fixed in clang-format 15, but that is not available as a python wheel yet
# due to https://github.com/ssciwr/clang-format-wheel/issues/49)
AfterControlStatement: MultiLine # makes sure multiline ifs don't run into their bodies
AfterFunction: true # makes constructors with initialisers much nicer
BreakBeforeConceptDeclarations: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakStringLiterals: true
ColumnLimit: 100
CompactNamespaces: true
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false # force use of the PointerAlignment setting
FixNamespaceComments: true
IncludeBlocks : Regroup
IncludeCategories:
# Aim is:
# 0. the "main" header file (#include "foo.h" in foo.cpp) automatically gets priority 0
# 1. internal headers (#include "util/helpers.h"): quotation marks, with a '/'
# 2. third-party headers (#include <arrow/status.h>): angle brackets, '/' or .h/.hpp/.h++
# file ext
# 3. standard library headers (#include <vector>): angle brackets, no file ext, no '/'
- Regex: '^"'
Priority: 1
- Regex: '^<.*/'
Priority: 2
- Regex: '\.h>'
Priority: 2
- Regex: '\.hpp>'
Priority: 2
- Regex: '\.h\+\+>'
Priority: 2
IncludeIsMainRegex: '(_test|_tests|Tests|Test)?$'
# foo.h will be considered the "main" header (and sorted to the top) for all of the following:
# - foo.cpp
# - foo_test.cpp
# - foo_tests.cpp
# - fooTests.cpp (although this is intended for Foo.h and FooTests.cpp)
# - fooTest.cpp (although this is intended for Foo.h and FooTest.cpp)
IndentCaseLabels: false
IndentWidth: 4
InsertBraces: true
PackConstructorInitializers: CurrentLine
PointerAlignment: Middle
QualifierAlignment: Right # const east
# clang 14 *should* know about QualifierOrder (according to its docs) but claims it doesn't
#QualifierOrder: ['static', 'constexpr', 'inline', 'type', 'const', 'volatile', 'restrict']
ReflowComments: false
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
SortUsingDeclarations: true
SpaceAroundPointerQualifiers: Before
Standard: c++20
================================================
FILE: .codespellrc
================================================
# Waiting for pyproject.toml support: https://github.com/codespell-project/codespell/issues/2055
[codespell]
# "write-changes" doesn't work with "ignore-regex"
# https://github.com/codespell-project/codespell/issues/2056
# comma-separated list of built-in dictionaries (default is "clear,rare")
builtin = clear,rare,code
# show the line in which the error occurred
context = 0
# these options are turned on by specifying them here
check-filenames =
check-hidden =
enable-colors =
# split words on underscores
# e.g. "foo_bar" is split into two words ("foo", "bar") instead of one word ("foo_bar")
ignore-regex = _
# comma-separated list of false positives
ignore-words-list = iff,inout,befores,deque,stdio,O_WRONLY,wronly,sv_lite,lite,creat,arange
# comma-separated list of globs of files not to check
skip = .gitignore,.codespellrc
================================================
FILE: .flake8
================================================
# Waiting for pyproject.toml support: https://gitlab.com/pycqa/flake8/-/issues/428
[flake8]
extend-ignore = E203, W503
max-line-length = 120
per-file-ignores = __init__.py:F401, __init__.py:F403
================================================
FILE: .gitattributes
================================================
# Based on https://github.com/alexkaratarakis/gitattributes
# Auto detect text files and force linux-style line endings
* text=auto eol=lf
# Documents
*.bibtex text diff=bibtex
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.md text diff=markdown
*.mdx text diff=markdown
*.tex text diff=tex
*.adoc text
*.textile text
*.mustache text
*.csv text
*.tab text
*.tsv text
*.txt text
*.sql text
*.epub diff=astextplain
# Graphics
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.tif binary
*.tiff binary
*.ico binary
*.svg binary
*.eps binary
*.bash text
*.fish text
*.sh text
*.zsh text
# These are explicitly windows files and should use crlf
*.bat text eol=crlf
*.cmd text eol=crlf
*.ps1 text eol=crlf
# Serialisation
*.json text
*.toml text
*.xml text
*.yaml text
*.yml text
# Archives
*.7z binary
*.gz binary
*.tar binary
*.tgz binary
*.zip binary
# Text files where line endings should be preserved
*.diff -text
*.patch -text
# Exclude git(lab)-specific files when making an archive of the source tree
.gitattributes export-ignore
.gitignore export-ignore
.gitkeep export-ignore
.git-blame-ignore-revs export-ignore
.gitlab-ci.yml export-ignore
/ci export-ignore
# C++ Sources
*.c text diff=cpp
*.cc text diff=cpp
*.cxx text diff=cpp
*.cpp text diff=cpp
*.c++ text diff=cpp
*.hpp text diff=cpp
*.h text diff=cpp
*.h++ text diff=cpp
*.hh text diff=cpp
# Read formats
*.pod5 filter=lfs diff=lfs merge=lfs -text
*.fast5 binary
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
## Issue Description
> Please provide a description of your issue and include any commands used to reproduce the issue.
## Logs
> Please provide any log files. These can be generated by setting the `POD5_DEBUG` environment variable e.g. `POD5_DEBUG=1 pod5 view my.pod5`
## Specifications
- Pod5 Version:
- Python Version:
- Platform:
================================================
FILE: .gitignore
================================================
build*/
.conan/
cmake-build*/
CMakeUserPresets.json
_build/
.conan/
.cache/
dist/
.DS_Store
.pod5
venv/
*.venv/
uv.lock
docs/public/
.tmp_pod5*
_version.py
*egg-info/
POD5Version.cmake
*.swp
test_package/CMakeUserPresets.json
.vscode/
.devcontainer/
__pycache__
python/Python.framework/
/fuzz/corpus_*
================================================
FILE: .gitlab-ci.yml
================================================
stages:
- .pre
- build
- test
- build-conan
- archive
- deploy
include:
- local: '/ci/gitlab-ci-common.yml'
variables:
GIT_SUBMODULE_STRATEGY: recursive
STABLE_BRANCH_NAME: master
DO_UPLOAD: "yes" # Always upload in conan upload jobs (only run on tags)
CONAN_PROFILE_BUILD_TYPE: Release
CONAN_VENV_PYTHON: "3.13"
CMAKE_VERSION: "4.2.3"
before_script:
- ""
# The versions that we build and test.
.parallel-py-versions:
parallel:
matrix:
- PYTHON_VERSION: ["3.10", "3.11", "3.12", "3.13", "3.14"]
# ======================================
#
# Docker
#
# ======================================
.build-docker-image:
stage: .pre
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-docker:latest
before_script:
- docker login --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
when: manual
retry:
max: 2
when: runner_system_failure
script:
- tag="${CI_REGISTRY_IMAGE}/${IMAGE_TAG}"
- docker image build --pull --target "${PLATFORM}"
--tag "${tag}" --file ${DOCKERFILE} ci/docker
- docker image push ${tag}
docker base aarch64:
tags:
- docker-builder-arm
extends:
- .build-docker-image
variables:
IMAGE_TAG: "build-arm64"
DOCKERFILE: "ci/docker/Dockerfile.py39.arm64"
docker base x86-64:
tags:
- docker-builder
extends:
- .build-docker-image
variables:
IMAGE_TAG: "build-x64"
DOCKERFILE: "ci/docker/Dockerfile.py39.x64"
docker conda:
tags:
- docker-builder
extends:
- .build-docker-image
variables:
IMAGE_TAG: "conda"
DOCKERFILE: "ci/docker/Dockerfile.conda"
.docker template:
stage: docker
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-docker:latest
before_script:
- docker login --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
retry:
max: 2
when: runner_system_failure
# ======================================
#
# Versioning
#
# ======================================
prepare_version:
stage: .pre
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:3.10
script:
- git tag -d $(git tag -l "*a*")
- git tag -d $(git tag -l "*b*")
- git tag -d $(git tag -l "*r*")
- git tag -d $(git tag -l "*c*")
- git tag -d $(git tag -l "*dev*")
- if [[ ${CI_COMMIT_TAG/#v/} && -z $( git tag -l "${CI_COMMIT_TAG/#v/}" ) ]]; then git tag ${CI_COMMIT_TAG/#v/}; fi
- pip install --upgrade pip setuptools_scm~=7.1
- apt update && apt install -y git-lfs
- git status --porcelain
- python -m setuptools_scm
- cat _version.py
# Show the version that will be used in the pod5/pyproject.toml
- VERSION=$(grep "__version__" _version.py | awk '{print $5}' | tr -d "'" | cut -d'+' -f1)
- echo $VERSION
- python -m pod5_make_version
- cat cmake/POD5Version.cmake
- cat _version.py python/lib_pod5/src/lib_pod5/_version.py
- cat _version.py python/pod5/src/pod5/_version.py
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- "cmake/POD5Version.cmake"
- "_version.py"
- "python/lib_pod5/src/lib_pod5/_version.py"
- "python/pod5/src/pod5/_version.py"
# ======================================
#
# Pre-Flight Setup / Checks
#
# ======================================
tag_version_check:
stage: .pre
needs:
- "prepare_version"
only:
- tags
image: ${CI_REGISTRY}/minknow/images/build-x86_64-gcc13:latest
script:
- uv venv .venv
- source .venv/bin/activate
- uv pip install "cmake==${CMAKE_VERSION}"
- pod5_version="$(cmake -P ci/get_tag_version.cmake 2>&1)"
- tag_version="${CI_COMMIT_TAG/#v/}"
- if [[ "${pod5_version}" != "${tag_version}" ]]; then
echo "Tag is for release ${tag_version}, but POD5 version is $pod5_version";
exit 1;
fi
api_lib_version_check:
stage: .pre
needs:
- "prepare_version"
image: ${CI_REGISTRY}/minknow/images/build-x86_64-gcc13:latest
script:
- cat _version.py
- NO_DEV_VERSION=$(grep "__version__" _version.py | awk '{print $5}' | tr -d "'" | cut -d'+' -f1 | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\).*$/\1/')
- echo $NO_DEV_VERSION
- cat python/pod5/pyproject.toml
- echo "If this jobs fails then we have forgotten to match the api and lib version in the api python/pod5/pyproject.toml"
- grep "lib_pod5\s*==\s*$NO_DEV_VERSION" python/pod5/pyproject.toml
pre-commit checks:
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:3.10
stage: .pre
tags:
- linux_x86
- docker
script:
- pip install pre-commit
- if ! pre-commit run --all-files; then
- cat "${PRE_COMMIT_HOME}/pre-commit.log"
- >-
if grep -F -q \
-e "InvalidManifestError" \
-e "error: [Errno 17] File exists: 'build/temp.linux-x86_64-cpython-" \
"${PRE_COMMIT_HOME}/pre-commit.log"; then
- echo "Bad cache state detected, deleting cache and re-running"
- rm -rf "${PRE_COMMIT_HOME}/"
- pre-commit run --all-files
- else
- exit 1
- fi
- fi
after_script:
- cat "${PRE_COMMIT_HOME}/pre-commit.log" || true
variables:
PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit
cache:
paths:
- ${PRE_COMMIT_HOME}
# ======================================
#
# Build Lib Standalone
#
# ======================================
build-standalone-ubu22:
stage: build
image: external-docker.artifactory.oxfordnanolabs.local/ubuntu:22.04
needs:
- "prepare_version"
script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get update
- apt-get install -y -V ca-certificates lsb-release wget
- wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
- apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
- apt-get update
- apt-get install -y cmake build-essential libzstd-dev libzstd-dev libflatbuffers-dev libarrow-dev=18.0.0-1
- mkdir -p build
- cd build
- cmake
-D POD5_DISABLE_TESTS=OFF
-D POD5_BUILD_EXAMPLES=ON
-D BUILD_PYTHON_WHEEL=OFF
..
- cmake --build . --parallel
- ctest -C Release -VV
# ======================================
#
# Build helpers
#
# ======================================
# Takes CMAKE_ARGS, AUDITWHEEL_PLATFORM, and PYTHON_VERSION.
.conan-build-and-test:
- |
- export TOOLCHAIN_FILE=build/generators/conan_toolchain.cmake
- pod5_version="$(cmake -P ci/get_tag_version.cmake 2>&1)"
- mkdir -p build
- cd build
- ${conan_exe} install --profile ${CONAN_PROFILE} ${EXTRA_INSTALL_ARGS} ..
- cmake ${CMAKE_ARGS}
-D BUILD_SHARED_LIB=ON
-D CMAKE_BUILD_TYPE=Release
-D POD5_DISABLE_TESTS=OFF
-D POD5_BUILD_EXAMPLES=ON
-D BUILD_PYTHON_WHEEL=OFF
-D CMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
..
- cmake --build . --config Release --parallel
- ctest -C Release -VV
- ../ci/install.sh
- cmake ${CMAKE_ARGS}
-D BUILD_SHARED_LIB=OFF
-D CMAKE_BUILD_TYPE=Release
-D POD5_DISABLE_TESTS=OFF
-D POD5_BUILD_EXAMPLES=ON
-D BUILD_PYTHON_WHEEL=ON
-D PYTHON_VERSION=${PYTHON_VERSION}
-D CMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_FILE}
..
- cmake --build . --config Release --parallel
- ctest -C Release -VV
- ../ci/install.sh STATIC_BUILD
- ../ci/package.sh ${OUTPUT_SKU} ${AUDITWHEEL_PLATFORM}
# ======================================
#
# Build Lib Linux
#
# ======================================
.build-linux:
stage: build
needs:
- "prepare_version"
variables:
EXTRA_INSTALL_ARGS: "-o arrow:with_boost=False -o arrow:with_thrift=False -o arrow:parquet=False"
before_script:
- /opt/python/cp310-cp310/bin/pip install -U pip 'conan<2' auditwheel build "cmake==${CMAKE_VERSION}"
- ln -n /opt/python/cp310-cp310/bin/auditwheel /usr/bin/auditwheel
- ln -n /opt/python/cp310-cp310/bin/conan /usr/bin/conan
- conan config install --verify-ssl=no ${CONAN_CONFIG_URL}
- conan_exe=$(which conan)
script:
- !reference [".conan-build-and-test"]
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- "lib_pod5*.tar.gz"
- "lib_pod5*.whl"
linux-x64-gcc9-release-build:
image: external-quay.artifactory.oxfordnanolabs.local/pypa/manylinux2014_x86_64
extends:
- .build-linux
- .parallel-py-versions
tags:
- linux
variables:
CONAN_PROFILE: "linux-x86_64-gcc9.jinja"
CONAN_PROFILE_CPPSTD: 17
OUTPUT_SKU: "linux-x64"
AUDITWHEEL_PLATFORM: manylinux2014_x86_64
linux-aarch64-gcc9-release-build:
image: external-quay.artifactory.oxfordnanolabs.local/pypa/manylinux2014_aarch64
extends:
- .build-linux
- .parallel-py-versions
tags:
- linux_aarch64
- high-cpu
variables:
CONAN_PROFILE: "linux-aarch64-gcc9.jinja"
CONAN_PROFILE_CPPSTD: 17
OUTPUT_SKU: "linux-arm64"
AUDITWHEEL_PLATFORM: manylinux2014_aarch64
# ======================================
#
# Build Lib OSX
#
# ======================================
.build-osx-common:
stage: build
needs:
- "prepare_version"
variables:
EXTRA_INSTALL_ARGS: "-o arrow:with_boost=False -o arrow:with_thrift=False -o arrow:parquet=False"
before_script:
- uv venv .venv_conan --python ${CONAN_VENV_PYTHON} --seed
- source .venv_conan/bin/activate
# Note that cmake 3.31+ do not work properly on macOS 14 (and earlier)
# Pinning to 3.30 avoid SSL issues when connecting to internal servers
- uv pip install -U pip 'conan<2' 'cmake==3.30.9'
- conan config install --verify-ssl=no "${CONAN_CONFIG_URL}"
- conan_exe=$(which conan)
- uv python install ${PYTHON_VERSION}
- uv venv --python "python${PYTHON_VERSION}" .venv --seed
- source .venv/bin/activate
- which python
- python --version
script:
- python3 -c "import sysconfig; print(sysconfig.get_platform())"
- !reference [".conan-build-and-test"]
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- "lib_pod5*.tar.gz"
- "lib_pod5*.whl"
osx-arm64-clang15-release-build:
extends:
- .build-osx-common
- .parallel-py-versions
tags:
- osx_arm64
- xcode-15.3
- conan
variables:
CONAN_PROFILE: "macos-aarch64-appleclang-15.0.jinja"
CONAN_PROFILE_CPPSTD: 20
CMAKE_ARGS: "-DCMAKE_OSX_ARCHITECTURES=arm64"
MACOSX_DEPLOYMENT_TARGET: "14.0"
OUTPUT_SKU: "osx-14.0-arm64"
FORCE_PYTHON_PLATFORM: macosx_14_0_arm64
# ======================================
#
# Build Lib Windows
#
# ======================================
.build-win-common:
stage: build
needs:
- "prepare_version"
retry: 1
variables:
# We need to override arrow's boost 1.85.0 requirement to match the version we use internally.
EXTRA_INSTALL_ARGS: "-o arrow:with_thrift=False -o arrow:parquet=False --require=boost/1.86.0@ -o boost:without_locale=True"
before_script:
- uv venv .venv_conan --python ${CONAN_VENV_PYTHON} --seed
- source .venv_conan/Scripts/activate
- uv pip install 'conan<2' "cmake==${CMAKE_VERSION}"
- conan config install --verify-ssl=no "${CONAN_CONFIG_URL}"
- conan_exe=$(which conan)
- uv python install ${PYTHON_VERSION}
- uv venv --python "python${PYTHON_VERSION}" .venv --seed
- source .venv/Scripts/activate
script:
- uv pip install build
- !reference [".conan-build-and-test"]
after_script:
# HACK: for some reason, pod5_unit_tests.exe is sticking around; deleting it works, but it
# doesn't go away immediately (as though something had it open with FILE_SHARE_DELETE, although
# the Handle utility from SysInternals couldn't find anything).
# This also appears to be happening for the fuzz targets, so remove and wait for every exe.
- rm -v build/Release/bin/*.exe
- date
- while true; do
- ls build/Release/bin/*.exe || break
- sleep 1
- done
- date
win-x64-msvc2019-release-build:
extends:
- .build-win-common
- .parallel-py-versions
tags:
- windows
- VS2019
- conan
variables:
CONAN_PROFILE: "windows-x86_64-vs2019.jinja"
CONAN_PROFILE_CPPSTD: 17
OUTPUT_SKU: "win-x64"
CMAKE_ARGS: "-A x64"
CMAKE_GENERATOR: "Visual Studio 16 2019"
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- "lib_pod5*.tar.gz"
- "lib_pod5*.whl"
# ======================================
#
# Build Python API
#
# ======================================
build-python-api:
stage: build
needs:
- "prepare_version"
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:3.10
tags:
- linux
script:
- git tag -d $(git tag -l "*a*")
- git tag -d $(git tag -l "*b*")
- git tag -d $(git tag -l "*r*")
- git tag -d $(git tag -l "*c*")
- git tag -d $(git tag -l "*dev*")
- if [[ ${CI_COMMIT_TAG/#v/} && -z $( git tag -l "${CI_COMMIT_TAG/#v/}" ) ]]; then git tag ${CI_COMMIT_TAG/#v/}; fi
- cat _version.py
- VERSION=$(grep "__version__" _version.py | awk '{print $5}' | tr -d "'" | cut -d'+' -f1)
- echo $VERSION
- cd python/pod5/
# update the lib_pod5 dependency in pod5/pyproject.toml to match
- sed -i "s/.*lib_pod5.*/\ \ \ \ \'lib_pod5 == ${VERSION}\',/" pyproject.toml
- cat pyproject.toml
- pip install -U pip build
- python -m build --outdir ../../
- cd ../..
- ls *.whl *.tar.gz
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- "pod5*.whl"
- "pod5*.tar.gz"
# ======================================
#
# Test Tools
#
# ======================================
tools-linux-x64:
extends:
- .parallel-py-versions
stage: test
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:${PYTHON_VERSION}
tags:
- linux
before_script:
- python${PYTHON_VERSION} -m venv .venv/
- source .venv/bin/activate
needs:
- linux-x64-gcc9-release-build
- build-python-api
script:
- pip install ./lib_pod5*cp${PYTHON_VERSION/./}*.whl pod5-*.whl
- pod5 convert fast5 ./test_data/ --output ./output_files --one-to-one ./test_data
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./test_data/multi_fast5_zip_v4.pod5
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./test_data/multi_fast5_zip_v3.pod5
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./test_data/multi_fast5_zip_v2.pod5
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./test_data/multi_fast5_zip_v1.pod5
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./test_data/multi_fast5_zip_v0.pod5
- pod5 convert to_fast5 ./output_files/ --output ./output_files
- pod5 convert fast5 ./output_files/*.fast5 --output ./output_files_2 --one-to-one ./output_files/
- python${PYTHON_VERSION} python/pod5/test_utils/check_pod5_files_equal.py ./output_files/multi_fast5_zip.pod5 ./output_files_2/*.pod5
# ======================================
#
# Pytest
#
# ======================================
.pytest:
stage: test
before_script:
- python${PYTHON_VERSION} -m venv .venv/
- source .venv/*/activate
- python --version
- python -m pip install --upgrade pip
script:
- pip install ./lib_pod5*cp${PYTHON_VERSION/./}*.whl pod5-*.whl
- pip install pytest pytest-cov pytest-mock psutil
- pytest
- POD5_DISABLE_MMAP_OPEN=1 pytest
.pytest-with-uv:
extends:
- .pytest
before_script:
- uv python install ${PYTHON_VERSION}
- uv venv --python "python${PYTHON_VERSION}" .venv --seed
- source .venv/*/activate
pytest-linux-x64:
extends:
- .pytest
- .parallel-py-versions
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:${PYTHON_VERSION}
tags:
- linux
needs:
- linux-x64-gcc9-release-build
- build-python-api
pytest-linux-aarch64:
extends:
- .pytest
- .parallel-py-versions
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:${PYTHON_VERSION}
tags:
- linux_aarch64
- high-cpu
needs:
- linux-aarch64-gcc9-release-build
- build-python-api
pytest-osx-arm64:
extends:
- .pytest-with-uv
- .parallel-py-versions
tags:
- osx_arm64
needs:
- osx-arm64-clang15-release-build
- build-python-api
pytest-win-x64:
retry: 1
extends:
- .pytest-with-uv
- .parallel-py-versions
tags:
- windows
needs:
- win-x64-msvc2019-release-build
- build-python-api
# ======================================
#
# Conda Testing
#
# ======================================
conda_pytest:
extends:
- .pytest
- .parallel-py-versions
image: ${CI_REGISTRY}/minknow/pod5-file-format/conda:latest
tags:
- linux
needs:
- linux-x64-gcc9-release-build
- build-python-api
before_script:
- |
cat > environment.yml << EOF
name: pod5_conda_test
channels:
- conda-forge
- bioconda
dependencies:
- python=${PYTHON_VERSION}
- cmake
- pyarrow
- pip
EOF
- cat environment.yml
- mamba --version
- mamba env create -f environment.yml
- conda env list
# This is a work around for conda init in gitlab
- eval "$(conda shell.bash hook)"
- conda activate pod5_conda_test
# ======================================
#
# Benchmarks
#
# ======================================
.benchmark:
stage: test
before_script:
- python3 -m venv .venv/
- source .venv/bin/activate
script:
- pip install ./${LIB_WHEEL_GLOB} pod5-*.whl setuptools
- pip install -r ./benchmarks/image/requirements-benchmarks.txt
- ./benchmarks/image/install_slow5.sh
- export PATH="$(pwd)/slow5tools-v1.3.0/:$PATH"
- ./benchmarks/run_benchmarks.py ./test_data/ ./benchmark-outputs
benchmark-linux-x64:
extends: [".benchmark"]
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:3.14
tags:
- linux
needs:
- linux-x64-gcc9-release-build
- build-python-api
variables:
LIB_WHEEL_GLOB: "lib_pod5*cp314*.whl"
benchmark-linux-aarch64:
extends: [".benchmark"]
image: ${CI_REGISTRY}/traque/ont-docker-base/ont-base-python:3.14
tags:
- linux_aarch64
- high-cpu
needs:
- linux-aarch64-gcc9-release-build
- build-python-api
variables:
LIB_WHEEL_GLOB: "lib_pod5*cp314*.whl"
# ======================================
#
# Fuzz tests and coverage reports
#
# ======================================
.generic-linux-x64-gcc11-build:
stage: build
image: external-docker.artifactory.oxfordnanolabs.local/ubuntu:jammy
tags:
- linux
variables:
CONAN_PROFILE: "linux-x86_64-gcc11.jinja"
CONAN_PROFILE_CPPSTD: 20
CMAKE_BUILD_TYPE: Release
needs:
- "prepare_version"
script:
# Install requirements.
- apt-get update
- apt-get install -y pip
- pip install -U pip 'conan<2' auditwheel build "cmake==${CMAKE_VERSION}"
- conan config install --verify-ssl=no ${CONAN_CONFIG_URL}
# Setup build.
- pod5_version="$(cmake -P ci/get_tag_version.cmake 2>&1)"
- mkdir -p build
- pushd build
# Tell conan that it's OK to use libstdc++ settings.
- conan install
--profile ${CONAN_PROFILE}
-s compiler.libcxx=libstdc++11
-s compiler.cppstd=${CONAN_PROFILE_CPPSTD}
-s build_type=${CMAKE_BUILD_TYPE}
-o arrow:with_boost=False
-o arrow:with_thrift=False
-o arrow:parquet=False
..
- cmake
-D CMAKE_TOOLCHAIN_FILE=build/generators/conan_toolchain.cmake
-D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-D BUILD_PYTHON_WHEEL=OFF
${CMAKE_EXTRA_ARGS}
..
# Do the build
- cmake --build . --config ${CMAKE_BUILD_TYPE} --parallel
- popd
linux-x64-gcc11-fuzz:
extends: .generic-linux-x64-gcc11-build
allow_failure: true
variables:
CC: clang
CXX: clang++
CMAKE_EXTRA_ARGS: "-D ENABLE_FUZZERS=ON -D FUZZER_RUN_TIME=600"
script:
# We need clang for libFuzzer.
- apt-get update
- apt-get install -y clang
# Do the build.
- !reference [".generic-linux-x64-gcc11-build", "script"]
# Remove the zipped corpora now that we've extracted it, since we
# don't need it artifacted.
- rm fuzz/*.zip
# Run the tests.
- ctest -C Release --test-dir build -VV -R ${FUZZER_TEST}
parallel:
matrix:
- FUZZER_TEST:
- "compress"
- "file"
artifacts:
# Artifact everything in /fuzz so that we can get to any new/failing corpora.
when: always
paths:
- ./fuzz
linux-x64-gcc11-coverage:
extends: .generic-linux-x64-gcc11-build
variables:
CMAKE_BUILD_TYPE: "Debug"
CMAKE_EXTRA_ARGS: "-D POD5_DISABLE_TESTS=OFF -D ENABLE_COVERAGE_REPORT=ON"
script:
# We need a venv.
- apt-get update
- apt-get install -y python3-venv
# Do the build.
- !reference [".generic-linux-x64-gcc11-build", "script"]
# Run the coverage report.
- ./ci/generate_coverage_report.sh build
coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+(?:\.\d+)?\%)$/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage-report-*.xml
paths:
# Artifact the human readable ones too.
- coverage-report-*.html
# ======================================
#
# Conan
#
# ======================================
.setup-venv:
- KERNEL=$(uname -s)
- if [[ ! ${KERNEL} =~ "Linux" ]]; then
# Must use an explicit version here otherwise we get the windows store one.
# Can be any version since it's only for installing conan.
- python3.13 -m venv .venv
- source .venv/*/activate
- fi
.reset-line-endings:
# This is needed to enforce LF line-endings in the pybind submodule
# otherwise conan generates different revisions for windows and unix
- re='^(MINGW|CYGWIN|MSYS).*'
- if [[ $(uname -s) =~ $re ]]; then
- git rm -rf :/
- git checkout HEAD -- :/
- fi
.conan-setup-common:
- !reference [".reset-line-endings"]
- !reference [".setup-venv"]
- pip install 'conan<2'
- conan --version
- VERSIONS="$(cmake -P ci/get_tag_version.cmake 2>&1)"
.conan-build-common:
stage: build-conan
dependencies:
- "prepare_version"
before_script:
- !reference [".conan-setup-common"]
- conan remove "*" -f
- conan config install --verify-ssl=no "${CONAN_CONFIG_URL}"
.conan2-common:
before_script:
- !reference [".reset-line-endings"]
- !reference [".setup-venv"]
- pip install --upgrade conan
- conan --version
- conan remove "*" --confirm
- conan config install --verify-ssl=no "${CONAN2_CONFIG_URL}"
.conan2-build:
extends: .conan2-common
stage: build-conan
dependencies:
- "prepare_version"
script:
- version=$(cmake -P ci/get_tag_version.cmake 2>&1 | cut -d. -f1-3)
# set up the correct ref
- opts=("--version=${version}" --user=nanopore --channel=stable)
# fail if we can't find dependencies
- opts+=("--build=pod5_file_format/*")
# select the build profile
- opts+=(-pr:a "${PROFILE_BASE}")
# use the arrow packages we have built
- opts+=('-o:a=arrow/*:with_thrift=False' '-o:a=arrow/*:parquet=False' '-o:a=arrow/*:with_zstd=True' '-o:a=arrow/*:with_boost=False')
- echo "Running conan create . ${opts[@]}"
- conan create . "${opts[@]}"
- conan cache save "*/*:*" --file=conan-${CI_JOB_ID}.tgz
variables:
# use an arrow package that doesn't use Boost, even on Windows
CONAN_MANUAL_OVERRIDES: "arrow/*:arrow/18.0.0@nanopore/noboost"
CONAN_PROFILE_CPPSTD: "20"
artifacts:
paths:
- 'conan-*.tgz'
parallel:
matrix:
- CONAN_PROFILE_BUILD_TYPE: ["Debug", "Release"]
.conan2-upload:
extends: .conan2-common
stage: deploy
#only: ["tags"]
script:
- for f in conan-*.tgz; do conan cache restore "$f"; done
- conan remote auth ONT-Conan-V2 --force
- conan upload "*:*" --check --confirm --remote=ONT-Conan-V2 --dry-run
.conan-upload:
extends: .upload-package # from informatics/conan-config
stage: deploy
only: ["tags"]
before_script:
- pip install "cmake==${CMAKE_VERSION}"
- !reference [".conan-setup-common"]
variables:
EXPECTED_PACKAGE_COUNT: "4" # Expect shared and static packages
# Conan: build and upload packages:
build-conan:windows-x86_64-vs2019:
extends:
- .profile-windows-x86_64-vs2019
- .build-package-win
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version", "win-x64-msvc2019-release-build"]
upload-conan:windows-x86_64-vs2019:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:windows-x86_64-vs2019" ]
build-conan2:windows-x86_64-vs2019:
extends:
- .conan2-build
- .profile-windows-x86_64-vs2019-conan2
needs: ["prepare_version", "win-x64-msvc2019-release-build"]
upload-conan2:windows-x86_64-vs2019:
extends:
- .conan2-upload
- .profile-windows-x86_64-vs2019-conan2
dependencies: [ "prepare_version", "build-conan2:windows-x86_64-vs2019" ]
build-conan:macos-aarch64-appleclang-15.0:
extends:
- .profile-macos-aarch64-appleclang-15.0
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version", "osx-arm64-clang15-release-build"]
upload-conan:macos-aarch64-appleclang-15.0:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:macos-aarch64-appleclang-15.0" ]
build-conan:macos-aarch64-appleclang-16.0:
extends:
- .profile-macos-aarch64-appleclang-16.0
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:macos-aarch64-appleclang-16.0:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:macos-aarch64-appleclang-16.0" ]
build-conan2:macos-aarch64-appleclang-15.0:
extends:
- .profile-macos-aarch64-appleclang-15.0-conan2
- .conan2-build
needs: ["prepare_version", "osx-arm64-clang15-release-build"]
upload-conan2:macos-aarch64-appleclang-15.0:
extends:
- .profile-macos-aarch64-appleclang-15.0-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:macos-aarch64-appleclang-15.0" ]
build-conan2:macos-aarch64-appleclang-16.0:
extends:
- .profile-macos-aarch64-appleclang-16.0-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:macos-aarch64-appleclang-16.0:
extends:
- .profile-macos-aarch64-appleclang-16.0-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:macos-aarch64-appleclang-16.0" ]
build-conan:linux-x86_64-gcc11:
extends:
- .profile-linux-x86_64-gcc11
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc11:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc11" ]
build-conan2:linux-x86_64-gcc11:
extends:
- .profile-linux-x86_64-gcc11-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-x86_64-gcc11:
extends:
- .profile-linux-x86_64-gcc11-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-x86_64-gcc11" ]
build-conan2:linux-x86_64-gcc11-asan-static:
extends:
- .profile-linux-x86_64-gcc11-asan-static-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-x86_64-gcc11-asan-static:
extends:
- .profile-linux-x86_64-gcc11-asan-static-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-x86_64-gcc11-asan-static" ]
build-conan2:linux-x86_64-gcc11-usan-static:
extends:
- .profile-linux-x86_64-gcc11-usan-static-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-x86_64-gcc11-usan-static:
extends:
- .profile-linux-x86_64-gcc11-usan-static-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-x86_64-gcc11-usan-static" ]
build-conan2:linux-x86_64-gcc11-tsan-static:
extends:
- .profile-linux-x86_64-gcc11-tsan-static-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-x86_64-gcc11-tsan-static:
extends:
- .profile-linux-x86_64-gcc11-tsan-static-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-x86_64-gcc11-tsan-static" ]
build-conan:linux-x86_64-gcc13:
extends:
- .profile-linux-x86_64-gcc13
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc13:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc13" ]
build-conan2:linux-x86_64-gcc13:
extends:
- .profile-linux-x86_64-gcc13-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-x86_64-gcc13:
extends:
- .profile-linux-x86_64-gcc13-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-x86_64-gcc13" ]
build-conan:linux-x86_64-gcc11-asan-static:
extends:
- .profile-linux-x86_64-gcc11-asan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc11-asan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc11-asan-static" ]
build-conan:linux-x86_64-gcc13-asan-static:
extends:
- .profile-linux-x86_64-gcc13-asan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc13-asan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc13-asan-static" ]
build-conan:linux-x86_64-gcc11-tsan-static:
extends:
- .profile-linux-x86_64-gcc11-tsan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc11-tsan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc11-tsan-static" ]
build-conan:linux-x86_64-gcc13-tsan-static:
extends:
- .profile-linux-x86_64-gcc13-tsan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc13-tsan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc13-tsan-static" ]
build-conan:linux-x86_64-gcc11-usan-static:
extends:
- .profile-linux-x86_64-gcc11-usan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc11-usan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc11-usan-static" ]
build-conan:linux-x86_64-gcc13-usan-static:
extends:
- .profile-linux-x86_64-gcc13-usan-static
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-x86_64-gcc13-usan-static:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-x86_64-gcc13-usan-static" ]
build-conan:linux-aarch64-gcc11:
extends:
- .profile-linux-aarch64-gcc11
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-aarch64-gcc11:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-aarch64-gcc11" ]
build-conan2:linux-aarch64-gcc11:
extends:
- .profile-linux-aarch64-gcc11-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-aarch64-gcc11:
extends:
- .profile-linux-aarch64-gcc11-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-aarch64-gcc11" ]
build-conan:linux-aarch64-gcc13:
extends:
- .profile-linux-aarch64-gcc13
- .build-package
- .conan-build-common
- .build-shared-and-static
needs: ["prepare_version"]
upload-conan:linux-aarch64-gcc13:
extends: .conan-upload
dependencies: [ "prepare_version", "build-conan:linux-aarch64-gcc13" ]
build-conan2:linux-aarch64-gcc13:
extends:
- .profile-linux-aarch64-gcc13-conan2
- .conan2-build
needs: ["prepare_version"]
upload-conan2:linux-aarch64-gcc13:
extends:
- .profile-linux-aarch64-gcc13-conan2
- .conan2-upload
dependencies: [ "prepare_version", "build-conan2:linux-aarch64-gcc13" ]
# ======================================
#
# Archive
#
# ======================================
build-archive:
stage: archive
needs:
- linux-x64-gcc9-release-build
- linux-aarch64-gcc9-release-build
- osx-arm64-clang15-release-build
- win-x64-msvc2019-release-build
- build-python-api
script:
- find .
artifacts:
name: "${CI_JOB_NAME}-artifacts"
paths:
- ./*.tar.gz
- ./*.whl
# ======================================
#
# Deploy
#
# ======================================
internal_wheel_upload:
stage: deploy
image: ${UPLOAD_PYTHON_IMAGE}
needs:
- build-archive
script:
- ls -lh .
- pip install twine
- twine upload *.whl pod5*.tar.gz
only: ["tags"]
when: manual
external_wheel_upload:
stage: deploy
image: ${UPLOAD_PYTHON_IMAGE}
needs:
- build-archive
script:
- ls -lh .
- pip install twine
- unset TWINE_REPOSITORY_URL
- unset TWINE_CERT
- twine upload lib*.whl -u __token__ -p"${EXTERNAL_LIB_POD5_PYPI_KEY}"
- twine upload pod5*.whl pod5*.tar.gz -u __token__ -p"${EXTERNAL_POD5_PYPI_KEY}"
only: ["tags"]
when: manual
# ======================================
#
# MLHub Testing
#
# ======================================
mlhub:
stage: deploy
image: ${MLHUB_TRIGGER_IMAGE}
needs: ["build-archive"]
variables:
GIT_STRATEGY: none
script:
- |
curl -i --header "Content-Type: application/json" \
--request POST \
--data '{
"key": "'${MLHUB_TRIGGER_KEY}'",
"job_name": "POD5-CI '${CI_COMMIT_REF_NAME}' - '"$CI_COMMIT_TITLE"' ",
"script_parameters": {
"mode":"artifact",
"source":"'${CI_COMMIT_SHA}'"
"python_ver":"'${PYTHON_VERSION}'"
}
}' \
${MLHUB_TRIGGER_URL}
when: manual
extends:
- .parallel-py-versions
================================================
FILE: .gitmodules
================================================
[submodule "third_party/pybind11"]
path = third_party/pybind11
url = https://github.com/pybind/pybind11.git
branch = stable
================================================
FILE: .pre-commit-config.yaml
================================================
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-case-conflict
- id: check-merge-conflict
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: 'third_party/'
- repo: https://github.com/PyCQA/flake8
rev: 7.2.0
hooks:
- id: flake8
exclude: docs/conf.py
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v20.1.4'
hooks:
- id: clang-format
exclude: 'third_party/'
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.15.0'
hooks:
- id: mypy
files: 'python/pod5/src/'
args: [ --check-untyped-defs, --ignore-missing-imports ]
additional_dependencies:
- types-Deprecated
- types-setuptools
- types-pytz
# NB: by default, pre-commit only installs the pre-commit hook ("commit" stage),
# but you can tell `pre-commit install` to install other hooks.
# This set of default stages ensures we don't slow down or break other git operations
# even if you install hooks for them.
default_stages:
- pre-commit
- pre-merge-commit
- manual
# vi:et:sw=2:sts=2:
================================================
FILE: .readthedocs.yaml
================================================
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build all formats
formats: all
# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.10"
jobs:
pre_build:
- python -c "import pod5; print(pod5.__version__)"
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
================================================
FILE: CHANGELOG.md
================================================
<!-- markdownlint-disable MD024 -->
# Changelog
All notable changes, updates, and fixes to pod5 will be documented here
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.3.39]
### Fixed
- Fix python bindings build without Conan.
### Changed
- CI Stabilisation
## [0.3.38]
### Changed
- CI Stabilisation
## [0.3.37]
### Changed
- Use standard file IO to read POD5 header and footer metadata before memory mapping (if not disabled e.g. `POD5_DISABLE_MMAP_OPEN=1`). This should to avoid SIGBUS errors caused by memory mapping file stubs (archive artefacts).
- Improve file_reader_writer unit-tests robustness
- Scale number of open input file handles during pod5 subset / filter by the system limits and number of output files.
### Fixed
- Fixed bug where invalid read ids could be passed into pod5 subset via summary table.
- Fixed bug where invalid read ids in `DatasetReader.reads` selection could return valid read records.
- Fixed bug in CI where the python venv was not activated resulting in incorrect conan version being used.
## [0.3.36]
### Added
- Added missing licence files.
### Removed
- Removed Python 3.9 and macOS 10.15 support since they're EOL.
## [0.3.35]
### Added
- Python 3.14 support
### Removed
- Removed sphinx-style python docstrings references
- Removed most documentation as part of migration to <https://software-docs.nanoporetech.com/pod5>
- Deprecated `--duplicate-ok` argument from pod5 tools - duplicating reads is now always invalid.
### Changed
- Moved filter + subset implementation into C++ for improved performance.
- Performance improvements to `pod5 view` especially when reading read ids from large files.
- Updated polars version from "~=1.20,<1.32" to "~= 1.30"
- Switch to uv for managing CI python environments
- Updated to pyarrow 22.0.0
## [0.3.34]
### Added
- `open_pore_level` to `pod5 inspect read`
### Changed
- Fixed migration behaviour on nfs systems, where migrated tables could be left orphaned on disk.
- Limited polars install version to "~=1.20,<1.32" following breaking changes
- Tidied up how tmp files are named, used a larger set of numbers for naming.
## [0.3.33]
### Added
- Added Conan 2 CI
### Changed
- Reduced virtual memory usage when opening POD5 files by 75%.
- Python API now memory maps inner tables using the `mmap.mmap` `offset` and `length` arguments directly instead of taking a slice of the whole file.
## [0.3.32]
### Added
- Option to allow users of C++ API to not keep file handles open if required.
### Changed
- Order of `pod5 view` is backwards compatible with 0.3.30, new `open_pore_level` field is at the end of the list.
## [0.3.31]
### Added
- Added new field `open_pore_level`, containing the level of the open pore as tracked by MinKNOW for this channel/well.
### Removed
- Deprecated support for unused read scaling values "tracked_scaling_scale", "tracked_scaling_shift", "predicted_scaling_scale", "predicted_scaling_shift", "num_reads_since_mux_change" and "time_since_mux_change". These will be removed from stored data and writer API in 0.4.0, with accessing API remaining in place until 0.5.0.
## [0.3.30]
### Changed
- Build with sanitization on GCC13
### Removed
- Dropped incorrect sanitized conan jobs.
## [0.3.29]
### Removed
- Dropped support for macOS x86
## [0.3.28]
### Changed
- Additional testing for Linux file access.
## [0.3.27]
### Fixed
- Fixed some crashes when parsing corrupt POD5 files.
- Fixed missing error handling when the C API is called incorrectly.
- Fixed and clarified C API thread safety.
- Fall back to regular IO if direct IO is requested, but file opening fails.
### Removed
- Dropped automated ARM+GCC8 builds.
### Changed
- Bumped polars to next major version (`~= 1.20`).
## [0.3.26]
### Changed
- The read end reason now includes paused - for reads that ended because acquisition was paused.
## [0.3.25]
### Changed
- Python 3.8 wheels are no longer built for Windows or macOS (Python 3.8 is end-of-life).
- Better error messages and testing of file recovery.
### Added
- Conan pod5 builds with address, thread and undefined behaviour sanitizer support.
- Added fuzz testing.
- New option cleanup temporary files after file recovery.
## [0.3.24]
### Changed
- Update to arrow 18 for the cpp library.
### Fixed
- Flush `pod5 view` header to prevent issue on Windows systems where header would not be on top.
## [0.3.23]
### Changed
- Removed use of python `build` when building wheel in cmake.
## [0.3.22]
### Added
- `ArrowTableHandle` `stream` member to store the `BatchFileReader` backend
- `ArrowTableHandle` `options` argument to pass in `IpcReadOptions`
- `pod5::default_memory_pool` function which selects an appropriate memory pool even on large page systems.
### Changed
- Refactored Multi-threading in `DatasetReader` to prevent too many open files errors
- Updated dependency to `pyarrow~=18.0.0` for `python>=3.9`
- Relaxed h5py python dependency
## [0.3.21]
### Added
- Support for python 3.13.
### Changed
- Removed use of Boost. This does not affect the C interface, but may require changes to
consumers of the C++ headers.
## [0.3.20]
### Changed
- Refactored directio writing engine to open up async io support.
- Fixed Boost version compatibility checking in Conan packages.
## [0.3.19]
### Added
- New end reason for reads terminated due to an analysis configuration change.
### Changed
- Reduced allocations when compressing signal.
### Fixed
- Crash when searching empty file for reads.
## [0.3.18]
### Added
- Ability to disable flushing on batch complete
- Use new LinuxOutputStream to cache allocations and reduce memory when writing many files.
## [0.3.17]
### Changed
- Move svb headers to correct subdirectory in
## [0.3.16]
### Added
- svb16 headers packaged with pod5
### Changed
- Directio output now writes on batch complete without flushing explicitly.
## [0.3.15]
### Added
- Added new end reasons "api_request" and "device_data_error" to allow for new read end reasons future minknow versions will generate.
- Allow directio to specify the chunk size directly.
## [0.3.14]
### Added
- gcc8 builds
## [0.3.13]
### Fixed
- Instability when creating a pod5 writer fails.
- Issue with directio mode where space is over reserved.
## [0.3.12]
### Fixed
- Fixed issues reading signal from uncompressed pod5 files.
## [0.3.11]
### Added
- Typechecking on `Writer.add_reads` to inform users incorrectly passing `ReadRecords`
- Compatibility with numpy 2.0.
### Fixed
- `DatasetReader` correctly handles string paths
## [0.3.10]
### Added
- Required pypa project metadata.
### Removed
- Dropped support OSX builds for XCode < 14.2.
## [0.3.9]
### Fixed
- `ReadRecord.to_read()` missing fields
## [0.3.8]
### Fixed
- Conan windows upload jobs failure due to using different line endings.
## [0.3.7]
### Fixed
- CI package uploading to PyPi following [API token migration](https://pypi.org/help/#apitoken).
- Documentation for some functions.
- Explicitly sized type in `pod5_vbz_decompress_signal()`.
- CI execution of tests.
### Changed
- Updated `pre-commit` to `clang-format-17`.
- Updated Arrow to 12.0.0.
## [0.3.6]
### Fixed
- Polars `ColumnNotFoundError: not_set` introduced by `polars==0.20.0`
## [0.3.5]
### Fixed
- Arrow build flags in conanfile are now configured in the configure() fnc rather than being default options.
## [0.3.4]
### Added
- boost_internal_build flag in conanfile.
- CI now builds with the above flag turned on.
## [0.3.3]
### Added
- CI for appleclang 14
- cppstd builds
## [0.3.2]
### Added
- Support for Python 3.12
## [0.3.1] 2023-11-10
### Fixed
- Logging no longer calls `basicConfig` which may unintentionally edit users logging configuration
## [0.3.0] 2023-11-07
### Changed
- Transfers dataframes used in subsetting / filter use categorical fields to reduce memory consumption
- Polars version increased to `~=0.19`
- Documentation regarding positional arguments
- Renamed deprecated `polars.groupby` to `polars.group_by`
### Fixed
- Fixed a bug in the build scripts that prevented iOS and Windows Conan packages from being uploaded.
- Remove exposed artifactory URL env var from gitlab ci config.
- `convert to_fast5` writes byte encoded read_ids to match Minkow (was `str`)
### Removed
- Removed python3.7 support
## [0.2.9] 2023-11-02
### Fixed
- Corrected the visibility of dependencies when building pod5 as a shared library.
## [0.2.8] 2023-11-01
### Added
- Added compression status to `pod5 inspect summary <file>`
- Added environment override "POD5_DISABLE_MMAP_OPEN" to force non-mmapped opening of files.
### Fixed
- Remove exposed artifactory URL env var from gitlab ci config.
- `convert to_fast5` writes byte encoded read_ids to match Minkow (was `str`)
## [0.2.7] 2023-09-11
### Added
- `DatasetReader` class for reading collections of pod5 files
- Return index errors when querying invalid errors from API's
### Changed
- Recursive search for files now traverses symbolic links and ignores hidden files
- Tweak block size of directio writes to 1MB.
## [0.2.6] 2023-09-04
### Changed
- Write pod5 files using DirectIO on Linux platforms (performance)
## [0.2.5] 2023-08-01
### Added
- Shared builds to conan
### Fixed
- `num_minknow_events` field description from `int8` to `uint64`
- `ReadRecord.num_minknow_events` return type-hint from `float` to `int`
## [0.2.4] 2023-07-13
### Changed
- Increased `numpy` minimum version to `>= 1.21.0`
- Improved performance of `subset`, `filter` and `merge` tools.
- `Repacker.wait` and `Repacker.waiter` parameters
### Deprecated
- `Repacker.wait` and `Repacker.waiter` some parameters are deprecated and issue `FutureWarning`
### Fixed
- `Repacker.is_complete` returning `True` when work is queued.
## [0.2.3] 2023-06-26
### Added
- Add API (pod5_open_file_options) to prevent pod5 from opening a file using mmap, instead using direct file IO.
- Default field values (empty string) when converting fast5 files with missing fields
### Changed
- Corrected Oxford Nanopore Technologies company name in package metadata to use Public Limited Company (Plc) instead of Limited (Ltd)
- Limited the number of processes created when specifying `--threads` to the number of cpu cores available `os.cpu_count()`
- Reduced the default value for `--threads` from 8 to 4 to improve stability on resource constrained systems
## [0.2.2] 2023-06-06
### Fixed
- Add API error when adding reads with invalid end reason, pore type or run info.
## [0.2.1] 2023-05-25
### Changed
- Update internal arrow lib to not export flatbuffers symbols.
## [0.2.0] 2023-05-18
### Added
- `pod5 view` tool to view / inspect pod5 files as tables. Gives a >200x speed improvement compared to `pod5 inspect reads`
- `pod5 recover` tool to recover data from corrupted / truncated pod5 files
- `pod5 update` documentation
- source distributions to pypi
### Changed
- `pod5 subset` and `pod5 filter` uses `polars` to parse inputs
- `pod5 subset` and `pod5 filter` csv formatting requirements tightened
- `pod5` tools which use multiple pod5 file inputs now accept directories which can be searched recursively with `-r/--recursive`
- `pod5 subset` `--read-id-column` argument abbreviateion `-r` change to `-R` to allow `-r/--recursive` to be consistent for all tools
- `pod5` tools use hyphens in all arguments (e.g. `--force-overwrite` and `--read-id-column`)
- `pod5 merge` and `pod5 update` uses named `-o/--output` argument instead of positional `output` argument to standardise tools
- `pod5 update` progress bar and better detection of name conflicts
- Minimised number of open file handles in tools to prevent `Too many open files` error
- Logging added to `merge`, `filter` and `subset`. Enabled with `POD5_DEBUG=1`
### Deprecated
- `pod5 inspect reads` deprecated in-favour of `pod5 view`
### Fixed
- Exception raised when calling `pod5` without any arguments
- Exception raised in `pod5 convert fast5` where closed writers were reopened after being closed by a caught exception
- Fixed Gitlab 38, pod5_get_end_reason and pod5_get_pore_type ignoring input string length checks.
### Removed
- `pod5 subset` `--json` mapping arguments
- `pod5 merge` `--chunk-size` argument
- `ReadTableVersion` replaced with an integer value
## [0.1.21] 2023-04-27
### Fixed
- Repacker `reads_completed` value while copying a selection of reads.
- Fixed crash when trying to load files with a bad footer.
## [0.1.20] 2023-04-20
### Fixed
- Fixed merging many files running out the size limit of dictionary indices.
## [0.1.19] 2023-04-14
### Changed
- `pod5 convert fast5` now creates logs when `POD5_DEBUG=1` set
- `pod5 convert fast5` checks multi-read fast5s at conversion time
### Fixed
- Fixed memory usage growth over time as signal was loaded with large pod5 files.
- Fixed crash loading malicious files (found via fuzz testing)
- Fixed leaks and UB when running unit tests.
- Fixed run-away memory consumption during fast5 conversion
## [0.1.17] 2023-04-06
### Changed
- Updated internal arrow version to 8.0.0.3
## [0.1.16] 2023-04-06
### Fixed
- Fixed issue where pod5 would read out of bounds memory when decompressing some reads.
## [0.1.15] 2023-03-31
### Changed
- Refactored `pod5 convert fast5` to use `concurrent.futures` only.
- Add further info to error message when signal cannot be decompressed by zstd
- Make merge operation not generate multiple identical run infos.
### Fixed
- Fixed closing uninitialised file handles.
- Fixed `pod5 inspect reads` repeating header
- Fixed a crash with certain pod5 search operations.
## [0.1.13] 2023-03-23
### Fixed
- Fix loading large pod5 files on virtual-memory limited systems.
## [0.1.12] 2023-03-20
### Added
- Added `--output` argument to `pod5 convert fast5` and `to_fast5` replacing positional argument of the same name
- Added `--strict` argument to `pod5 convert fast5` to promptly stop on exceptions
- Added readthedocs documentation links in README.md
### Changed
- Updated developer installation instructions to use `conan<2`
- Reworked `pod5 convert fast5` to tolerate runtime exceptions
- Use same type `run_info_index_t` for `pod5_get_file_run_info_count` and `pod5_get_file_run_info`.
### Fixed
- Fixed file handle leak in repacker
## [0.1.11] 2023-03-13
### Added
- Python API supports python 3.11
- Added missing python API wheels on windows
### Changed
- Changed python API dependency version `pyarrow~=11.0.0` from `8.0.0` to support python 3.11
- Changed python API dependency version `hdf5~=8.0.0` from `v7.0.0` to support python 3.11
## [0.1.10] 2023-03-09
### Added
- Added `pod5_get_read_count` to find the count of all reads in file
- Added `pod5_get_read_ids` to retrieve all read id's in file
- Added `pod5_get_file_run_info` to retrieve a run info at an absolute index in the file
- Added `pod5_free_run_info` to free run info's (replaces `pod5_release_run_info`)
- Added `pod5_get_file_run_info_count` to find the number of run info's in a file
- Added `pod5 filter` tool to subset pod5 files with simple list of read ids
- Added `tqdm` progress bar to `pod5 subset` (disable with `POD5_PBAR=0`)
### Changed
- Reworked `pod5 subset` to give better control over resources used
- `pod5 subset` can now parse csv and tsv tables / summaries
- `pod5 repack` now repacks all inputs one-to-one
### Deprecated
- Deprecated `pod5_release_run_info` (see `pod5_free_run_info`)
### Removed
- Removed filepath header line from `pod5 inspect reads`
## [0.1.9] 2023-03-07
### Added
- Added version attributes to `lib-pod5`
### Changed
- Versioning now controlled by VCS inspection using `setuptools_scm`
## [0.1.8] 2023-02-23
### Added
- Added more `read_id` getter methods to `Reader`
- Added support for python 3.8 + 3.10 on windows
- Added gcc7 linux build of pod5
### Changed
- Update to zlib 1.2.13
- Update to zstd 1.5.4
- Pinned `pre-commit=v2.21.0` while supporting `python3.7`
- Reworked `pod5 convert to_fast5` output filenames to allow for `1-1` mapping
### Fixed
- Fixed `pod5 inspect read`
- Fixed `pod5 convert to_fast5` creating an empty fast5 output
- Fixed `pod5 convert to_fast5` ignoring the `--force_overwrite` argument
- Fixed issue where thread_pool.h wasn't shipped.
## [0.1.5] - 2023-01-20
### Added
- Explicitly re-exported `lib-pod5` public symbols and added `py.typed` marker file to support type-checking.
### Fixed
- Fixed issue where closing many pod5 files in sequence is slow.
- Fixed incorrect python types and adopted python type-checking.
## [0.1.4] - 2022-12-22
### Added
- Linux python 3.11 wheels
- ReadTheDocs documentation support
### Fixed
- OSX arm64 wheel naming corrections - works with wider set of python executables
## [0.1.3] - 2022-12-16
### Added
- Added `Reader.__iter__` method.
### Changed
- Renamed `EndReason.name` to `EndReason.reason` to access the inner enum and added
`EndReason.name` as a property to return the string representation of this enum value.
- `BaseRead`, `Read`, `CompressedRead`, `Calibration` and `Pore` dataclasses are now mutable.
### Removed
- Removed deprecated `Writer` functions.
### Fixed
- Fixed osx arm64 wheel compatibility for older python versions.
- Fixed EndReason type errors.
- Fixed EndReason in pod5 to fast5 conversion.
## [0.1.2] - 2022-12-06
### Changed
- Optimised the file writing utilities
## [0.1.1] - 2022-12-06
### Changed
- Restricted exported boost dependencies of conan package to just the boost::headers component.
## [0.1] - 2022-12-02
### Changed
- Documentation edits
- `Writer.add_reads` now handles both `Read` and `CompressedRead`.
### Deprecated
- Deprecated `Writer` methods `add_read_object` and `add_read_objects` for `add_read` and `add_reads` respectively.
### Removed
- Removed direct pod5 tool scripts.
### Fixed
- Fixed name of internal utils - "pad_file".
- Fixed spelling of various internal variables.
- Fixed `pod5 convert to_fast5`
## [0.0.43]
### Changed
- Reformat c++ code with more consistent format file.
## [0.0.42]
### Added
- Added `pod5` tools entry-point
- Added api to query file version information as written on disk.
### Changed
- Fixed signal_chunk_size type error in convert-from-fast5
- Replaced `ont_fast5_api` dependency with `vbz_h5py_plugin`
- Restructured Python packaging to include `lib_pod5_format` which contains the native bindings build from pybind11.
- `pod5_format` and `pod5_format_tools` are now pure python packages which depend on `lib_pod5_format`
- Python packages `pod5_format` and `pod5_format_tools` have been merged into single `pod5` pure-python package.
- `pod5-convert-from-fast5` `--output-one-to-one` reworked so that output files maintain the input structure making this argument more flexible and avoid filename clobbering.
- Added missing `lib_pod5.update_file` function to pyi.
- `pod5-convert-from-fast5` `output` now takes existing directories and
writes `output.pod5` (current behaviour) or creates a new file with the given name if it doesn't exist.
- Renamed arguments in tools relating to multi-processing / multi-threading from `-p/--processes` to the mode common `-t/--threads`.
## [0.0.41] - 2022-10-27
### Changed
- Fixed pod5-inspect erroring when loading data.
- Fixed issue where some files in between 0.34 - 0.38 wouldn't load correctly.
## [0.0.40] - 2022-10-27
### Changed
- Fixed migrating of large files from older versions.
## [0.0.39] - 2022-10-18
### Changed
- Fixed building against the c++ api - previously missing include files.
## [0.0.38] - 2022-10-18
### Changed
- All data in the read table that was previously contained in dictionaries of structs is now stored in the read table, or a new "run info" table.
This change simplifies data access into the pod5 files, and helps users who want to convert the pod5 data to pandas or other arrow-compatible reader formats.
Old data is migrated on load, and will continue to work, data can be permanently migrated using the tool `pod5-migrate`
### Removed
- Support for opening and writing "split" pod5 files. All API's now expect and return combined pod5 files.
## [0.0.37] - 2022-10-18
### Changed
- Updated Conan recipe to support building without specifying C++ standard version.
## [0.0.36] - 2022-10-07
### Changed
- Bump the Boost and Arrow versions to pick up latest changes.
## [0.0.35] - 2022-10-07
### Changed
- Support C++17 + C++20 with the conan package pod5 generates.
## [0.0.34] - 2022-10-05
### Changed
- Modified `pod5_format_tools/pod5_convert_to_fast5.py` to separate `pod5_convert_to_fast5_argparser()` and `convert_from_fast5()` out from `pod5_convert_from_fast5.main()`.
## [0.0.33] - 2022-10-05
### Added
- Added `num_samples` field to read table, containing the total number of samples a read contains. The field is filled in by API if it doesn't exist.
### Changed
- File version is now V2, due to the addition of `num_samples`.
## [0.0.32] - 2022-10-03
### Fixed
- Fixed an issue where multi-threaded access to a single batch could cause a crash discovered by dorado testing.
- Fixed help text in convert to fast5 script.
================================================
FILE: CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.18.0)
project(POD5)
include(${PROJECT_SOURCE_DIR}/cmake/POD5Version.cmake)
set(CMAKE_PROJECT_VERSION ${POD5_NUMERIC_VERSION})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake")
# use compiler cache if available
option(DISABLE_CCACHE "Do not try to use ccache to speed compilation" NO)
if (NOT DISABLE_CCACHE)
find_program(CCACHE_EXECUTABLE ccache
HINTS "C:/Program\ Files/ccache/"
)
if (CCACHE_EXECUTABLE)
message(STATUS "Using ccache: ${CCACHE_EXECUTABLE}")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXECUTABLE}")
endif()
endif()
if (NOT DEFINED ENABLE_CONAN)
option(ENABLE_CONAN "Enable conan for dependency installation" OFF)
endif()
if (NOT DEFINED CONAN2)
option(CONAN2 "Temp flag until we fully migrate to conan2" OFF)
endif()
option(BUILD_SHARED_LIB "Build a shared library" OFF)
option(POD5_DISABLE_TESTS "Disable building all tests" ON)
option(POD5_BUILD_EXAMPLES "Enable building all examples" OFF)
option(ENABLE_ADDRESS_SANITIZER "Enable address sanitizer" OFF)
if (NOT DEFINED ENABLE_POD5_PACKAGING)
option(ENABLE_POD5_PACKAGING "Enable packaging support" ON)
endif()
option(BUILD_PYTHON_WHEEL "Build a python wheel for pod5" OFF)
# debug symbols don't depend on the build type, only on this option
option(DISABLE_DEBUG_SYMBOLS "Force debug symbols to be disabled" OFF)
if (NOT DISABLE_DEBUG_SYMBOLS)
if (MSVC)
# Z7 embeds deubgging info into .obj files, which is easier to manage for
# build accelerators (note that a .pdb will still be generated for libs)
# https://docs.microsoft.com/en-us/cpp/build/reference/z7-zi-zi-debug-information-format
add_compile_options(/Z7)
# this will use fastlink in the IDE and full link from the command link
# https://docs.microsoft.com/en-us/cpp/build/reference/debug-generate-debug-info
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG")
# /DEBUG option is not recognised for STATIC lib linking
elseif (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-g)
endif()
endif()
option(ENABLE_FUZZERS "Build the fuzzers that can be used to catch new issues" OFF)
if (ENABLE_FUZZERS)
include(pod5_fuzz)
endif()
add_compile_definitions(POD5_ENABLE_FUZZERS=$<BOOL:${ENABLE_FUZZERS}>)
option(ENABLE_COVERAGE_REPORT "Executables emit coverage reports" OFF)
if (ENABLE_COVERAGE_REPORT)
if (DISABLE_DEBUG_SYMBOLS)
message(FATAL_ERROR "Debug symbols are required for coverage reports to work")
elseif (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
message(FATAL_ERROR "Only unoptimised builds give reliable coverage reports")
elseif (CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
add_compile_options(--coverage)
add_link_options(--coverage)
else()
message(FATAL_ERROR "Cannot enable coverage on unknown compiler")
endif()
endif()
# FIXME: DISABLE CONDITIONAL TO WORK ON BIONIC
if (ENABLE_CONAN AND CMAKE_COMPILER_IS_GNUCXX AND
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "9.0" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10.0")
# We build POD5 on CentOS 7 in CI, where we have GCC 9 but only the pre-C++11 ABI
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
# This forces GCC 9 on other platforms (eg: Ubuntu Focal) to use the same ABI.
# The main gain here is being able to use the same conan packages.
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)
endif()
if(ENABLE_ADDRESS_SANITIZER)
add_compile_options("-fsanitize=address")
add_link_options("-fsanitize=address")
endif()
include_directories("third_party/include")
foreach (config "Release" "Debug")
string(TOUPPER "${config}" config_upper)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${config_upper} ${CMAKE_BINARY_DIR}/${config}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${config_upper} ${CMAKE_BINARY_DIR}/${config}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${config_upper} ${CMAKE_BINARY_DIR}/${config}/bin)
endforeach()
set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "archive")
include(GenerateExportHeader)
enable_testing()
if (BUILD_PYTHON_WHEEL)
find_package(Python ${PYTHON_VERSION} EXACT COMPONENTS Interpreter Development)
set(PYBIND11_FINDPYTHON ON)
add_subdirectory(third_party/pybind11)
install(
FILES third_party/pybind11/LICENSE
DESTINATION licenses
RENAME pybind11.txt
)
endif()
add_subdirectory(c++)
# The fuzz directory contains both the fuzzers and the regression runners,
# the latter of which can be built as ordinary tests.
if (ENABLE_FUZZERS OR NOT POD5_DISABLE_TESTS)
add_subdirectory(fuzz)
endif()
# Install licenses.
install(
DIRECTORY ${CMAKE_BINARY_DIR}/pod5_conan_licenses/
DESTINATION licenses
)
install(
FILES
LICENSE.md
third_party/licenses/gsl-lite.txt
DESTINATION
licenses
)
if (ENABLE_POD5_PACKAGING)
include(pod5_packaging)
endif()
================================================
FILE: CMakePresets.json
================================================
{
"version": 4,
"include": [
"cmake/presets/conan-provider.json",
"cmake/presets/conan-build-options.json",
"cmake/presets/conan-profiles.json"
],
"configurePresets": [
{
"name": "conan2-linux-gcc9-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc9-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc9-x86_64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc9-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc9-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc9-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc9-x86_64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc9-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc13-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc13-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc13-x86_64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc13-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc13-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc13-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc13-x86_64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc13-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-x86_64-cppstd20-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-x86_64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-asan-static-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-asan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-asan-static-x86_64-cppstd20-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-asan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-usan-static-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-usan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-usan-static-x86_64-cppstd20-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-usan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-tsan-static-x86_64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-tsan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-tsan-static-x86_64-cppstd20-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-tsan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-asan-static-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-asan-static-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-asan-static-x86_64-cppstd17-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-asan-static-x86_64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-usan-static-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-usan-static-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-usan-static-x86_64-cppstd17-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-usan-static-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-tsan-static-x86_64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-tsan-static-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-tsan-static-x86_64-cppstd17-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-tsan-static-x86_64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc13-aarch64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc13-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc13-aarch64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc13-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc13-aarch64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc13-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc13-aarch64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc13-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-aarch64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-aarch64-cppstd20-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc11-aarch64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc11-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc11-aarch64-cppstd17-release",
"hidden": false,
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc11-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc9-aarch64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc9-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc9-aarch64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc9-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-linux-gcc9-aarch64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-gcc9-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-linux-gcc9-aarch64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-gcc9-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-macos-appleclang-15.0-aarch64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-appleclang-15.0-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-macos-appleclang-15.0-aarch64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-appleclang-15.0-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-macos-appleclang-15.0-aarch64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-appleclang-15.0-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-macos-appleclang-15.0-aarch64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-appleclang-15.0-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-macos-appleclang-16.0-aarch64-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-appleclang-16.0-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-macos-appleclang-16.0-aarch64-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-appleclang-16.0-aarch64-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-macos-appleclang-16.0-aarch64-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-appleclang-16.0-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-macos-appleclang-16.0-aarch64-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-appleclang-16.0-aarch64-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-windows-x86_64-vs2019-cppstd17-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-windows-x86_64-vs2019-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-windows-x86_64-vs2019-cppstd17-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-windows-x86_64-vs2019-profile",
"conan2-cppstd17"
]
},
{
"name": "conan2-windows-x86_64-vs2019-cppstd20-debug",
"inherits": [
"conan2-provider",
"conan2-debug",
"conan2-windows-x86_64-vs2019-profile",
"conan2-cppstd20"
]
},
{
"name": "conan2-windows-x86_64-vs2019-cppstd20-release",
"inherits": [
"conan2-provider",
"conan2-release",
"conan2-windows-x86_64-vs2019-profile",
"conan2-cppstd20"
]
}
]
}
================================================
FILE: DEV.md
================================================
Development
===========
If you want to contribute to pod5_file_format, or our pre-built binaries do not meet your platform requirements, you can build pod5 from source using the instructions in `docs/install.rst`.
### Developing
Building the project requires several tools and libraries are available:
- CMake
- Arrow
- Zstd
- Flatbuffers
- Python
- setuptools_scm
```bash
# Docs on installing arrow from here: https://arrow.apache.org/install/
> sudo apt install -y -V ca-certificates lsb-release wget
> wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
> sudo apt install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
> sudo apt update
# Now install the rest of the dependencies:
> sudo apt install cmake libzstd-dev libzstd-dev libflatbuffers-dev libarrow-dev=12.0.1-1
> pip install setuptools_scm~=7.1
# Finally start build of POD5:
> git clone https://github.com/nanoporetech/pod5-file-format.git
> cd pod5-file-format
> git submodule update --init --recursive
> python -m setuptools_scm
> python ./pod5_make_version.py
> mkdir build
> cd build
> cmake ..
> make -j
```
### Pre commit
The project uses pre-commit to ensure code is consistently formatted, you can set this up using pip:
```bash
> pip install pre-commit==v2.21.0
# Install pre-commit hooks in your pod5-file-format repo:
> cd pod5-file-format
> pre-commit install
# Run hooks on all files:
> pre-commit run --all-files
```
Python Development
==================
After completing the required build stages above, to create a Python virtual environment for development follow the instructions below .
```bash
> cd python
> make install
```
================================================
FILE: LICENSE.md
================================================
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
©2021 Oxford Nanopore Technologies PLC.
Mozilla Public License Version 2.0
==================================
### 1. Definitions
**1.1. “Contributor”**
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
**1.2. “Contributor Version”**
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
**1.3. “Contribution”**
means Covered Software of a particular Contributor.
**1.4. “Covered Software”**
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
**1.5. “Incompatible With Secondary Licenses”**
means
* **(a)** that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
* **(b)** that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
**1.6. “Executable Form”**
means any form of the work other than Source Code Form.
**1.7. “Larger Work”**
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
**1.8. “License”**
means this document.
**1.9. “Licensable”**
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
**1.10. “Modifications”**
means any of the following:
* **(a)** any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
* **(b)** any new file in Source Code Form that contains any Covered
Software.
**1.11. “Patent Claims” of a Contributor**
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
**1.12. “Secondary License”**
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
**1.13. “Source Code Form”**
means the form of the work preferred for making modifications.
**1.14. “You” (or “Your”)**
means an individual or a legal entity exercising rights under this
License. For legal entities, “You” includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, “control” means **(a)** the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or **(b)** ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
### 2. License Grants and Conditions
#### 2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
* **(a)** under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
* **(b)** under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
#### 2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
#### 2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
* **(a)** for any code that a Contributor has removed from Covered Software;
or
* **(b)** for infringements caused by: **(i)** Your and any other third party's
modifications of Covered Software, or **(ii)** the combination of its
Contributions with other software (except as part of its Contributor
Version); or
* **(c)** under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
#### 2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
#### 2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
#### 2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
#### 2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
### 3. Responsibilities
#### 3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
#### 3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
* **(a)** such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
* **(b)** You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
#### 3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
#### 3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
#### 3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
### 4. Inability to Comply Due to Statute or Regulation
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: **(a)** comply with
the terms of this License to the maximum extent possible; and **(b)**
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
### 5. Termination
**5.1.** The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated **(a)** provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and **(b)** on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
**5.2.** If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
**5.3.** In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
### 6. Disclaimer of Warranty
> Covered Software is provided under this License on an “as is”
> basis, without warranty of any kind, either expressed, implied, or
> statutory, including, without limitation, warranties that the
> Covered Software is free of defects, merchantable, fit for a
> particular purpose or non-infringing. The entire risk as to the
> quality and performance of the Covered Software is with You.
> Should any Covered Software prove defective in any respect, You
> (not any Contributor) assume the cost of any necessary servicing,
> repair, or correction. This disclaimer of warranty constitutes an
> essential part of this License. No use of any Covered Software is
> authorized under this License except under this disclaimer.
### 7. Limitation of Liability
> Under no circumstances and under no legal theory, whether tort
> (including negligence), contract, or otherwise, shall any
> Contributor, or anyone who distributes Covered Software as
> permitted above, be liable to You for any direct, indirect,
> special, incidental, or consequential damages of any character
> including, without limitation, damages for lost profits, loss of
> goodwill, work stoppage, computer failure or malfunction, or any
> and all other commercial damages or losses, even if such party
> shall have been informed of the possibility of such damages. This
> limitation of liability shall not apply to liability for death or
> personal injury resulting from such party's negligence to the
> extent applicable law prohibits such limitation. Some
> jurisdictions do not allow the exclusion or limitation of
> incidental or consequential damages, so this exclusion and
> limitation may not apply to You.
### 8. Litigation
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
### 9. Miscellaneous
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
### 10. Versions of the License
#### 10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
#### 10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
#### 10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
#### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
## Exhibit A - Source Code Form License Notice
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
## Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.
================================================
FILE: README.md
================================================
[](https://pod5-file-format.readthedocs.io/)
POD5 File Format
================
POD5 File Format
================
POD5 is a file format for storing nanopore dna data in an easily accessible way.
The format is able to be written in a streaming manner which allows a sequencing
instrument to directly write the format.
Data in POD5 is stored using [Apache Arrow](https://github.com/apache/arrow), allowing
users to consume data in many languages using standard tools.
What does this project contain
------------------------------
This project contains a core library for reading and writing POD5 data, and a toolkit for
accessing this data in other languages.
Documentation
-------------
Full documentation is found at https://pod5-file-format.readthedocs.io/
Usage
-----
POD5 is also bundled as a python module for easy use in scripts, a user can install using:
```bash
> pip install pod5
```
This python module provides the python library to write custom scripts against.
Please see [examples](./python/pod5/examples) for documentation on using the library.
The `pod5` package also provides [a selection of tools](./python/pod5/README.md).
Design
------
For information about the design of POD5, see the [docs](./docs/README.md).
Development
-----------
If you want to contribute to pod5_file_format, or our pre-built binaries do not meet your platform requirements, you can build pod5 from source using the instructions in [DEV.md](DEV.md)
================================================
FILE: benchmarks/.gitignore
================================================
*/outputs/
image/*.whl
================================================
FILE: benchmarks/README.md
================================================
POD5 Benchmarks
==============
Building the benchmark environment
----------------------------------
To run benchmarks you first have to build the docker environment to run them:
```bash
> ./build.sh
```
Running a benchmark
-------------------
To run a benchmark, use the helper script to start the docker image:
```bash
> ./run_benchmark.sh convert ./path-to-source-files/
```
Benchmarking Results
--------------------
Note preliminary results
Results run on:
0.0.16 POD5
pyslow5 dev branch (commit 2643310a)
Benchmark numbers are produced using a GridION.
Note the benchmarks are run using python APIs, more work is required on C benchmarks.
## PCR Dataset
On dataset a PCR Zymo dataset PAM50264, on 10.4.1 e8.2 data (`pcr_zymo/20220419_1706_2E_PAM50264_3c6f33f1`):
### File sizes
| pod5 | blow5 | fast5 |
|--------|---------|---------|
| 37G | 37G | 52G |
### Timings
| | pod5 | blow5 | fast5 |
|-------------------------------------|------------|------------|------------|
| convert | 197.5 secs | 241.4 secs | Not Run |
| find all read ids | 10.1 secs | 1.8 secs | 5.2 secs |
| find all samples | 22.3 secs | 82.5 secs | 520.6 secs |
| find selected read ids read number | 1.1 secs | 5.8 secs | 387.1 secs |
| find selected read ids sample count | 1.5 secs | 5.7 secs | 417.8 secs |
| find selected read ids samples | 5.3 secs | 6.4 secs | 465.6 secs |
```* Note blow5 convert times include the index + merge operation```
## InterARTIC Dataset
Dataset available at:
https://github.com/Psy-Fer/interARTIC
### File sizes
| pod5 | blow5 | fast5 |
|--------|---------|---------|
| 3.3G | 3.4G | 6.9G |
### Timings
| | pod5 | blow5 | fast5 |
|-------------------------------------|-----------|-----------|-----------|
| convert | 28.6 secs | 21.0 secs | Not Run |
| find all read ids | 0.5 secs | 0.5 secs | 0.7 secs |
| find all samples | 3.0 secs | 8.0 secs | 73.5 secs |
| find selected read ids read number | 0.4 secs | 1.3 secs | 29.3 secs |
| find selected read ids sample count | 0.6 secs | 1.3 secs | 30.4 secs |
| find selected read ids samples | 1.4 secs | 1.3 secs | 37.8 secs |
```* Note blow5 convert times include the index + merge operation```
================================================
FILE: benchmarks/build.sh
================================================
#!/bin/bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "${script_dir}"
cd image/
docker build -t pod5-benchmark-base -f Dockerfile.base .
================================================
FILE: benchmarks/convert/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
./tools/fast5_to_single_blow5.sh "$input_dir" "$output_dir"
================================================
FILE: benchmarks/convert/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
pod5 convert fast5 "$input_dir" --output "$output_dir"
================================================
FILE: benchmarks/find_all_read_ids/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
tools/pyslow5_tests.py "${input_dir}"/blow5/*.blow5 "${output_dir}" get_all_read_ids
================================================
FILE: benchmarks/find_all_read_ids/run_fast5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
tools/find_and_get_fast5.py "${input_dir}/fast5" "${output_dir}"
================================================
FILE: benchmarks/find_all_read_ids/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
./tools/find_and_get_pod5.py "${input_dir}/pod5" "${output_dir}"
================================================
FILE: benchmarks/find_all_samples/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
tools/pyslow5_tests.py "${input_dir}"/blow5/*.blow5 "${output_dir}" all_values --get-column samples
================================================
FILE: benchmarks/find_all_samples/run_fast5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
tools/find_and_get_fast5.py "${input_dir}/fast5" "${output_dir}" --get-column samples
================================================
FILE: benchmarks/find_all_samples/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
./tools/find_and_get_pod5.py "${input_dir}/pod5" "${output_dir}" --get-column samples
================================================
FILE: benchmarks/find_selected_read_ids_read_number/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/pyslow5_tests.py "${input_dir}"/blow5/*.blow5 "${output_dir}" sample_values --get-column read_number --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_read_number/run_fast5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/find_and_get_fast5.py "${input_dir}/fast5" "${output_dir}" --get-column read_number --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_read_number/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
type_output_dir=$2
full_output_dir=$3
./tools/find_and_get_pod5.py "${input_dir}/pod5" "${type_output_dir}" --get-column read_number --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_sample_count/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/pyslow5_tests.py "${input_dir}"/blow5/*.blow5 "${output_dir}" sample_values --get-column sample_count --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_sample_count/run_fast5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/find_and_get_fast5.py "${input_dir}/fast5" "${output_dir}" --get-column sample_count --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_sample_count/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
type_output_dir=$2
full_output_dir=$3
./tools/find_and_get_pod5.py "${input_dir}/pod5" "${type_output_dir}" --get-column sample_count --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_samples/run_blow5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/pyslow5_tests.py "${input_dir}"/blow5/*.blow5 "${output_dir}" sample_values --get-column samples --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_samples/run_fast5.sh
================================================
#!/bin/bash
input_dir=$1
output_dir=$2
full_output_dir=$3
tools/find_and_get_fast5.py "${input_dir}/fast5" "${output_dir}" --get-column samples --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/find_selected_read_ids_samples/run_pod5.sh
================================================
#!/bin/bash
input_dir=$1
type_output_dir=$2
full_output_dir=$3
./tools/find_and_get_pod5.py "${input_dir}/pod5" "${type_output_dir}" --get-column samples --select-ids "${full_output_dir}/selected_read_ids.csv"
================================================
FILE: benchmarks/image/Dockerfile.base
================================================
FROM ubuntu:20.04
RUN apt update && apt install -y wget python3 python3-pip git libzstd-dev
RUN wget https://github.com/nanoporetech/vbz_compression/releases/download/v1.0.1/ont-vbz-hdf-plugin_1.0.1-1.focal_amd64.deb && apt install -y ./ont-vbz-hdf-plugin_1.0.1-1.focal_amd64.deb && rm ont-vbz-hdf-plugin_1.0.1-1.focal_amd64.deb
COPY ./requirements-benchmarks.txt /
RUN pip install -r /requirements-benchmarks.txt
COPY ./install_slow5.sh /
RUN /install_slow5.sh
ENV PATH="/slow5tools-v0.4.0/:$PATH"
RUN pip install numpy
COPY ./pod5*.whl /
RUN pip install *.whl && rm *.whl
================================================
FILE: benchmarks/image/install_slow5.sh
================================================
#!/bin/bash
set -e
: "${SLOW_5_TOOLS_VERSION:=v1.3.0}"
: "${SLOW_5_LIB_VERSION:=v1.3.1}"
apt update
apt install -y libzstd-dev libhdf5-dev
wget "https://github.com/hasindu2008/slow5tools/releases/download/${SLOW_5_TOOLS_VERSION}/slow5tools-${SLOW_5_TOOLS_VERSION}-release.tar.gz"
tar xvf "slow5tools-${SLOW_5_TOOLS_VERSION}-release.tar.gz"
rm "slow5tools-${SLOW_5_TOOLS_VERSION}-release.tar.gz"
(
cd "slow5tools-${SLOW_5_TOOLS_VERSION}"
./configure
make zstd=1 -j "$(nproc)"
)
# pyslow5 must be built with zstd support for fair comparison (otherwise default zlib is slower than zstd)
git clone -b "${SLOW_5_LIB_VERSION}" https://github.com/hasindu2008/slow5lib
(
cd slow5lib/
echo "Installing numpy"
pip install numpy
make pyslow5 -j "$(nproc)" 2> build_log.txt || (cat build_log.txt && exit)
echo "Installing pyslow5"
PYSLOW5_ZSTD=1 pip install dist/*.tar.gz
# adding slow5 C API benchmarks
make zstd=1 -j "$(nproc)" && test/bench/build.sh
)
================================================
FILE: benchmarks/image/requirements-benchmarks.txt
================================================
h5py
numpy
pandas
tabulate
================================================
FILE: benchmarks/run_benchmarks.py
================================================
#!/usr/bin/env python3
"""
Example usage:
```
> taskset -c 0-10 ./benchmarks/run_benchmarks.py ./input_files/ \
./benchmark-outputs/ --skip-to-benchmark find_all_samples
```
"""
import argparse
import json
import shutil
import subprocess
import time
from collections import namedtuple
from pathlib import Path
import tabulate
Benchmark = namedtuple(
"Benchmark",
["name", "file_types", "checks", "input_benchmark", "pre_run", "post_run_fixup"],
)
BENCHMARK_ROOT = Path(__file__).resolve().parent
POD5_FILE_TYPE = "pod5"
BLOW5_FILE_TYPE = "blow5"
FAST5_FILE_TYPE = "fast5"
ALL_FILE_TYPES = [POD5_FILE_TYPE, BLOW5_FILE_TYPE, FAST5_FILE_TYPE]
def du(path):
"""disk usage in human readable format (e.g. '2,1GB')"""
return subprocess.check_output(["du", "-sh", path]).split()[0].decode("utf-8")
def generate_report(input_dir, output_dir, timing_results):
report = ""
skipped_benchmarks = len(ALL_BENCHMARKS) - len(timing_results)
skipped = ""
if skipped_benchmarks != 0:
skipped = f", skipped {skipped_benchmarks}"
report += f"Ran {len(timing_results)} benchmarks{skipped}\n\n"
report += f"Input data was {input_dir}\n\n"
report += "File sizes\n"
report += "----------\n\n"
convert_output_dir = output_dir / "convert"
sizes = []
for file_type in ALL_FILE_TYPES:
file_type_dir = convert_output_dir / file_type
if file_type_dir.exists:
sizes.append(du(file_type_dir))
else:
sizes.append("Not Run")
report += (
tabulate.tabulate([sizes], headers=ALL_FILE_TYPES, tablefmt="github") + "\n\n"
)
report += "Timings\n"
report += "-------\n\n"
results = []
for benchmark in ALL_BENCHMARKS:
row = [benchmark.name.replace("_", " ")]
results.append(row)
if benchmark.name in timing_results:
timings = timing_results[benchmark.name]
for file_type in ALL_FILE_TYPES:
if file_type in timings:
row.append(f"{timings[file_type]:.1f} secs")
else:
row.append("Not Run")
else:
for file_type in ALL_FILE_TYPES:
row.append("Not Run")
results_headers = [""] + ALL_FILE_TYPES
report += (
tabulate.tabulate(results, headers=results_headers, tablefmt="github") + "\n"
)
return report
def check_read_ids(benchmark, file_types, output_dir, only_format):
if only_format is not None:
print("Not checking read ids - only one format executed")
return
csv_check_files = []
for file_type in file_types:
csv_check_files.append(output_dir / file_type / "read_ids.csv")
for a, b in zip(csv_check_files[1:], csv_check_files):
subprocess.run(
[BENCHMARK_ROOT / "tools" / "check_csvs_consistent.py", a, b], check=True
)
def check_file_sizes(benchmark, file_types, output_dir, only_format):
print("File sizes for output dir")
subprocess.run(["du", "-sh"] + list(output_dir.glob("*")), check=True)
def copy_fast5_files(benchmark, input_dir, output_dir):
shutil.copytree(input_dir, output_dir / "fast5")
def randomly_select_read_ids(benchmark, input_dir, output_dir):
print("Randomly selecting read ids for benchmark")
subprocess.run(
[
BENCHMARK_ROOT / "tools" / "find_and_get_pod5.py",
input_dir / "pod5",
output_dir,
],
check=True,
)
subprocess.run(
[
BENCHMARK_ROOT / "tools" / "select-random-ids.py",
output_dir / "read_ids.csv",
output_dir / "selected_read_ids.csv",
"--select-ratio",
"0.1",
],
check=True,
)
ALL_BENCHMARKS = [
Benchmark(
"convert",
[POD5_FILE_TYPE, BLOW5_FILE_TYPE],
[check_file_sizes],
input_benchmark=None,
post_run_fixup=copy_fast5_files,
pre_run=None,
),
Benchmark(
"find_all_read_ids",
ALL_FILE_TYPES,
[check_read_ids],
input_benchmark="convert",
post_run_fixup=None,
pre_run=None,
),
Benchmark(
"find_all_samples",
ALL_FILE_TYPES,
[check_read_ids],
input_benchmark="convert",
post_run_fixup=None,
pre_run=None,
),
Benchmark(
"find_selected_read_ids_read_number",
ALL_FILE_TYPES,
[check_read_ids],
input_benchmark="convert",
post_run_fixup=None,
pre_run=randomly_select_read_ids,
),
Benchmark(
"find_selected_read_ids_sample_count",
ALL_FILE_TYPES,
[check_read_ids],
input_benchmark="convert",
post_run_fixup=None,
pre_run=randomly_select_read_ids,
),
Benchmark(
"find_selected_read_ids_samples",
ALL_FILE_TYPES,
[check_read_ids],
input_benchmark="convert",
post_run_fixup=None,
pre_run=randomly_select_read_ids,
),
]
def run_benchmark(benchmark, input_dir, output_dir, only_format=None):
if output_dir.exists():
print("Removing old output dir")
shutil.rmtree(output_dir)
file_types = benchmark.file_types if benchmark.file_types else ALL_FILE_TYPES
time_results = {}
if benchmark.pre_run:
benchmark.pre_run(benchmark, input_dir, output_dir)
for file_type in file_types:
if only_format is not None and only_format != file_type:
print(f"## Skipping for file type {file_type}:")
continue
print(f"## Running for file type {file_type}:")
file_type_output_dir = output_dir / file_type
file_type_output_dir.mkdir(exist_ok=True, parents=True)
start = time.time()
subprocess.run(
[
BENCHMARK_ROOT / benchmark.name / f"run_{file_type}.sh",
input_dir,
file_type_output_dir,
output_dir,
],
check=True,
cwd=BENCHMARK_ROOT,
)
end = time.time()
duration_secs = end - start
time_results[file_type] = duration_secs
print(f"## Took {duration_secs:.2f} seconds")
if benchmark.post_run_fixup:
benchmark.post_run_fixup(benchmark, input_dir, output_dir)
if benchmark.checks:
print("## Running checks")
for check in benchmark.checks:
check(benchmark, file_types, output_dir, only_format)
return time_results
def run_benchmarks(args):
timing_results = {}
input_dir = args.input_dir.resolve()
output_dir = args.output_dir.resolve()
skip_list = []
if args.skip_to_benchmark:
found = False
for benchmark in ALL_BENCHMARKS:
if benchmark.name == args.skip_to_benchmark:
found = True
if not found:
skip_list.append(benchmark.name)
for benchmark in ALL_BENCHMARKS:
if benchmark.name in skip_list:
print(f"# Skipping benchmark {benchmark.name}")
continue
print(f"# Running benchmark {benchmark.name}:")
benchmark_input_dir = input_dir
if benchmark.input_benchmark:
benchmark_input_dir = output_dir / benchmark.input_benchmark
timing_results[benchmark.name] = run_benchmark(
benchmark,
benchmark_input_dir,
output_dir / benchmark.name,
args.only_format,
)
report = generate_report(input_dir, output_dir, timing_results)
print(report)
with open(args.output_dir / "timings.json", "w") as f:
f.write(json.dumps(timing_results, indent=2))
with open(args.output_dir / "report.md", "w") as f:
f.write(report)
def main():
parser = argparse.ArgumentParser("Run Benchmarks for POD5 format")
parser.add_argument("input_dir", type=Path)
parser.add_argument("output_dir", type=Path)
parser.add_argument(
"--skip-to-benchmark",
type=str,
help="Start benchmarking from a named benchmark",
)
parser.add_argument(
"--only-format",
type=str,
help="Only run benchmarks for a single format",
)
args = parser.parse_args()
run_benchmarks(args)
if __name__ == "__main__":
main()
================================================
FILE: benchmarks/run_benchmarks_in_docker.sh
================================================
#!/bin/bash
set -e
input_dir=$(readlink -f "$1")
output_dir="$(pwd)/pod5-benchmark-outputs"
mkdir -p "${output_dir}"
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
echo "Running benchmark on input '${input_dir}'"
docker run --rm -it -v"${input_dir}":/input -v"${output_dir}":/outputs -v"${script_dir}"/:/benchmarks pod5-benchmark-base /benchmarks/tools/run_benchmarks_docker_entry.sh
================================================
FILE: benchmarks/tools/check_csvs_consistent.py
================================================
#!/usr/bin/env python3
import argparse
import sys
import pandas as pd
from pandas.testing import assert_frame_equal
def check_consistency(df1, df2):
df1 = df1.sort_values("read_id", ignore_index=True)
df2 = df2.sort_values("read_id", ignore_index=True)
assert_frame_equal(df1, df2)
print("Data frames are consistent")
sys.exit(0)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input_a")
parser.add_argument("input_b")
args = parser.parse_args()
a = pd.read_csv(args.input_a)
b = pd.read_csv(args.input_b)
print(f"Check consistency of files {args.input_a} and {args.input_b}")
check_consistency(a, b)
if __name__ == "__main__":
main()
================================================
FILE: benchmarks/tools/fast5_to_single_blow5.sh
================================================
#!/bin/bash
input_path=$1
output_path=$2
mkdir -p "$output_path"
temp_dir="${output_path}/tmp"
mkdir -p "$temp_dir"
# specific options (-c zstd -s svb-zd) must be provided to slow5tools to create compression comparable to vbz
# also number of processes/threads must be set to 10 to match with default value in pod5_convert
# however, the svb-zd stream variable byte + zig-zag delta implementation in slow5 mirrors
# ONT's previous 32 bit zigzag delta, where as pod5 is using a newer 16 bit zigzag delta with SIMD optimisations
# so pod5 has the added performance benefit of using the newer zigzag delta
# slow5 compression methods are modular, so we can easily add the new one iff necessary
slow5tools f2s "$input_path" -d "$temp_dir" -p 10 -c zstd -s svb-zd
# Most comparable to have one file for both formats:
slow5tools cat "$temp_dir -o $output_path/file.blow5" || slow5tools merge "$temp_dir" -o "$output_path/file.blow5" -t 10 -c zstd -s svb-zd
#if the files are from the same run ID, slow5tools cat can be used, which is significantly faster
#slow5tools cat $temp_dir -o $output_path/file.blow5
rm -r "$temp_dir"
# Index will get generated on first test anyway, we should do it now to give best results later:
# current slow5tools implementation decompresses the whole record for indexing and is not efficient
# the specification supports partial decompress of the record (also signal chunking if necessary)
slow5tools index "$output_path/file.blow5"
================================================
FILE: benchmarks/tools/find_and_get_fast5.py
================================================
#!/usr/bin/env python3
import argparse
from pathlib import Path
import h5py
import numpy
import pandas as pd
def select_reads(file, selection):
if selection is not None:
for read in selection:
path = f"/read_{read}"
if path not in file:
continue
yield read, path
else:
for key in file.keys():
if key.startswith("read_"):
yield key[5:], key
def run(input_dir, output, select_read_ids=None, get_columns=[]):
output.mkdir(parents=True, exist_ok=True)
if select_read_ids is not None:
print(f"Selecting {len(select_read_ids)} specific read ids")
if get_columns is not None:
print(f"Selecting columns: {get_columns}")
read_ids = []
extracted_columns = {"read_id": read_ids}
print(f"Search for input files in {input_dir}")
for file in input_dir.glob("*.fast5"):
print(f"Searching for reads in {file}")
file = h5py.File(file, "r")
for read_id, read_path in select_reads(file, select_read_ids):
read_ids.append(read_id)
for c in get_columns:
if c not in extracted_columns:
extracted_columns[c] = []
col = extracted_columns[c]
if c == "read_number":
col.append(file[f"{read_path}/Raw"].attrs["read_number"])
elif c == "sample_count":
col.append(len(file[f"{read_path}/Raw"]["Signal"]))
elif c == "samples":
col.append(numpy.sum(file[f"{read_path}/Raw"]["Signal"]))
df = pd.DataFrame(extracted_columns)
print(f"Selected {len(read_ids)} items")
df.to_csv(output / "read_ids.csv", index=False)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input", type=Path)
parser.add_argument("output", type=Path)
parser.add_argument(
"--select-ids",
type=str,
help="CSV file with a read_id column, listing ids to find in input files",
)
parser.add_argument(
"--get-column",
default=[],
nargs="+",
type=str,
help="Add columns that should be extracted",
)
args = parser.parse_args()
select_read_ids = None
if args.select_ids:
select_read_ids = pd.read_csv(args.select_ids)["read_id"]
run(
args.input,
args.output,
select_read_ids=select_read_ids,
get_columns=args.get_column,
)
if __name__ == "__main__":
main()
================================================
FILE: benchmarks/tools/find_and_get_pod5.py
================================================
#!/usr/bin/env python3
import argparse
import multiprocessing as mp
import tempfile
from collections import namedtuple
from pathlib import Path
from queue import Empty
import numpy
import pandas as pd
import pod5 as p5
SelectReadIdsData = namedtuple(
"SelectReadIdsData", ["path", "slice_start", "slice_end", "shape"]
)
def load_mapped_ids(select_read_ids_data):
"""Load a set of read ids from a mmapped file on disk"""
select_read_ids_all = numpy.memmap(
select_read_ids_data.path,
dtype=numpy.uint8,
mode="r+",
shape=select_read_ids_data.shape,
)
return select_read_ids_all[
select_read_ids_data.slice_start : select_read_ids_data.slice_end
]
def do_batch_work(filename, batches, column, mode, result_q):
"""
Per process worker to do loading of data from a set of batches
"""
read_ids = []
vals = []
extracted_columns = {"read_id": read_ids, column: vals}
if column == "samples":
file = p5.Reader(filename)
for batch in file.read_batches(batch_selection=batches, preload={"samples"}):
read_ids.extend(p5.format_read_ids(batch.read_id_column))
for read in batch.reads():
vals.append(numpy.sum(read.signal))
else:
print(f"Unknown column {column}")
result_q.put(pd.DataFrame(extracted_columns))
def do_search_work(files, select_read_ids_data, column, mode, result_q):
"""
Per process worker to do loading of data from a number of read ids
"""
select_read_ids = load_mapped_ids(select_read_ids_data)
read_ids = []
vals = []
extracted_columns = {"read_id": read_ids, column: vals}
if column == "samples":
for filename in files:
file = p5.Reader(filename)
for batch in file.read_batches(select_read_ids, preload={"samples"}):
read_ids.extend(p5.format_read_ids(batch.read_id_column))
vals.extend([numpy.sum(s) for s in batch.cached_samples_column])
else:
print(f"Unknown column {column}")
result_q.put(pd.DataFrame(extracted_columns))
def run_multiprocess(files, output, select_read_ids=None, column=None, mode=None):
"""
Do work across a number of python multiprocesses
"""
mp.set_start_method("spawn")
if select_read_ids is not None:
print("Placing select read id data on disk for mmapping:")
numpy_select_read_ids = p5.pack_read_ids(select_read_ids)
# Copy data to memory-map
fp = tempfile.NamedTemporaryFile()
fp.close()
mapped_select_read_ids = numpy.memmap(
fp.name, dtype=numpy.uint8, mode="w+", shape=numpy_select_read_ids.shape
)
numpy.copyto(mapped_select_read_ids, numpy_select_read_ids)
select_read_ids_mmap_path = Path(fp.name)
result_queue = mp.Queue()
runners = 10
processes = []
if select_read_ids is not None:
approx_chunk_size = max(1, len(select_read_ids) // runners)
start_index = 0
while start_index < len(select_read_ids):
select_read_ids_data = SelectReadIdsData(
select_read_ids_mmap_path,
start_index,
start_index + approx_chunk_size,
numpy_select_read_ids.shape,
)
p = mp.Process(
target=do_search_work,
args=(files, select_read_ids_data, column, mode, result_queue),
)
p.start()
processes.append(p)
start_index += approx_chunk_size
else:
for filename in files:
file = p5.Reader(filename)
batches = list(range(file.batch_count))
approx_chunk_size = max(1, len(batches) // runners)
start_index = 0
while start_index < len(batches):
select_batches = batches[start_index : start_index + approx_chunk_size]
p = mp.Process(
target=do_batch_work,
args=(filename, select_batches, column, mode, result_queue),
)
p.start()
processes.append(p)
start_index += len(select_batches)
print("Wait for processes...")
items = []
while len(items) < len(processes):
try:
item = result_queue.get(timeout=0.5)
items.append(item)
except Empty:
continue
for p in processes:
p.join()
return pd.concat(items)
if select_read_ids is not None:
select_read_ids_mmap_path.unlink()
def run_get_read_ids(files):
"""
Load all read ids from the file.
"""
read_ids = []
for filename in files:
file = p5.Reader(filename)
for batch in file.read_batches():
read_ids.extend(p5.format_read_ids(batch.read_id_column))
return pd.DataFrame({"read_id": read_ids})
def run_select(files, select_read_ids, column):
"""
Load column from a specific set of read ids
"""
read_ids = []
vals = []
extracted_columns = {"read_id": read_ids, column: vals}
for filename in files:
file = p5.Reader(filename)
if column == "sample_count":
for batch in file.read_batches(select_read_ids, preload={"sample_count"}):
read_id_selection = batch.read_id_column
read_ids.extend(p5.format_read_ids(read_id_selection))
vals.extend(batch.cached_sample_count_column)
else:
col_name = f"{column}_column"
for batch in file.read_batches(select_read_ids):
read_id_selection = batch.read_id_column
read_ids.extend(p5.format_read_ids(read_id_selection))
read_number_selection = getattr(batch, col_name)
vals.extend(read_number_selection)
return pd.DataFrame(extracted_columns)
def run_batched(files, column):
"""
Load column from a all reads
"""
read_ids = []
vals = []
extracted_columns = {"read_id": read_ids, column: vals}
for filename in files:
file = p5.Reader(filename)
if column == "sample_count":
for batch in file.read_batches(preload={"sample_count"}):
read_ids.extend(p5.format_read_ids(batch.read_id_column))
vals.extend(batch.cached_sample_count_column)
else:
col_name = f"{column}_column"
for batch in file.read_batches():
read_ids.extend(p5.format_read_ids(batch.read_id_column))
vals.extend(getattr(batch, col_name).to_numpy())
return pd.DataFrame(extracted_columns)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input", type=Path)
parser.add_argument("output", type=Path)
parser.add_argument(
"--select-ids",
type=str,
help="CSV file with a read_id column, listing ids to find in input files",
)
parser.add_argument(
"--get-column",
default=None,
type=str,
help="Add column that should be extracted",
)
args = parser.parse_args()
select_read_ids = None
if args.select_ids:
select_read_ids = pd.read_csv(args.select_ids)["read_id"]
if select_read_ids is not None:
print(f"Selecting {len(select_read_ids)} specific read ids")
if args.get_column is not None:
print(f"Selecting column: {args.get_column}")
mode = None
print(f"Search for input files in {args.input}")
files = list(args.input.glob("*.pod5"))
print(f"Searching in {[str(f) for f in files]}")
# Run benchmark using most appropriate method:
if args.get_column is None:
df = run_get_read_ids(files)
elif args.get_column == "samples":
# Because we the "samples" column to be the sum
# of all samples in input data, it is quicker to use
# python multiprocessing to split the summing work:
df = run_multiprocess(
files,
args.output,
select_read_ids=select_read_ids,
column=args.get_column,
mode=mode,
)
elif args.select_ids:
df = run_select(
files,
select_read_ids=select_read_ids,
column=args.get_column,
)
else:
df = run_batched(
files,
column=args.get_column,
)
print(f"Selected {len(df)} items")
args.output.mkdir(parents=True, exist_ok=True)
df.to_csv(args.output / "read_ids.csv", index=False)
if __name__ == "__main__":
main()
================================================
FILE: benchmarks/tools/pyslow5_tests.py
================================================
#!/usr/bin/env python3
import argparse
import multiprocessing as mp
from pathlib import Path
from queue import Empty
import numpy
import pandas as pd
import pyslow5
def random_access(s5_file, read_list, col, result_q):
file = pyslow5.Open(str(s5_file), "r")
print("processing ", s5_file)
read_ids = []
extracted_columns = {"read_id": read_ids}
extracted_columns[col] = []
vals = extracted_columns[col]
if col == "samples":
for read in file.get_read_list_multi(read_list, threads=10, batchsize=5000):
read_ids.append(read["read_id"])
vals.append(numpy.sum(read["signal"]))
elif col == "sample_count":
for read in file.get_read_list_multi(read_list, threads=10, batchsize=5000):
read_ids.append(read["read_id"])
vals.append(read["len_raw_signal"])
else:
for read in file.get_read_list_multi(
read_list, threads=10, batchsize=5000, pA=False, aux=col
):
read_ids.append(read["read_id"])
vals.append(read[col])
result_q.put(pd.DataFrame(extracted_columns))
def run(s5_file, benchmark, select_read_ids, col):
if benchmark == "get_all_read_ids":
read_ids = []
extracted_columns = {"read_id": read_ids}
file = pyslow5.Open(str(s5_file), "r")
print("processing ", s5_file)
read_ids, num_reads = file.get_read_ids()
extracted_columns = {"read_id": read_ids}
elif benchmark == "sample_values":
mp.set_start_method("spawn")
result_queue = mp.Queue()
runners = 10
processes = []
approx_chunk_size = max(1, len(select_read_ids) // runners)
select_ids = []
for i in range(0, len(select_read_ids), approx_chunk_size):
for j in range(i, min(len(select_read_ids), i + approx_chunk_size)):
select_ids.append(select_read_ids[j])
p = mp.Process(
target=random_access, args=(s5_file, select_ids, col, result_queue)
)
p.start()
processes.append(p)
select_ids = []
print("Wait for processes...")
items = []
while len(items) < len(processes):
try:
item = result_queue.get(timeout=0.5)
items.append(item)
except Empty:
continue
for p in processes:
p.join()
df = pd.concat(items)
return df
elif benchmark == "all_values":
read_ids = []
extracted_columns = {"read_id": read_ids}
file = pyslow5.Open(str(s5_file), "r")
print("processing ", s5_file)
extracted_columns[col] = []
vals = extracted_columns[col]
if col == "samples":
for read in file.seq_reads_multi(threads=10, batchsize=5000):
read_ids.append(read["read_id"])
vals.append(numpy.sum(read["signal"]))
elif col == "sample_count":
for read in file.seq_reads_multi(threads=10, batchsize=5000):
read_ids.append(read["read_id"])
vals.append(read["len_raw_signal"])
else:
for read in file.seq_reads_multi(
threads=10, batchsize=5000, pA=False, aux=col
):
read_ids.append(read["read_id"])
vals.append(read[col])
return pd.DataFrame(extracted_columns)
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input", type=Path)
parser.add_argument("output", type=Path)
parser.add_argument(
"benchmark",
type=str,
choices=["get_all_read_ids", "sample_values", "all_values"],
help="which benchmark to run",
)
parser.add_argument(
"--select-ids",
type=str,
help="CSV file with a read_id column, listing ids to find in input files",
)
parser.add_argument(
"--get-column",
default=None,
type=str,
help="Add columns that should be extracted",
)
args = parser.parse_args()
args.output.mkdir(parents=True, exist_ok=True)
select_read_ids = None
select_reads = []
if args.select_ids:
select_read_ids = pd.read_csv(args.select_ids)["read_id"]
for i in select_read_ids:
select_reads.append(i)
print(f"Num of select_reads: {len(select_reads)}")
df = run(
args.input,
args.benchmark,
select_read_ids=select_reads,
col=args.get_column,
)
print(f"Selected {len(df)} items")
df.to_csv(args.output / "read_ids.csv", index=False)
if __name__ == "__main__":
main()
================================================
FILE: benchmarks/tools/run_benchmarks_docker_entry.sh
================================================
#!/bin/bash
# Use taskset to limit benchmarks to specific cores, ensuring a fair test of limited resources:
taskset -c 0-10 /benchmarks/run_benchmarks.py /input /outputs
================================================
FILE: benchmarks/tools/select-random-ids.py
================================================
#!/usr/bin/env python3
import argparse
from pathlib import Path
import pandas as pd
def main():
parser = argparse.ArgumentParser()
parser.add_argument("input_csv", type=Path)
parser.add_argument("output_csv", type=Path)
parser.add_argument("--select-ratio", type=float)
args = parser.parse_args()
df = pd.read_csv(args.input_csv)
selected_rows_df = df.sample(frac=args.select_ratio)
args.output_csv.parent.mkdir(parents=True, exist_ok=True)
selected_rows_df.to_csv(args.output_csv)
if __name__ == "__main__":
main()
================================================
FILE: c++/CMakeLists.txt
================================================
if (ENABLE_CONAN)
find_package(Arrow REQUIRED CONFIG)
find_package(Flatbuffers REQUIRED CONFIG)
find_package(zstd REQUIRED CONFIG)
find_package(ZLIB REQUIRED CONFIG)
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
find_package(jemalloc REQUIRED CONFIG)
endif()
else()
find_package(Arrow REQUIRED)
find_package(Flatbuffers REQUIRED)
find_package(zstd REQUIRED)
find_package(ZLIB REQUIRED)
# Our non-conan ubuntu CI build has a different name for this target
if (NOT CONAN2)
add_library(arrow::arrow INTERFACE IMPORTED)
target_link_libraries(arrow::arrow INTERFACE Arrow::arrow_shared)
endif()
endif()
find_package(Threads REQUIRED)
find_program(
FLATBUFFERS_FLATC_EXECUTABLE
flatc
)
include(BuildFlatBuffers)
configure_file(
pod5_format/version.h.in
pod5_format/version.h
)
set(pod5_library_type STATIC)
if (BUILD_SHARED_LIB)
set(pod5_library_type SHARED)
endif()
add_library(pod5_format ${pod5_library_type}
pod5_format/file_recovery.h
pod5_format/file_writer.cpp
pod5_format/file_writer.h
pod5_format/file_reader.cpp
pod5_format/file_reader.h
pod5_format/file_updater.cpp
pod5_format/file_updater.h
pod5_format/async_signal_loader.cpp
pod5_format/async_signal_loader.h
pod5_format/schema_metadata.cpp
pod5_format/table_reader.h
pod5_format/schema_field_builder.h
pod5_format/read_table_reader.cpp
pod5_format/read_table_reader.h
pod5_format/read_table_schema.cpp
pod5_format/read_table_schema.h
pod5_format/read_table_writer.cpp
pod5_format/read_table_writer.h
pod5_format/read_table_writer_utils.cpp
pod5_format/read_table_writer_utils.h
pod5_format/read_table_utils.cpp
pod5_format/read_table_utils.h
pod5_format/run_info_table_reader.cpp
pod5_format/run_info_table_reader.h
pod5_format/run_info_table_schema.cpp
pod5_format/run_info_table_schema.h
pod5_format/run_info_table_writer.cpp
pod5_format/run_info_table_writer.h
pod5_format/signal_compression.cpp
pod5_format/signal_compression.h
pod5_format/signal_table_reader.cpp
pod5_format/signal_table_reader.h
pod5_format/signal_table_schema.cpp
pod5_format/signal_table_schema.h
pod5_format/signal_table_writer.cpp
pod5_format/signal_table_writer.h
pod5_format/signal_table_utils.h
pod5_format/signal_builder.h
pod5_format/c_api.cpp
pod5_format/c_api.h
pod5_format/expandable_buffer.h
pod5_format/io_manager.cpp
pod5_format/io_manager.h
pod5_format/memory_pool.cpp
pod5_format/memory_pool.h
pod5_format/result.h
pod5_format/schema_utils.cpp
pod5_format/schema_utils.h
pod5_format/table_reader.cpp
pod5_format/table_reader.h
pod5_format/thread_pool.cpp
pod5_format/thread_pool.h
pod5_format/tuple_utils.h
pod5_format/types.cpp
pod5_format/types.h
pod5_format/uuid.h
pod5_format/migration/migration.cpp
pod5_format/migration/migration.h
pod5_format/migration/migration_utils.h
pod5_format/migration/v0_to_v1.cpp
pod5_format/migration/v1_to_v2.cpp
pod5_format/migration/v2_to_v3.cpp
pod5_format/migration/v3_to_v4.cpp
pod5_format/internal/async_output_stream.h
pod5_format/internal/combined_file_utils.h
pod5_format/internal/linux_output_stream.h
pod5_format/svb16/common.hpp
pod5_format/svb16/decode.hpp
pod5_format/svb16/decode_scalar.hpp
pod5_format/svb16/decode_x64.hpp
pod5_format/svb16/encode.hpp
pod5_format/svb16/encode_scalar.hpp
pod5_format/svb16/encode_x64.hpp
pod5_format/svb16/intrinsics.hpp
pod5_format/svb16/shuffle_tables.hpp
pod5_format/svb16/simd_detect_x64.hpp
)
set(public_headers)
list(APPEND public_headers
pod5_format/file_writer.h
pod5_format/file_reader.h
pod5_format/schema_metadata.h
pod5_format/read_table_reader.h
pod5_format/read_table_schema.h
pod5_format/read_table_writer.h
pod5_format/read_table_writer_utils.h
pod5_format/read_table_utils.h
pod5_format/run_info_table_writer.h
pod5_format/run_info_table_reader.h
pod5_format/run_info_table_schema.h
pod5_format/signal_compression.h
pod5_format/signal_table_reader.h
pod5_format/signal_table_schema.h
pod5_format/signal_table_writer.h
pod5_format/signal_table_utils.h
pod5_format/signal_builder.h
pod5_format/uuid.h
pod5_format/c_api.h
pod5_format/expandable_buffer.h
pod5_format/file_output_stream.h
pod5_format/io_manager.h
pod5_format/memory_pool.h
pod5_format/result.h
pod5_format/dictionary_writer.h
pod5_format/schema_field_builder.h
pod5_format/schema_utils.h
pod5_format/table_reader.h
pod5_format/thread_pool.h
pod5_format/tuple_utils.h
pod5_format/types.h
${CMAKE_CURRENT_BINARY_DIR}/pod5_format/pod5_format_export.h
)
set(svb16_headers
pod5_format/svb16/svb16.h
pod5_format/svb16/common.hpp
pod5_format/svb16/decode.hpp
pod5_format/svb16/decode_scalar.hpp
pod5_format/svb16/decode_x64.hpp
pod5_format/svb16/encode.hpp
pod5_format/svb16/encode_scalar.hpp
pod5_format/svb16/encode_x64.hpp
pod5_format/svb16/intrinsics.hpp
pod5_format/svb16/shuffle_tables.hpp
pod5_format/svb16/simd_detect_x64.hpp
)
set_target_properties(pod5_format
PROPERTIES
POSITION_INDEPENDENT_CODE 1
CXX_STANDARD 20
PUBLIC_HEADER "${public_headers}"
)
# Link these libraries publicly when doing a static lib build
set(maybe_public_libs
arrow::arrow
flatbuffers::flatbuffers
)
if (BUILD_SHARED_LIB)
target_link_libraries(pod5_format PRIVATE ${maybe_public_libs})
else()
target_link_libraries(pod5_format PUBLIC ${maybe_public_libs})
endif()
target_link_libraries(pod5_format
PRIVATE
pod5_flatbuffers
zstd::zstd
ZLIB::ZLIB
Threads::Threads
)
if(APPLE)
find_library(CORE_FOUNDATION CoreFoundation)
target_link_libraries(pod5_format PRIVATE ${CORE_FOUNDATION})
endif()
target_include_directories(pod5_format
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
flatbuffers_generate_headers(
TARGET pod5_flatbuffers
SCHEMAS
pod5_format/flatbuffers/footer.fbs
INCLUDE_PREFIX ""
FLAGS --cpp
)
if (NOT MSVC)
set(pod5_warning_options -Werror -Wall -Wno-comment -Wno-error=deprecated-declarations -Wno-deprecated-declarations)
target_compile_options(pod5_format PRIVATE ${pod5_warning_options})
endif()
generate_export_header(pod5_format EXPORT_FILE_NAME pod5_format/pod5_format_export.h)
install(
TARGETS pod5_format
PUBLIC_HEADER DESTINATION "include/pod5_format"
)
install(
FILES ${svb16_headers}
DESTINATION "include/pod5_format/svb16"
)
if (POD5_BUILD_EXAMPLES)
add_subdirectory(examples)
endif()
if (NOT POD5_DISABLE_TESTS)
add_subdirectory(test)
endif()
if (BUILD_PYTHON_WHEEL)
add_subdirectory(pod5_format_pybind)
endif()
================================================
FILE: c++/examples/CMakeLists.txt
================================================
add_executable(find_all_read_ids
find_all_read_ids.cpp
)
target_link_libraries(find_all_read_ids
pod5_format
)
# Needs C++17 to use pod5_format/uuid.h
set_target_properties(find_all_read_ids PROPERTIES CXX_STANDARD 17)
add_executable(find_specific_read_ids
find_specific_read_ids.cpp
)
target_link_libraries(find_specific_read_ids
pod5_format
)
# Needs C++17 to use pod5_format/uuid.h
set_target_properties(find_specific_read_ids PROPERTIES CXX_STANDARD 17)
add_executable(find_all_read_data
find_all_read_data.cpp
)
target_link_libraries(find_all_read_data
pod5_format
)
# Needs C++17 to use pod5_format/uuid.h
set_target_properties(find_all_read_data PROPERTIES CXX_STANDARD 17)
add_executable(find_specific_read_ids_with_signal
find_specific_read_ids_with_signal.cpp
)
target_link_libraries(find_specific_read_ids_with_signal
pod5_format
)
# Needs C++17 to use pod5_format/uuid.h
set_target_properties(find_specific_read_ids_with_signal PROPERTIES CXX_STANDARD 17)
================================================
FILE: c++/examples/README.md
================================================
C++ Examples
============
These examples use the POD5 C API to read file data, they are written using C++.
find_all_read_ids
-----------------
Find all the read ids in a given pod5 file, and save their read id to a text file.
find_specific_read_ids
----------------------
Find specific read ids in a given pod5 file, and save their read number to a text file.
================================================
FILE: c++/examples/find_all_read_data.cpp
================================================
#include "pod5_format/c_api.h"
#include "pod5_format/uuid.h"
#include <array>
#include <fstream>
#include <iostream>
#include <vector>
int main(int argc, char ** argv)
{
if (argc != 2) {
std::cerr << "Expected one argument - an pod5 file to search\n";
return EXIT_FAILURE;
}
// Initialise the POD5 library:
pod5_init();
// Open the file ready for walking:
Pod5FileReader_t * file = pod5_open_file(argv[1]);
if (!file) {
std::cerr << "Failed to open file " << argv[1] << ": " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_count = 0;
if (pod5_get_read_batch_count(&batch_count, file) != POD5_OK) {
std::cerr << "Failed to query batch count: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t read_count = 0;
for (std::size_t batch_index = 0; batch_index < batch_count; ++batch_index) {
std::cout << "batch_index: " << batch_index + 1 << "/" << batch_count << "\n";
Pod5ReadRecordBatch_t * batch = nullptr;
if (pod5_get_read_batch(&batch, file, batch_index) != POD5_OK) {
std::cerr << "Failed to get batch: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_row_count = 0;
if (pod5_get_read_batch_row_count(&batch_row_count, batch) != POD5_OK) {
std::cerr << "Failed to get batch row count\n";
return EXIT_FAILURE;
}
for (std::size_t row = 0; row < batch_row_count; ++row) {
uint16_t read_table_version = 0;
ReadBatchRowInfo_t read_data;
if (pod5_get_read_batch_row_info_data(
batch, row, READ_BATCH_ROW_INFO_VERSION, &read_data, &read_table_version)
!= POD5_OK)
{
std::cerr << "Failed to get read " << row << ": " << pod5_get_error_string()
<< "\n";
return EXIT_FAILURE;
}
read_count += 1;
std::size_t sample_count = 0;
pod5_get_read_complete_sample_count(file, batch, row, &sample_count);
std::vector<std::int16_t> samples;
samples.resize(sample_count);
pod5_get_read_complete_signal(file, batch, row, samples.size(), samples.data());
// Run info
RunInfoDictData_t * run_info = nullptr;
if (pod5_get_run_info(batch, read_data.run_info, &run_info) != POD5_OK) {
std::cerr << "Failed to get run info " + std::to_string(read_data.run_info) + " : "
+ pod5_get_error_string()
<< "\n";
return EXIT_FAILURE;
}
pod5_free_run_info(run_info);
}
if (pod5_free_read_batch(batch) != POD5_OK) {
std::cerr << "Failed to release batch\n";
return EXIT_FAILURE;
}
}
std::cout << "Extracted " << read_count << " reads "
<< "\n";
// Close the reader
if (pod5_close_and_free_reader(file) != POD5_OK) {
std::cerr << "Failed to close reader: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
// Cleanup the library
pod5_terminate();
}
================================================
FILE: c++/examples/find_all_read_ids.cpp
================================================
#include "pod5_format/c_api.h"
#include "pod5_format/uuid.h"
#include <array>
#include <fstream>
#include <iostream>
#include <vector>
int main(int argc, char ** argv)
{
if (argc != 2) {
std::cerr << "Expected one argument - an pod5 file to search\n";
return EXIT_FAILURE;
}
// Initialise the POD5 library:
pod5_init();
// Open the file ready for walking:
Pod5FileReader_t * file = pod5_open_file(argv[1]);
if (!file) {
std::cerr << "Failed to open file " << argv[1] << ": " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_count = 0;
if (pod5_get_read_batch_count(&batch_count, file) != POD5_OK) {
std::cerr << "Failed to query batch count: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::string output_path("read_ids.txt");
std::cout << "Writing read ids to " << output_path << "\n";
std::ofstream output_stream(output_path);
std::size_t read_count = 0;
for (std::size_t batch_index = 0; batch_index < batch_count; ++batch_index) {
Pod5ReadRecordBatch_t * batch = nullptr;
if (pod5_get_read_batch(&batch, file, batch_index) != POD5_OK) {
std::cerr << "Failed to get batch: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_row_count = 0;
if (pod5_get_read_batch_row_count(&batch_row_count, batch) != POD5_OK) {
std::cerr << "Failed to get batch row count\n";
return EXIT_FAILURE;
}
for (std::size_t row = 0; row < batch_row_count; ++row) {
uint16_t read_table_version = 0;
ReadBatchRowInfo_t read_data;
if (pod5_get_read_batch_row_info_data(
batch, row, READ_BATCH_ROW_INFO_VERSION, &read_data, &read_table_version)
!= POD5_OK)
{
std::cerr << "Failed to get read " << row << "\n";
return EXIT_FAILURE;
}
std::array<char, 37> formatted_read_id;
pod5_format_read_id(read_data.read_id, formatted_read_id.data());
output_stream << formatted_read_id.data() << "\n";
read_count += 1;
std::size_t sample_count = 0;
pod5_get_read_complete_sample_count(file, batch, row, &sample_count);
std::vector<std::int16_t> samples;
samples.resize(sample_count);
pod5_get_read_complete_signal(file, batch, row, samples.size(), samples.data());
}
if (pod5_free_read_batch(batch) != POD5_OK) {
std::cerr << "Failed to release batch\n";
return EXIT_FAILURE;
}
}
std::cout << "Extracted " << read_count << " read ids into " << output_path << "\n";
// Close the reader
if (pod5_close_and_free_reader(file) != POD5_OK) {
std::cerr << "Failed to close reader: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
// Cleanup the library
pod5_terminate();
}
================================================
FILE: c++/examples/find_specific_read_ids.cpp
================================================
#include "pod5_format/c_api.h"
#include "pod5_format/uuid.h"
#include <fstream>
#include <iostream>
#include <vector>
int main(int argc, char ** argv)
{
if (argc != 3) {
std::cerr << "Expected two arguments:\n"
<< " - an pod5 file to search\n"
<< " - a file containing newline separated of read ids\n";
return EXIT_FAILURE;
}
// Initialise the POD5 library:
pod5_init();
// Open the file ready for walking:
Pod5FileReader_t * file = pod5_open_file(argv[1]);
if (!file) {
std::cerr << "Failed to open file " << argv[1] << ": " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_count = 0;
if (pod5_get_read_batch_count(&batch_count, file) != POD5_OK) {
std::cerr << "Failed to query batch count: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::vector<pod5::Uuid> search_uuids;
std::string input_path(argv[2]);
try {
std::cout << "Reading input read ids from " << input_path << "\n";
std::string line;
std::ifstream input_stream(input_path);
while (std::getline(input_stream, line)) {
auto const uuid = pod5::Uuid::from_string(line);
if (!uuid) {
std::cerr << '"' << line << "\" is not a valid UUID, ignoring it\n";
} else {
search_uuids.push_back(*uuid);
}
}
std::cout << " Read " << search_uuids.size() << " ids from the text file\n";
} catch (std::exception const & e) {
std::cerr << "Failed to parse UUID values from " << input_path << ": " << e.what() << "\n";
}
std::string output_path("read_ids.txt");
std::cout << "Writing selected read numbers to " << output_path << "\n";
std::ofstream output_stream(output_path);
// Plan the most efficient route through the file for the required read ids:
std::vector<std::uint32_t> traversal_batch_counts(batch_count);
std::vector<std::uint32_t> traversal_row_indices(search_uuids.size());
std::size_t find_success_count = 0;
if (pod5_plan_traversal(
file,
(uint8_t *)search_uuids.data(),
search_uuids.size(),
traversal_batch_counts.data(),
traversal_row_indices.data(),
&find_success_count)
!= POD5_OK)
{
std::cerr << "Failed to plan traversal of file: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
if (find_success_count != search_uuids.size()) {
std::cerr << "Failed to find " << (search_uuids.size() - find_success_count) << " reads\n";
}
std::size_t read_count = 0;
std::size_t row_offset = 0;
// Walk the suggested traversal route, storing read data.
for (std::size_t batch_index = 0; batch_index < batch_count; ++batch_index) {
Pod5ReadRecordBatch_t * batch = nullptr;
if (pod5_get_read_batch(&batch, file, batch_index) != POD5_OK) {
std::cerr << "Failed to get batch: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::cout << "Processing batch " << (batch_index + 1) << " of " << batch_count << "\n";
for (std::size_t row_index = 0; row_index < traversal_batch_counts[batch_index];
++row_index)
{
std::uint32_t batch_row = traversal_row_indices[row_index + row_offset];
uint16_t read_table_version = 0;
ReadBatchRowInfo_t read_data;
if (pod5_get_read_batch_row_info_data(
batch, batch_row, READ_BATCH_ROW_INFO_VERSION, &read_data, &read_table_version)
!= POD5_OK)
{
std::cerr << "Failed to get read " << batch_row << "\n";
return EXIT_FAILURE;
}
output_stream << read_data.read_number << "\n";
read_count += 1;
}
row_offset += traversal_batch_counts[batch_index];
if (pod5_free_read_batch(batch) != POD5_OK) {
std::cerr << "Failed to release batch\n";
return EXIT_FAILURE;
}
}
std::cout << "Extracted " << read_count << " read numbers into " << output_path << "\n";
// Close the reader
if (pod5_close_and_free_reader(file) != POD5_OK) {
std::cerr << "Failed to close reader: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
// Cleanup the library
pod5_terminate();
}
================================================
FILE: c++/examples/find_specific_read_ids_with_signal.cpp
================================================
#include "pod5_format/c_api.h"
#include "pod5_format/uuid.h"
#include <fstream>
#include <iostream>
#include <vector>
int main(int argc, char ** argv)
{
if (argc != 3) {
std::cerr << "Expected two arguments:\n"
<< " - an pod5 file to search\n"
<< " - a file containing newline separated of read ids\n";
return EXIT_FAILURE;
}
// Initialise the POD5 library:
pod5_init();
// Open the file ready for walking:
Pod5FileReader_t * file = pod5_open_file(argv[1]);
if (!file) {
std::cerr << "Failed to open file " << argv[1] << ": " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::size_t batch_count = 0;
if (pod5_get_read_batch_count(&batch_count, file) != POD5_OK) {
std::cerr << "Failed to query batch count: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::vector<pod5::Uuid> search_uuids;
std::string input_path(argv[2]);
try {
std::cout << "Reading input read ids from " << input_path << "\n";
std::string line;
std::ifstream input_stream(input_path);
while (std::getline(input_stream, line)) {
auto const uuid = pod5::Uuid::from_string(line);
if (!uuid) {
std::cerr << '"' << line << "\" is not a valid UUID, ignoring it\n";
} else {
search_uuids.push_back(*uuid);
}
}
std::cout << " Read " << search_uuids.size() << " ids from the text file\n";
} catch (std::exception const & e) {
std::cerr << "Failed to parse UUID values from " << input_path << ": " << e.what() << "\n";
}
std::string output_path("read_ids.txt");
std::cout << "Writing selected read numbers to " << output_path << "\n";
std::ofstream output_stream(output_path);
// Plan the most efficient route through the file for the required read ids:
std::vector<std::uint32_t> traversal_batch_counts(batch_count);
std::vector<std::uint32_t> traversal_row_indices(search_uuids.size());
std::size_t find_success_count = 0;
if (pod5_plan_traversal(
file,
(uint8_t *)search_uuids.data(),
search_uuids.size(),
traversal_batch_counts.data(),
traversal_row_indices.data(),
&find_success_count)
!= POD5_OK)
{
std::cerr << "Failed to plan traversal of file: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
if (find_success_count != search_uuids.size()) {
std::cerr << "Failed to find " << (search_uuids.size() - find_success_count) << " reads\n";
}
std::size_t read_count = 0;
std::size_t samples_read = 0;
std::size_t row_offset = 0;
// Walk the suggested traversal route, storing read data.
for (std::size_t batch_index = 0; batch_index < batch_count; ++batch_index) {
Pod5ReadRecordBatch_t * batch = nullptr;
if (pod5_get_read_batch(&batch, file, batch_index) != POD5_OK) {
std::cerr << "Failed to get batch: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
std::cout << "Processing batch " << (batch_index + 1) << " of " << batch_count << "\n";
for (std::size_t row_index = 0; row_index < traversal_batch_counts[batch_index];
++row_index)
{
std::uint32_t batch_row = traversal_row_indices[row_index + row_offset];
uint16_t read_table_version = 0;
ReadBatchRowInfo_t read_data;
if (pod5_get_read_batch_row_info_data(
batch, batch_row, READ_BATCH_ROW_INFO_VERSION, &read_data, &read_table_version)
!= POD5_OK)
{
std::cerr << "Failed to get read " << batch_row << "\n";
return EXIT_FAILURE;
}
std::size_t sample_count = 0;
pod5_get_read_complete_sample_count(file, batch, batch_row, &sample_count);
std::vector<std::int16_t> samples;
samples.resize(sample_count);
pod5_get_read_complete_signal(file, batch, batch_row, samples.size(), samples.data());
std::int64_t samples_sum = 0;
for (std::size_t i = 0; i < samples.size(); ++i) {
samples_sum += samples[i];
}
output_stream << read_data.calibration_offset << " " << read_data.calibration_scale
<< " " << samples_sum << "\n";
read_count += 1;
samples_read += samples.size();
}
row_offset += traversal_batch_counts[batch_index];
if (pod5_free_read_batch(batch) != POD5_OK) {
std::cerr << "Failed to release batch\n";
return EXIT_FAILURE;
}
}
std::cout << "Extracted " << read_count << " reads and " << samples_read << " samples into "
<< output_path << "\n";
// Close the reader
if (pod5_close_and_free_reader(file) != POD5_OK) {
std::cerr << "Failed to close reader: " << pod5_get_error_string() << "\n";
return EXIT_FAILURE;
}
// Cleanup the library
pod5_terminate();
}
================================================
FILE: c++/pod5_format/async_signal_loader.cpp
================================================
#include "pod5_format/async_signal_loader.h"
namespace pod5 {
std::size_t const AsyncSignalLoader::MINIMUM_JOB_SIZE = 50;
AsyncSignalLoader::AsyncSignalLoader(
std::shared_ptr<pod5::FileReader> const & reader,
SamplesMode samples_mode,
gsl::span<std::uint32_t const> const & batch_counts,
gsl::span<std::uint32_t const> const & batch_rows,
std::size_t worker_count,
std::size_t max_pending_batches)
: m_reader(reader)
, m_samples_mode(samples_mode)
, m_max_pending_batches(max_pending_batches)
, m_reads_batch_count(m_reader->num_read_record_batches())
, m_batch_counts(batch_counts)
, m_total_batch_count_so_far(0)
, m_batch_rows(batch_rows)
, m_worker_job_size(
std::max<std::size_t>(
MINIMUM_JOB_SIZE,
m_batch_rows.size() / (m_reads_batch_count * worker_count * 2)))
, m_current_batch(0)
, m_finished(false)
, m_has_error(false)
, m_batches_size(0)
{
// Setup first batch:
{
std::unique_lock<std::mutex> l(m_worker_sync);
auto setup_result = setup_next_in_progress_batch(l);
if (!setup_result.ok()) {
set_error(setup_result);
}
}
// Kick off workers on jobs:
for (std::size_t i = 0; i < worker_count; ++i) {
m_workers.emplace_back([&] { run_worker(); });
}
}
AsyncSignalLoader::~AsyncSignalLoader()
{
m_finished = true;
// Wait for all workers to complete:
for (std::size_t i = 0; i < m_workers.size(); ++i) {
m_workers[i].join();
}
}
Result<std::unique_ptr<CachedBatchSignalData>> AsyncSignalLoader::release_next_batch(
std::optional<std::chrono::steady_clock::time_point> timeout)
{
std::shared_ptr<SignalCacheWorkPackage> batch;
// Return any error, if one has occurred:
if (m_has_error) {
return error();
}
// First wait until there is a batch available:
do {
std::unique_lock<std::mutex> l(m_batches_sync);
// Wait until there is a batch available:
m_batch_done.wait_until(
l, timeout.value_or(std::chrono::steady_clock::now() + std::chrono::seconds(5)), [&] {
return m_batches.size() || m_finished || m_has_error;
});
// Grab a batch if one exists (note error or user destroying us might have happened instead):
if (!m_batches.empty()) {
batch = std::move(m_batches.front());
assert(batch);
m_batches.pop_front();
m_batches_size -= 1;
break;
}
if (timeout && std::chrono::steady_clock::now() > *timeout) {
return nullptr;
}
} while (!m_finished && !m_has_error);
// Return any error, if one has occurred during our wait:
if (m_has_error) {
return error();
}
// If we got a batch, wait for all work to be finished, then return it:
if (batch) {
// Wait if we are ahead of the loader:
while (!batch->is_complete()) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return batch->release_data();
}
// No more data - return null.
return nullptr;
}
void AsyncSignalLoader::set_error(pod5::Status status)
{
assert(!status.ok());
{
std::lock_guard<std::mutex> l{m_error_mutex};
m_error = std::move(status);
}
m_has_error = true;
}
pod5::Status AsyncSignalLoader::error() const
{
std::lock_guard<std::mutex> l{m_error_mutex};
return m_error;
}
void AsyncSignalLoader::run_worker()
{
// Continue to work while there is work to do, and no error has occurred
while (!m_finished && !m_has_error) {
std::shared_ptr<SignalCacheWorkPackage> batch;
std::uint32_t row_start = 0;
// Try to secure some new work:
{
std::unique_lock<std::mutex> l(m_worker_sync);
// If we have run out of batches to process, release anything in progress and return:
if (m_current_batch >= m_reads_batch_count) {
release_in_progress_batch();
break;
}
// If we have more batches than asked for complete that have
// not been queried, wait for it to get taken:
if (m_batches_size > m_max_pending_batches) {
l.unlock();
std::this_thread::sleep_for(std::chrono::milliseconds(10));
continue;
}
// Now, if we have no work left in the current batch, release that:
if (!m_in_progress_batch->has_work_left()) {
if (!m_batch_counts.empty()) {
m_total_batch_count_so_far += m_batch_counts[m_current_batch];
}
// Release the current batch:
release_in_progress_batch();
// Then try to setup the next batch, if one exists:
m_current_batch += 1;
if (m_current_batch >= m_reads_batch_count) {
// No more work to do.
m_finished = true;
break;
}
auto setup_result = setup_next_in_progress_batch(l);
if (!setup_result.ok()) {
set_error(setup_result);
return;
}
}
// Finally, tell the work package we have secured we are starting to do some work:
batch = m_in_progress_batch;
row_start = m_in_progress_batch->start_rows(l, m_worker_job_size);
}
// Now execute the work, for all the rows we said we would:
std::uint32_t const row_end =
std::min(row_start + m_worker_job_size, batch->job_row_count());
do_work(batch, row_start, row_end);
// And report the work completed for anyone waiting:
batch->complete_rows(m_worker_job_size);
}
}
void AsyncSignalLoader::do_work(
std::shared_ptr<SignalCacheWorkPackage> const & batch,
std::uint32_t row_start,
std::uint32_t row_end)
{
// First secure the sample counts column for the batch we are processing:
auto signal_column = batch->read_batch().signal_column();
// And record where we are starting in the batch rows array, if it exists:
for (std::uint32_t i = row_start; i < row_end; ++i) {
// Find the actual batch row to query - we may be working on a subset of batch data:
auto const actual_batch_row = batch->get_batch_row_to_query(i);
// Get the signal row data for the read:
auto const signal_rows = std::static_pointer_cast<arrow::UInt64Array>(
signal_column->value_slice(actual_batch_row));
auto const signal_rows_span =
gsl::make_span(signal_rows->raw_values(), signal_rows->length());
// Find the sample count for these rows:
auto sample_count_result = m_reader->extract_sample_count(signal_rows_span);
if (!sample_count_result.ok()) {
set_error(sample_count_result.status());
return;
}
std::uint64_t sample_count = *sample_count_result;
// And query the samples if that has been requested:
std::vector<std::int16_t> samples;
if (m_samples_mode == SamplesMode::Samples) {
samples.resize(sample_count);
auto samples_result =
m_reader->extract_samples(signal_rows_span, gsl::make_span(samples));
if (!samples_result.ok()) {
set_error(std::move(samples_result));
return;
}
sample_count = samples.size();
}
// Store the queried data into the batch:
batch->set_samples(i, sample_count, std::move(samples));
}
}
Status AsyncSignalLoader::setup_next_in_progress_batch(std::unique_lock<std::mutex> & lock)
{
assert(!m_in_progress_batch);
ARROW_ASSIGN_OR_RAISE(auto read_batch, m_reader->read_read_record_batch(m_current_batch));
std::size_t row_count = read_batch.num_rows();
gsl::span<std::uint32_t const> next_specific_batch_rows;
if (!m_batch_counts.empty()) {
row_count = m_batch_counts[m_current_batch];
if (!m_batch_rows.empty()) {
next_specific_batch_rows = m_batch_rows.subspan(m_total_batch_count_so_far, row_count);
}
}
m_in_progress_batch = std::make_shared<SignalCacheWorkPackage>(
m_current_batch, row_count, next_specific_batch_rows, std::move(read_batch));
return Status::OK();
}
void AsyncSignalLoader::release_in_progress_batch()
{
if (m_in_progress_batch) {
assert(!m_in_progress_batch->has_work_left());
std::lock_guard<std::mutex> l(m_batches_sync);
m_batches.emplace_back(std::move(m_in_progress_batch));
m_batches_size += 1;
m_batch_done.notify_all();
}
}
} // namespace pod5
================================================
FILE: c++/pod5_format/async_signal_loader.h
================================================
#pragma once
#include "pod5_format/file_reader.h"
#include "pod5_format/pod5_format_export.h"
#include "pod5_format/read_table_reader.h"
#include "pod5_format/signal_table_reader.h"
#include <arrow/array/array_nested.h>
#include <arrow/array/array_primitive.h>
#include <condition_variable>
#include <deque>
#include <memory>
#include <mutex>
#include <optional>
#include <thread>
namespace pod5 {
class POD5_FORMAT_EXPORT CachedBatchSignalData {
public:
CachedBatchSignalData(std::uint32_t batch_index, std::size_t entry_count)
: m_batch_index(batch_index)
, m_sample_counts(entry_count)
, m_samples(entry_count)
{
}
std::uint32_t batch_index() const { return m_batch_index; }
/// Find a list of sample counts for all requested batch rows.
std::vector<std::uint64_t> const & sample_count() const { return m_sample_counts; }
/// Find a list of signal samples counts for all requested batch rows.
std::vector<std::vector<std::int16_t>> const & samples() const { return m_samples; }
void
set_samples(std::size_t row, std::uint64_t sample_count, std::vector<std::int16_t> && samples)
{
m_sample_counts[row] = sample_count;
m_samples[row] = std::move(samples);
}
private:
std::uint32_t m_batch_index;
std::vector<std::uint64_t> m_sample_counts;
std::vector<std::vector<std::int16_t>> m_samples;
};
class POD5_FORMAT_EXPORT SignalCacheWorkPackage {
public:
SignalCacheWorkPackage(
std::uint32_t batch_index,
std::size_t job_row_count,
gsl::span<std::uint32_t const> const & specific_job_rows,
pod5::ReadTableRecordBatch && read_batch)
: m_job_row_count(job_row_count)
, m_specific_job_rows(specific_job_rows)
, m_next_row_to_start(0)
, m_completed_rows(0)
, m_cached_data(std::make_unique<CachedBatchSignalData>(batch_index, m_job_row_count))
, m_read_batch(std::move(read_batch))
{
}
std::uint32_t job_row_count() const { return m_job_row_count; }
void
set_samples(std::size_t row, std::uint64_t sample_count, std::vector<std::int16_t> && samples)
{
m_cached_data->set_samples(row, sample_count, std::move(samples));
}
std::unique_ptr<CachedBatchSignalData> release_data() { return std::move(m_cached_data); }
pod5::ReadTableRecordBatch const & read_batch() const { return m_read_batch; }
// Find the actual batch row to query, for a given job row index.
std::uint32_t get_batch_row_to_query(std::uint32_t job_row_index) const
{
// We allow the caller to specify a subset of batch rows to iterate:
if (!m_specific_job_rows.empty()) {
return m_specific_job_rows[job_row_index];
}
return job_row_index;
}
std::uint32_t start_rows(std::unique_lock<std::mutex> & l, std::size_t row_count)
{
auto row = m_next_row_to_start;
m_next_row_to_start += row_count;
return row;
}
void complete_rows(std::uint32_t row_count) { m_completed_rows += row_count; }
bool has_work_left() const { return m_next_row_to_start < m_job_row_count; }
bool is_complete() const { return m_completed_rows.load() >= m_job_row_count; }
private:
std::size_t m_job_row_count;
gsl::span<std::uint32_t const> m_specific_job_rows;
std::uint32_t m_next_row_to_start;
std::atomic<std::uint32_t> m_completed_rows;
std::unique_ptr<CachedBatchSignalData> m_cached_data;
pod5::ReadTableRecordBatch m_read_batch;
};
class POD5_FORMAT_EXPORT AsyncSignalLoader {
public:
// Minimum number of tasks one thread will do in a batch.
static std::size_t const MINIMUM_JOB_SIZE;
enum class SamplesMode {
NoSamples,
Samples,
};
AsyncSignalLoader(
std::shared_ptr<pod5::FileReader> const & reader,
SamplesMode samples_mode,
gsl::span<std::uint32_t const> const & batch_counts,
gsl::span<std::uint32_t const> const & batch_rows,
std::size_t worker_count = std::thread::hardware_concurrency(),
std::size_t max_pending_batches = 10);
~AsyncSignalLoader();
/// Find if all work is complete in the loader.
bool is_finished() const { return m_finished; }
/// Get the next batch of loaded signal, always returns the consecutive next signal batch
/// \note Returns nullptr when timeoout occurs, or if all data is exhausted.
Result<std::unique_ptr<CachedBatchSignalData>> release_next_batch(
std::optional<std::chrono::steady_clock::time_point> timeout = std::nullopt);
private:
/// Set an error code that will stop all async loading and return an error to the caller.
void set_error(pod5::Status status);
pod5::Status error() const;
void run_worker();
void do_work(
std::shared_ptr<SignalCacheWorkPackage> const & batch,
std::uint32_t row_start,
std::uint32_t row_end);
/// Setup a new batch for in progress work to contain.
/// \param lock A lock held on m_worker_sync.
/// \note There must not be a batch already in progress.
/// \note m_current_batch is used as the index of the next batch to begin.
Status setup_next_in_progress_batch(std::unique_lock<std::mutex> & lock);
/// Release the currently in progress batch to readers, if it exists.
/// \note This call locks m_batches_sync internally.
/// \note The batch must not have any work remaining to start, but can be completing already started work.
/// \note This call notifys the condition variable to alert readers that new data is available.
void release_in_progress_batch();
std::shared_ptr<pod5::FileReader> m_reader;
SamplesMode m_samples_mode;
std::size_t m_max_pending_batches;
std::size_t m_reads_batch_count;
gsl::span<std::uint32_t const> m_batch_counts;
std::size_t m_total_batch_count_so_far;
gsl::span<std::uint32_t const> m_batch_rows;
std::uint32_t const m_worker_job_size;
std::mutex m_worker_sync;
std::condition_variable m_batch_done;
std::uint32_t m_current_batch;
std::atomic<bool> m_finished;
std::atomic<bool> m_has_error;
mutable std::mutex m_error_mutex;
pod5::Status m_error;
std::shared_ptr<SignalCacheWorkPackage> m_in_progress_batch;
std::mutex m_batches_sync;
std::atomic<std::uint32_t> m_batches_size;
std::deque<std::shared_ptr<SignalCacheWorkPackage>> m_batches;
std::vector<std::thread> m_workers;
};
} // namespace pod5
================================================
FILE: c++/pod5_format/c_api.cpp
================================================
#include "pod5_format/c_api.h"
#include "pod5_format/file_reader.h"
#include "pod5_format/file_writer.h"
#include "pod5_format/read_table_reader.h"
#include "pod5_format/signal_compression.h"
#include "pod5_format/signal_table_reader.h"
#include "pod5_format/uuid.h"
#include <arrow/array/array_binary.h>
#include <arrow/array/array_dict.h>
#include <arrow/array/array_nested.h>
#include <arrow/array/array_primitive.h>
#include <arrow/memory_pool.h>
#include <arrow/type.h>
#include <limits>
#include <optional>
//---------------------------------------------------------------------------------------------------------------------
struct Pod5FileReader {
Pod5FileReader(std::shared_ptr<pod5::FileReader> && reader_) : reader(std::move(reader_)) {}
std::shared_ptr<pod5::FileReader const> reader;
};
struct Pod5FileWriter {
Pod5FileWriter(std::unique_ptr<pod5::FileWriter> && writer_) : writer(std::move(writer_)) {}
std::unique_ptr<pod5::FileWriter> writer;
};
struct Pod5ReadRecordBatch {
Pod5ReadRecordBatch(
pod5::ReadTableRecordBatch && batch_,
std::shared_ptr<pod5::FileReader const> reader)
: batch(std::move(batch_))
, reader(std::move(reader))
{
}
pod5::ReadTableRecordBatch const batch;
std::shared_ptr<pod5::FileReader const> reader;
};
namespace {
//---------------------------------------------------------------------------------------------------------------------
thread_local pod5_error_t g_pod5_error_no;
thread_local std::string g_pod5_error_string;
void pod5_set_error(arrow::Status status)
{
g_pod5_error_no = (pod5_error_t)status.code();
g_pod5_error_string = status.ToString();
}
void pod5_reset_error()
{
g_pod5_error_no = pod5_error_t::POD5_OK;
g_pod5_error_string.clear();
}
#define POD5_C_RETURN_NOT_OK(result) \
do { \
::arrow::Status __s = (result); \
if (!__s.ok()) { \
pod5_set_error(__s); \
return g_pod5_error_no; \
} \
} while (0)
#define POD5_C_ASSIGN_OR_RAISE_IMPL(result_name, lhs, rexpr) \
auto && result_name = (rexpr); \
if (!(result_name).ok()) { \
pod5_set_error((result_name).status()); \
return g_pod5_error_no; \
} \
lhs = std::move(result_name).ValueUnsafe();
#define POD5_C_ASSIGN_OR_RAISE(lhs, rexpr) \
POD5_C_ASSIGN_OR_RAISE_IMPL( \
ARROW_ASSIGN_OR_RAISE_NAME(_error_or_value, __COUNTER__), lhs, rexpr);
//---------------------------------------------------------------------------------------------------------------------
bool check_string_not_empty(char const * str)
{
if (!str) {
pod5_set_error(arrow::Status::Invalid("null string passed to C API"));
return false;
}
if (strlen(str) == 0) {
pod5_set_error(arrow::Status::Invalid("empty string passed to C API"));
return false;
}
return true;
}
bool check_not_null(void const * ptr)
{
if (!ptr) {
pod5_set_error(arrow::Status::Invalid("null passed to C API"));
return false;
}
return true;
}
bool check_file_not_null(void const * file)
{
if (!file) {
pod5_set_error(arrow::Status::Invalid("null file passed to C API"));
return false;
}
return true;
}
bool check_output_pointer_not_null(void const * output)
{
if (!output) {
pod5_set_error(arrow::Status::Invalid("null output parameter passed to C API"));
return false;
}
return true;
}
//---------------------------------------------------------------------------------------------------------------------
pod5::FileWriterOptions make_internal_writer_options(Pod5WriterOptions const * options)
{
pod5::FileWriterOptions internal_options;
if (options) {
if (options->max_signal_chunk_size != 0) {
internal_options.set_max_signal_chunk_size(options->max_signal_chunk_size);
}
if (options->signal_compression_type == UNCOMPRESSED_SIGNAL) {
internal_options.set_signal_type(pod5::SignalType::UncompressedSignal);
}
if (options->signal_table_batch_size != 0) {
internal_options.set_signal_table_batch_size(options->signal_table_batch_size);
}
if (options->read_table_batch_size != 0) {
internal_options.set_read_table_batch_size(options->read_table_batch_size);
}
}
return internal_options;
}
pod5::FileReaderOptions make_internal_reader_options(Pod5ReaderOptions const & options)
{
pod5::FileReaderOptions internal_options;
internal_options.set_force_disable_file_mapping(options.force_disable_file_mapping);
return internal_options;
}
} // namespace
extern "C" {
//---------------------------------------------------------------------------------------------------------------------
pod5_error_t pod5_init()
{
pod5_reset_error();
POD5_C_RETURN_NOT_OK(pod5::register_extension_types());
return POD5_OK;
}
pod5_error_t pod5_terminate()
{
pod5_reset_error();
POD5_C_RETURN_NOT_OK(pod5::unregister_extension_types());
return POD5_OK;
}
pod5_error_t pod5_get_error_no() { return g_pod5_error_no; }
char const * pod5_get_error_string() { return g_pod5_error_string.c_str(); }
//---------------------------------------------------------------------------------------------------------------------
Pod5FileReader * pod5_open_file(char const * filename)
{
Pod5ReaderOptions_t options{};
return pod5_open_file_options(filename, &options);
}
Pod5FileReader * pod5_open_file_options(char const * filename, Pod5ReaderOptions_t const * options)
{
pod5_reset_error();
if (!check_string_not_empty(filename) || !check_not_null(options)) {
return nullptr;
}
auto internal_reader = pod5::open_file_reader(filename, make_internal_reader_options(*options));
if (!internal_reader.ok()) {
pod5_set_error(internal_reader.status());
return nullptr;
}
auto reader = std::make_unique<Pod5FileReader>(std::move(*internal_reader));
return reader.release();
}
pod5_error_t pod5_close_and_free_reader(Pod5FileReader * file)
{
pod5_reset_error();
std::unique_ptr<Pod5FileReader> ptr{file};
ptr.reset();
return POD5_OK;
}
pod5_error_t pod5_get_file_info(Pod5FileReader_t const * reader, FileInfo * file_info)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(file_info)) {
return g_pod5_error_no;
}
auto const metadata = reader->reader->schema_metadata();
metadata.file_identifier.to_c_array(file_info->file_identifier);
file_info->version.major = metadata.writing_pod5_version.major_version();
file_info->version.minor = metadata.writing_pod5_version.minor_version();
file_info->version.revision = metadata.writing_pod5_version.revision_version();
return POD5_OK;
}
pod5_error_t pod5_get_file_read_table_location(
Pod5FileReader_t const * reader,
EmbeddedFileData_t * file_data)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(file_data)) {
return g_pod5_error_no;
}
auto const & read_table_location = reader->reader->read_table_location();
file_data->file_name = read_table_location.file_path.c_str();
file_data->offset = read_table_location.offset;
file_data->length = read_table_location.size;
return POD5_OK;
}
pod5_error_t pod5_get_file_signal_table_location(
Pod5FileReader_t const * reader,
EmbeddedFileData_t * file_data)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(file_data)) {
return g_pod5_error_no;
}
auto const & signal_table_location = reader->reader->signal_table_location();
file_data->file_name = signal_table_location.file_path.c_str();
file_data->offset = signal_table_location.offset;
file_data->length = signal_table_location.size;
return POD5_OK;
}
pod5_error_t pod5_get_file_run_info_table_location(
Pod5FileReader_t const * reader,
EmbeddedFileData_t * file_data)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(file_data)) {
return g_pod5_error_no;
}
auto const & run_info_table_location = reader->reader->run_info_table_location();
file_data->file_name = run_info_table_location.file_path.c_str();
file_data->offset = run_info_table_location.offset;
file_data->length = run_info_table_location.size;
return POD5_OK;
}
pod5_error_t pod5_get_read_count(Pod5FileReader_t const * reader, size_t * count)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(count)) {
return g_pod5_error_no;
}
POD5_C_ASSIGN_OR_RAISE(*count, reader->reader->read_count());
return POD5_OK;
}
pod5_error_t pod5_get_read_ids(Pod5FileReader_t const * reader, size_t count, read_id_t * read_ids)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(read_ids)) {
return g_pod5_error_no;
}
POD5_C_ASSIGN_OR_RAISE(auto read_count, reader->reader->read_count());
if (count < read_count) {
pod5_set_error(arrow::Status::Invalid("array to short to receive read ids"));
return g_pod5_error_no;
}
std::size_t count_so_far = 0;
for (std::size_t i = 0; i < reader->reader->num_read_record_batches(); ++i) {
POD5_C_ASSIGN_OR_RAISE(auto const batch, reader->reader->read_read_record_batch(i));
auto const read_id_column = batch.read_id_column();
auto raw_data = reinterpret_cast<uint8_t const *>(read_id_column->raw_values());
std::copy(
raw_data,
raw_data + (read_id_column->length() * sizeof(read_id_t)),
reinterpret_cast<uint8_t *>(read_ids + count_so_far));
count_so_far += read_id_column->length();
}
return POD5_OK;
}
pod5_error_t pod5_plan_traversal(
Pod5FileReader_t const * reader,
uint8_t const * read_id_array,
size_t read_id_count,
uint32_t * batch_counts,
uint32_t * batch_rows,
size_t * find_success_count_out)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_not_null(read_id_array)
|| !check_output_pointer_not_null(batch_counts)
|| !check_output_pointer_not_null(batch_rows)
|| !check_output_pointer_not_null(find_success_count_out))
{
return g_pod5_error_no;
}
auto search_input = pod5::ReadIdSearchInput(
gsl::make_span(reinterpret_cast<pod5::Uuid const *>(read_id_array), read_id_count));
POD5_C_ASSIGN_OR_RAISE(
auto find_success_count,
reader->reader->search_for_read_ids(
search_input,
gsl::make_span(batch_counts, reader->reader->num_read_record_batches()),
gsl::make_span(batch_rows, read_id_count)));
// TODO: on MAJOR_VERSION bump drop this out param and do the check internally.
*find_success_count_out = find_success_count;
return POD5_OK;
}
pod5_error_t pod5_get_read_batch_count(size_t * count, Pod5FileReader const * reader)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(count)) {
return g_pod5_error_no;
}
*count = reader->reader->num_read_record_batches();
return POD5_OK;
}
pod5_error_t
pod5_get_read_batch(Pod5ReadRecordBatch ** batch, Pod5FileReader const * reader, size_t index)
{
pod5_reset_error();
if (!check_file_not_null(reader) || !check_output_pointer_not_null(batch)) {
return g_pod5_error_no;
}
POD5_C_ASSIGN_OR_RAISE(auto internal_batch, reader->reader->read_read_record_batch(index));
auto wrapped_batch =
std::make_unique<Pod5ReadRecordBatch>(std::move(internal_batch), reader->reader);
*batch = wrapped_batch.release();
return POD5_OK;
}
pod5_error_t pod5_free_read_batch(Pod5ReadRecordBatch * batch)
{
pod5_reset_error();
std::unique_ptr<Pod5ReadRecordBatch> ptr{batch};
ptr.reset();
return POD5_OK;
}
pod5_error_t pod5_get_read_batch_row_count(size_t * count, Pod5ReadRecordBatch const * batch)
{
pod5_reset_error();
if (!check_not_null(batch) || !check_output_pointer_not_null(count)) {
return g_pod5_error_no;
}
*count = batch->batch.num_rows();
return POD5_OK;
}
static pod5_error_t check_row_index_and_set_error(size_t row, int64_t batch_size)
{
if (row > static_cast<size_t>(std::numeric_limits<int64_t>::max())
|| static_cast<int64_t>(row) >= batch_size)
{
pod5_set_error(
arrow::Status::IndexError(
"Invalid index into batch. Index ", row, " with batch size ", batch_size));
return g_pod5_error_no;
}
return POD5_OK;
}
pod5_error_t
gitextract_n9lck0re/
├── .clang-format
├── .codespellrc
├── .flake8
├── .gitattributes
├── .github/
│ └── ISSUE_TEMPLATE/
│ └── bug_report.md
├── .gitignore
├── .gitlab-ci.yml
├── .gitmodules
├── .pre-commit-config.yaml
├── .readthedocs.yaml
├── CHANGELOG.md
├── CMakeLists.txt
├── CMakePresets.json
├── DEV.md
├── LICENSE.md
├── README.md
├── benchmarks/
│ ├── .gitignore
│ ├── README.md
│ ├── build.sh
│ ├── convert/
│ │ ├── run_blow5.sh
│ │ └── run_pod5.sh
│ ├── find_all_read_ids/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_all_samples/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_read_number/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_sample_count/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── find_selected_read_ids_samples/
│ │ ├── run_blow5.sh
│ │ ├── run_fast5.sh
│ │ └── run_pod5.sh
│ ├── image/
│ │ ├── Dockerfile.base
│ │ ├── install_slow5.sh
│ │ └── requirements-benchmarks.txt
│ ├── run_benchmarks.py
│ ├── run_benchmarks_in_docker.sh
│ └── tools/
│ ├── check_csvs_consistent.py
│ ├── fast5_to_single_blow5.sh
│ ├── find_and_get_fast5.py
│ ├── find_and_get_pod5.py
│ ├── pyslow5_tests.py
│ ├── run_benchmarks_docker_entry.sh
│ └── select-random-ids.py
├── c++/
│ ├── CMakeLists.txt
│ ├── examples/
│ │ ├── CMakeLists.txt
│ │ ├── README.md
│ │ ├── find_all_read_data.cpp
│ │ ├── find_all_read_ids.cpp
│ │ ├── find_specific_read_ids.cpp
│ │ └── find_specific_read_ids_with_signal.cpp
│ ├── pod5_format/
│ │ ├── async_signal_loader.cpp
│ │ ├── async_signal_loader.h
│ │ ├── c_api.cpp
│ │ ├── c_api.h
│ │ ├── dictionary_writer.h
│ │ ├── expandable_buffer.h
│ │ ├── file_output_stream.h
│ │ ├── file_reader.cpp
│ │ ├── file_reader.h
│ │ ├── file_recovery.h
│ │ ├── file_updater.cpp
│ │ ├── file_updater.h
│ │ ├── file_writer.cpp
│ │ ├── file_writer.h
│ │ ├── flatbuffers/
│ │ │ └── footer.fbs
│ │ ├── internal/
│ │ │ ├── async_output_stream.h
│ │ │ ├── combined_file_utils.h
│ │ │ ├── linux_output_stream.h
│ │ │ └── tracing/
│ │ │ └── tracing.h
│ │ ├── io_manager.cpp
│ │ ├── io_manager.h
│ │ ├── memory_pool.cpp
│ │ ├── memory_pool.h
│ │ ├── migration/
│ │ │ ├── migration.cpp
│ │ │ ├── migration.h
│ │ │ ├── migration_utils.h
│ │ │ ├── v0_to_v1.cpp
│ │ │ ├── v1_to_v2.cpp
│ │ │ ├── v2_to_v3.cpp
│ │ │ └── v3_to_v4.cpp
│ │ ├── read_table_reader.cpp
│ │ ├── read_table_reader.h
│ │ ├── read_table_schema.cpp
│ │ ├── read_table_schema.h
│ │ ├── read_table_utils.cpp
│ │ ├── read_table_utils.h
│ │ ├── read_table_writer.cpp
│ │ ├── read_table_writer.h
│ │ ├── read_table_writer_utils.cpp
│ │ ├── read_table_writer_utils.h
│ │ ├── result.h
│ │ ├── run_info_table_reader.cpp
│ │ ├── run_info_table_reader.h
│ │ ├── run_info_table_schema.cpp
│ │ ├── run_info_table_schema.h
│ │ ├── run_info_table_writer.cpp
│ │ ├── run_info_table_writer.h
│ │ ├── schema_field_builder.h
│ │ ├── schema_metadata.cpp
│ │ ├── schema_metadata.h
│ │ ├── schema_utils.cpp
│ │ ├── schema_utils.h
│ │ ├── signal_builder.h
│ │ ├── signal_compression.cpp
│ │ ├── signal_compression.h
│ │ ├── signal_table_reader.cpp
│ │ ├── signal_table_reader.h
│ │ ├── signal_table_schema.cpp
│ │ ├── signal_table_schema.h
│ │ ├── signal_table_utils.h
│ │ ├── signal_table_writer.cpp
│ │ ├── signal_table_writer.h
│ │ ├── svb16/
│ │ │ ├── common.hpp
│ │ │ ├── decode.hpp
│ │ │ ├── decode_scalar.hpp
│ │ │ ├── decode_x64.hpp
│ │ │ ├── encode.hpp
│ │ │ ├── encode_scalar.hpp
│ │ │ ├── encode_x64.hpp
│ │ │ ├── generate_shuffle_tables.py
│ │ │ ├── intrinsics.hpp
│ │ │ ├── shuffle_tables.hpp
│ │ │ ├── simd_detect_x64.hpp
│ │ │ ├── streamvbytedelta_decode_16.c
│ │ │ ├── streamvbytedelta_encode_16.c
│ │ │ ├── streamvbytedelta_x64_decode_16.c
│ │ │ ├── streamvbytedelta_x64_encode_16.c
│ │ │ ├── svb16.c
│ │ │ └── svb16.h
│ │ ├── table_reader.cpp
│ │ ├── table_reader.h
│ │ ├── thread_pool.cpp
│ │ ├── thread_pool.h
│ │ ├── tuple_utils.h
│ │ ├── types.cpp
│ │ ├── types.h
│ │ ├── uuid.h
│ │ └── version.h.in
│ ├── pod5_format_pybind/
│ │ ├── CMakeLists.txt
│ │ ├── _version.py.in
│ │ ├── api.h
│ │ ├── bindings.cpp
│ │ ├── build_wheel.cmake
│ │ ├── repack/
│ │ │ ├── repack_functions.h
│ │ │ ├── repack_output.cpp
│ │ │ ├── repack_output.h
│ │ │ ├── repack_states.h
│ │ │ ├── repack_utils.h
│ │ │ ├── repacker.cpp
│ │ │ └── repacker.h
│ │ ├── subset.cpp
│ │ ├── subset.h
│ │ └── utils.h
│ └── test/
│ ├── CMakeLists.txt
│ ├── TemporaryDirectory.h
│ ├── c_api_build_test.c
│ ├── c_api_null_input.cpp
│ ├── c_api_test_utils.h
│ ├── c_api_tests.cpp
│ ├── file_reader_writer_tests.cpp
│ ├── main.cpp
│ ├── output_stream_tests.cpp
│ ├── read_table_tests.cpp
│ ├── read_table_writer_utils_tests.cpp
│ ├── run_info_table_tests.cpp
│ ├── schema_tests.cpp
│ ├── signal_compression_tests.cpp
│ ├── signal_table_tests.cpp
│ ├── svb16_scalar_tests.cpp
│ ├── svb16_x64_tests.cpp
│ ├── test_utils.h
│ ├── thread_pool_tests.cpp
│ ├── utils.h
│ └── uuid_tests.cpp
├── ci/
│ ├── docker/
│ │ ├── Dockerfile.conda
│ │ ├── Dockerfile.py39.arm64
│ │ └── Dockerfile.py39.x64
│ ├── generate_coverage_report.sh
│ ├── get_tag_version.cmake
│ ├── gitlab-ci-common.yml
│ ├── install.sh
│ ├── package.sh
│ └── unpack_libs_for_python.sh
├── cmake/
│ ├── BuildFlatBuffers.cmake
│ ├── Findzstd.cmake
│ ├── conan_provider.cmake
│ ├── pod5_fuzz.cmake
│ ├── pod5_packaging.cmake
│ └── presets/
│ ├── conan-build-options.json
│ ├── conan-profiles.json
│ └── conan-provider.json
├── conanfile.py
├── docs/
│ ├── DESIGN.md
│ ├── README.md
│ ├── SPECIFICATION.md
│ └── tables/
│ ├── reads.toml
│ ├── run_info.toml
│ └── signal.toml
├── fuzz/
│ ├── .gitattributes
│ ├── CMakeLists.txt
│ ├── fuzz_compress.cpp
│ ├── fuzz_file.cpp
│ └── runner.cpp
├── pod5_make_version.py
├── pyproject.toml
├── pytest.ini
├── python/
│ ├── .gitignore
│ ├── lib_pod5/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── pyproject.toml
│ │ ├── setup.py
│ │ └── src/
│ │ ├── lib_pod5/
│ │ │ ├── __init__.py
│ │ │ ├── pod5_format_pybind.pyi
│ │ │ └── py.typed
│ │ └── test/
│ │ └── test_lib_pod5.py
│ └── pod5/
│ ├── Makefile
│ ├── README.md
│ ├── examples/
│ │ ├── find_all_reads.py
│ │ └── find_specific_reads.py
│ ├── pyproject.toml
│ ├── setup.py
│ ├── src/
│ │ ├── pod5/
│ │ │ ├── __init__.py
│ │ │ ├── api_utils.py
│ │ │ ├── dataset.py
│ │ │ ├── pod5_types.py
│ │ │ ├── reader.py
│ │ │ ├── repack.py
│ │ │ ├── signal_tools.py
│ │ │ ├── tools/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── main.py
│ │ │ │ ├── parsers.py
│ │ │ │ ├── pod5_convert_from_fast5.py
│ │ │ │ ├── pod5_convert_to_fast5.py
│ │ │ │ ├── pod5_filter.py
│ │ │ │ ├── pod5_inspect.py
│ │ │ │ ├── pod5_merge.py
│ │ │ │ ├── pod5_recover.py
│ │ │ │ ├── pod5_repack.py
│ │ │ │ ├── pod5_subset.py
│ │ │ │ ├── pod5_update.py
│ │ │ │ ├── pod5_view.py
│ │ │ │ ├── polars_utils.py
│ │ │ │ └── utils.py
│ │ │ └── writer.py
│ │ └── tests/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_api.py
│ │ ├── test_convert_from_fast5.py
│ │ ├── test_convert_to_fast5.py
│ │ ├── test_dataset.py
│ │ ├── test_filter.py
│ │ ├── test_inspect.py
│ │ ├── test_merge.py
│ │ ├── test_reader.py
│ │ ├── test_recover.py
│ │ ├── test_repack.py
│ │ ├── test_signal_tools.py
│ │ ├── test_subset.py
│ │ ├── test_tools.py
│ │ ├── test_update.py
│ │ ├── test_view.py
│ │ └── test_writer.py
│ └── test_utils/
│ └── check_pod5_files_equal.py
├── test_data/
│ ├── multi_fast5_zip.fast5
│ ├── multi_fast5_zip_v0.pod5
│ ├── multi_fast5_zip_v1.pod5
│ ├── multi_fast5_zip_v2.pod5
│ ├── multi_fast5_zip_v3.pod5
│ ├── multi_fast5_zip_v4.pod5
│ ├── single_read_fast5/
│ │ └── fe85b517-62ee-4a33-8767-41cab5d5ab39.fast5.single-read
│ ├── split_1_v4.pod5
│ ├── split_2_v4.pod5
│ └── subset_mapping_examples/
│ ├── read_ids.txt
│ ├── subset.csv
│ └── subset.summary
├── test_package/
│ ├── CMakeLists.txt
│ ├── conanfile.py
│ ├── test_cpp_api.cpp
│ └── test_package.cpp
└── third_party/
├── build_instructions.txt
├── gsl-disable-gsl-suppress.patch
├── include/
│ ├── .editorconfig
│ ├── catch2/
│ │ └── catch.hpp
│ ├── gsl/
│ │ ├── gsl
│ │ ├── gsl-lite-vc6.hpp
│ │ ├── gsl-lite.h
│ │ └── gsl-lite.hpp
│ └── gsl.h
├── jsoncons-0.166-icc-fix.patch
├── licenses/
│ ├── catch2.txt
│ └── gsl-lite.txt
└── software_versions.yaml
Copy disabled (too large)
Download .txt
Showing preview only (390,275K chars total). Download the full file to get everything.
SYMBOL INDEX (3153 symbols across 168 files)
FILE: benchmarks/run_benchmarks.py
function du (line 33) | def du(path):
function generate_report (line 38) | def generate_report(input_dir, output_dir, timing_results):
function check_read_ids (line 89) | def check_read_ids(benchmark, file_types, output_dir, only_format):
function check_file_sizes (line 104) | def check_file_sizes(benchmark, file_types, output_dir, only_format):
function copy_fast5_files (line 109) | def copy_fast5_files(benchmark, input_dir, output_dir):
function randomly_select_read_ids (line 113) | def randomly_select_read_ids(benchmark, input_dir, output_dir):
function run_benchmark (line 188) | def run_benchmark(benchmark, input_dir, output_dir, only_format=None):
function run_benchmarks (line 234) | def run_benchmarks(args):
function main (line 274) | def main():
FILE: benchmarks/tools/check_csvs_consistent.py
function check_consistency (line 10) | def check_consistency(df1, df2):
function main (line 20) | def main():
FILE: benchmarks/tools/find_and_get_fast5.py
function select_reads (line 11) | def select_reads(file, selection):
function run (line 24) | def run(input_dir, output, select_read_ids=None, get_columns=[]):
function main (line 60) | def main():
FILE: benchmarks/tools/find_and_get_pod5.py
function load_mapped_ids (line 20) | def load_mapped_ids(select_read_ids_data):
function do_batch_work (line 33) | def do_batch_work(filename, batches, column, mode, result_q):
function do_search_work (line 54) | def do_search_work(files, select_read_ids_data, column, mode, result_q):
function run_multiprocess (line 75) | def run_multiprocess(files, output, select_read_ids=None, column=None, m...
function run_get_read_ids (line 151) | def run_get_read_ids(files):
function run_select (line 163) | def run_select(files, select_read_ids, column):
function run_batched (line 190) | def run_batched(files, column):
function main (line 213) | def main():
FILE: benchmarks/tools/pyslow5_tests.py
function random_access (line 13) | def random_access(s5_file, read_list, col, result_q):
function run (line 37) | def run(s5_file, benchmark, select_read_ids, col):
function main (line 103) | def main():
FILE: benchmarks/tools/select-random-ids.py
function main (line 9) | def main():
FILE: c++/examples/find_all_read_data.cpp
function main (line 9) | int main(int argc, char ** argv)
FILE: c++/examples/find_all_read_ids.cpp
function main (line 9) | int main(int argc, char ** argv)
FILE: c++/examples/find_specific_read_ids.cpp
function main (line 8) | int main(int argc, char ** argv)
FILE: c++/examples/find_specific_read_ids_with_signal.cpp
function main (line 8) | int main(int argc, char ** argv)
FILE: c++/pod5_format/async_signal_loader.cpp
type pod5 (line 3) | namespace pod5 {
function Status (line 230) | Status AsyncSignalLoader::setup_next_in_progress_batch(std::unique_loc...
FILE: c++/pod5_format/async_signal_loader.h
function namespace (line 18) | namespace pod5 {
function complete_rows (line 96) | void complete_rows(std::uint32_t row_count) { m_completed_rows += row_co...
function class (line 113) | class POD5_FORMAT_EXPORT AsyncSignalLoader {
FILE: c++/pod5_format/c_api.cpp
type Pod5FileReader (line 21) | struct Pod5FileReader {
method Pod5FileReader (line 22) | Pod5FileReader(std::shared_ptr<pod5::FileReader> && reader_) : reader(...
type Pod5FileWriter (line 27) | struct Pod5FileWriter {
method Pod5FileWriter (line 28) | Pod5FileWriter(std::unique_ptr<pod5::FileWriter> && writer_) : writer(...
type Pod5ReadRecordBatch (line 33) | struct Pod5ReadRecordBatch {
method Pod5ReadRecordBatch (line 34) | Pod5ReadRecordBatch(
function pod5_set_error (line 51) | void pod5_set_error(arrow::Status status)
function pod5_reset_error (line 57) | void pod5_reset_error()
function check_string_not_empty (line 85) | bool check_string_not_empty(char const * str)
function check_not_null (line 100) | bool check_not_null(void const * ptr)
function check_file_not_null (line 109) | bool check_file_not_null(void const * file)
function check_output_pointer_not_null (line 118) | bool check_output_pointer_not_null(void const * output)
function make_internal_writer_options (line 128) | pod5::FileWriterOptions make_internal_writer_options(Pod5WriterOptions c...
function make_internal_reader_options (line 150) | pod5::FileReaderOptions make_internal_reader_options(Pod5ReaderOptions c...
function pod5_error_t (line 162) | pod5_error_t pod5_init()
function pod5_error_t (line 169) | pod5_error_t pod5_terminate()
function pod5_error_t (line 176) | pod5_error_t pod5_get_error_no() { return g_pod5_error_no; }
function Pod5FileReader (line 181) | Pod5FileReader * pod5_open_file(char const * filename)
method Pod5FileReader (line 22) | Pod5FileReader(std::shared_ptr<pod5::FileReader> && reader_) : reader(...
function Pod5FileReader (line 187) | Pod5FileReader * pod5_open_file_options(char const * filename, Pod5Reade...
method Pod5FileReader (line 22) | Pod5FileReader(std::shared_ptr<pod5::FileReader> && reader_) : reader(...
function pod5_error_t (line 205) | pod5_error_t pod5_close_and_free_reader(Pod5FileReader * file)
function pod5_error_t (line 214) | pod5_error_t pod5_get_file_info(Pod5FileReader_t const * reader, FileInf...
function pod5_error_t (line 232) | pod5_error_t pod5_get_file_read_table_location(
function pod5_error_t (line 249) | pod5_error_t pod5_get_file_signal_table_location(
function pod5_error_t (line 266) | pod5_error_t pod5_get_file_run_info_table_location(
function pod5_error_t (line 283) | pod5_error_t pod5_get_read_count(Pod5FileReader_t const * reader, size_t...
function pod5_error_t (line 296) | pod5_error_t pod5_get_read_ids(Pod5FileReader_t const * reader, size_t c...
function pod5_error_t (line 326) | pod5_error_t pod5_plan_traversal(
function pod5_error_t (line 360) | pod5_error_t pod5_get_read_batch_count(size_t * count, Pod5FileReader co...
function pod5_error_t (line 372) | pod5_error_t
function pod5_error_t (line 390) | pod5_error_t pod5_free_read_batch(Pod5ReadRecordBatch * batch)
function pod5_error_t (line 399) | pod5_error_t pod5_get_read_batch_row_count(size_t * count, Pod5ReadRecor...
function pod5_error_t (line 411) | static pod5_error_t check_row_index_and_set_error(size_t row, int64_t ba...
function pod5_error_t (line 425) | pod5_error_t pod5_get_read_batch_row_info_data(
function pod5_error_t (line 517) | pod5_error_t pod5_get_signal_row_indices(
function pod5_error_t (line 554) | pod5_error_t pod5_get_calibration_extra_info(
type RunInfoDataCHelper (line 588) | struct RunInfoDataCHelper : public RunInfoDictData {
type InternalMapHelper (line 589) | struct InternalMapHelper {
method RunInfoDataCHelper (line 594) | RunInfoDataCHelper(std::shared_ptr<pod5::RunInfoData const> && interna...
method KeyValueData (line 619) | KeyValueData map_to_c(pod5::RunInfoData::MapType const & map, Internal...
function pod5_error_t (line 642) | pod5_error_t pod5_get_run_info(
function pod5_error_t (line 661) | pod5_error_t pod5_get_file_run_info(
function pod5_error_t (line 679) | pod5_error_t pod5_free_run_info(RunInfoDictData_t * run_info_data)
function pod5_error_t (line 689) | pod5_error_t pod5_release_run_info(RunInfoDictData * run_info_data)
function pod5_error_t (line 694) | pod5_error_t pod5_get_file_run_info_count(
function pod5_error_t (line 709) | pod5_error_t pod5_get_end_reason(
function pod5_error_t (line 771) | pod5_error_t pod5_get_pore_type(
class SignalRowInfoCHelper (line 799) | class SignalRowInfoCHelper : public SignalRowInfo {
method SignalRowInfoCHelper (line 801) | SignalRowInfoCHelper(pod5::SignalTableRecordBatch && b) : batch(std::m...
function pod5_error_t (line 808) | pod5_error_t pod5_get_signal_row_info(
function pod5_error_t (line 868) | pod5_error_t pod5_free_signal_row_info(size_t signal_rows_count, SignalR...
function pod5_error_t (line 884) | pod5_error_t pod5_get_signal(
function pod5_error_t (line 906) | pod5_error_t pod5_get_read_complete_sample_count(
function pod5_error_t (line 929) | pod5_error_t pod5_get_read_complete_signal(
function Pod5FileWriter (line 953) | Pod5FileWriter *
method Pod5FileWriter (line 28) | Pod5FileWriter(std::unique_ptr<pod5::FileWriter> && writer_) : writer(...
function pod5_error_t (line 973) | pod5_error_t pod5_close_and_free_writer(Pod5FileWriter * file)
function pod5_error_t (line 986) | pod5_error_t pod5_add_pore(int16_t * pore_index, Pod5FileWriter * file, ...
function pod5_error_t (line 1000) | pod5_error_t pod5_add_run_info(
function check_read_data_struct (line 1097) | static bool check_read_data_struct(std::uint16_t struct_version, void co...
function load_struct_row_into_read_data (line 1154) | static bool load_struct_row_into_read_data(
function pod5_error_t (line 1266) | pod5_error_t pod5_add_reads_data(
function pod5_error_t (line 1308) | pod5_error_t pod5_add_reads_data_pre_compressed(
function pod5_vbz_compressed_signal_max_size (line 1371) | size_t pod5_vbz_compressed_signal_max_size(size_t sample_count)
function pod5_error_t (line 1385) | pod5_error_t pod5_vbz_compress_signal(
function pod5_error_t (line 1420) | pod5_error_t pod5_vbz_decompress_signal(
function pod5_error_t (line 1440) | pod5_error_t pod5_format_read_id(read_id_t const read_id, char * read_id...
FILE: c++/pod5_format/c_api.h
type Pod5FileReader (line 23) | struct Pod5FileReader
type Pod5FileReader_t (line 24) | typedef struct Pod5FileReader Pod5FileReader_t;
type Pod5FileWriter (line 25) | struct Pod5FileWriter
type Pod5FileWriter_t (line 26) | typedef struct Pod5FileWriter Pod5FileWriter_t;
type Pod5ReadRecordBatch (line 27) | struct Pod5ReadRecordBatch
type Pod5ReadRecordBatch_t (line 28) | typedef struct Pod5ReadRecordBatch Pod5ReadRecordBatch_t;
type pod5_error (line 36) | enum pod5_error {
type pod5_error_t (line 51) | typedef enum pod5_error pod5_error_t;
type pod5_end_reason (line 72) | enum pod5_end_reason {
type pod5_end_reason_t (line 84) | typedef enum pod5_end_reason pod5_end_reason_t;
type run_info_index_t (line 86) | typedef uint16_t run_info_index_t;
type ReadBatchRowInfoV3 (line 92) | struct ReadBatchRowInfoV3 {
type ReadBatchRowInfoV4 (line 148) | struct ReadBatchRowInfoV4 {
type ReadBatchRowInfo_t (line 207) | typedef struct ReadBatchRowInfoV4 ReadBatchRowInfo_t;
function ReadBatchRowInfoArrayV3 (line 209) | struct POD5_DEPRECATED ReadBatchRowInfoArrayV3 {
type ReadBatchRowInfoArrayV4 (line 259) | struct ReadBatchRowInfoArrayV4 {
type ReadBatchRowInfoArray_t (line 312) | typedef struct ReadBatchRowInfoArrayV4 ReadBatchRowInfoArray_t;
type Pod5ReaderOptions (line 331) | struct Pod5ReaderOptions {
type Pod5ReaderOptions_t (line 336) | typedef struct Pod5ReaderOptions Pod5ReaderOptions_t;
type FileInfo (line 358) | struct FileInfo {
type FileInfo_t (line 367) | typedef struct FileInfo FileInfo_t;
type EmbeddedFileData (line 375) | struct EmbeddedFileData {
type EmbeddedFileData_t (line 382) | typedef struct EmbeddedFileData EmbeddedFileData_t;
type CalibrationExtraData (line 489) | struct CalibrationExtraData {
type CalibrationExtraData_t (line 497) | typedef struct CalibrationExtraData CalibrationExtraData_t;
type KeyValueData (line 509) | struct KeyValueData {
type RunInfoDictData (line 515) | struct RunInfoDictData {
type RunInfoDictData_t (line 537) | typedef struct RunInfoDictData RunInfoDictData_t;
type SignalRowInfo (line 602) | struct SignalRowInfo {
type SignalRowInfo_t (line 608) | typedef struct SignalRowInfo SignalRowInfo_t;
type CompressionOption (line 671) | enum CompressionOption {
type Pod5WriterOptions (line 681) | struct Pod5WriterOptions {
type Pod5WriterOptions_t (line 694) | typedef struct Pod5WriterOptions Pod5WriterOptions_t;
FILE: c++/pod5_format/dictionary_writer.h
function namespace (line 6) | namespace arrow {
function namespace (line 10) | namespace pod5 {
FILE: c++/pod5_format/expandable_buffer.h
function namespace (line 9) | namespace pod5 {
FILE: c++/pod5_format/file_output_stream.h
function namespace (line 6) | namespace pod5 {
FILE: c++/pod5_format/file_reader.cpp
type pod5 (line 20) | namespace pod5 {
function warn_if_stat_size_and_blocks_differ_significantly (line 28) | void warn_if_stat_size_and_blocks_differ_significantly(std::string con...
function warn_if_stat_size_and_blocks_differ_significantly (line 58) | void warn_if_stat_size_and_blocks_differ_significantly(std::string con...
function FileLocation (line 74) | inline FileLocation make_file_locaton(combined_file_utils::ParsedFileI...
class FileReaderImpl (line 82) | class FileReaderImpl : public FileReader {
method FileReaderImpl (line 84) | FileReaderImpl(
method SchemaMetadataDescription (line 101) | SchemaMetadataDescription schema_metadata() const override
method run_info_count (line 106) | Result<std::size_t> run_info_count() const override
method read_count (line 111) | virtual Result<std::size_t> read_count() const override
method read_read_record_batch (line 124) | Result<ReadTableRecordBatch> read_read_record_batch(std::size_t i) c...
method num_read_record_batches (line 129) | std::size_t num_read_record_batches() const override
method search_for_read_ids (line 134) | Result<std::size_t> search_for_read_ids(
method read_signal_record_batch (line 142) | Result<SignalTableRecordBatch> read_signal_record_batch(std::size_t ...
method num_signal_record_batches (line 147) | std::size_t num_signal_record_batches() const override
method signal_batch_for_row_id (line 152) | Result<std::size_t> signal_batch_for_row_id(std::size_t row, std::si...
method extract_sample_count (line 158) | Result<std::size_t> extract_sample_count(
method Status (line 164) | Status extract_samples(
method extract_samples_inplace (line 171) | Result<std::vector<std::shared_ptr<arrow::Buffer>>> extract_samples_...
method FileLocation (line 178) | FileLocation const & run_info_table_location() const override
method FileLocation (line 183) | FileLocation const & read_table_location() const override { return m...
method FileLocation (line 185) | FileLocation const & signal_table_location() const override { return...
method Version (line 187) | Version file_version_pre_migration() const override { return m_file_...
method SignalType (line 189) | SignalType signal_type() const override { return m_signal_table_read...
method find_run_info (line 191) | Result<std::shared_ptr<RunInfoData const>> find_run_info(
method get_run_info (line 197) | Result<std::shared_ptr<RunInfoData const>> get_run_info(std::size_t ...
method get_run_info_count (line 202) | Result<std::size_t> get_run_info_count() const override
function open_file_reader (line 218) | pod5::Result<std::shared_ptr<FileReader>> open_file_reader(
FILE: c++/pod5_format/file_reader.h
function namespace (line 11) | namespace arrow {
function namespace (line 17) | namespace pod5 {
FILE: c++/pod5_format/file_recovery.h
function namespace (line 13) | namespace pod5 {
FILE: c++/pod5_format/file_updater.cpp
type pod5 (line 10) | namespace pod5 {
function update_file (line 12) | pod5::Status update_file(
FILE: c++/pod5_format/file_updater.h
function namespace (line 7) | namespace arrow {
function namespace (line 11) | namespace pod5 {
FILE: c++/pod5_format/file_writer.cpp
type CachedFileValues (line 33) | struct CachedFileValues {
type FlushMode (line 38) | enum class FlushMode { Default, ForceFlushOnBatchComplete }
function make_file_stream (line 40) | arrow::Result<std::shared_ptr<pod5::FileOutputStream>> make_file_stream(
type pod5 (line 93) | namespace pod5 {
class FileWriterImpl (line 112) | class FileWriterImpl {
class WriterTypeImpl (line 114) | class WriterTypeImpl
type DictionaryWriters (line 116) | struct DictionaryWriters {
method FileWriterImpl (line 122) | FileWriterImpl(
method lookup_end_reason (line 142) | pod5::Result<EndReasonDictionaryIndex> lookup_end_reason(ReadEndReas...
method add_pore_type (line 147) | pod5::Result<PoreDictionaryIndex> add_pore_type(std::string const & ...
method add_run_info (line 152) | pod5::Result<RunInfoDictionaryIndex> add_run_info(RunInfoData const ...
method add_complete_read (line 158) | pod5::Status add_complete_read(
method add_complete_read (line 177) | pod5::Status add_complete_read(
method check_read (line 194) | arrow::Status check_read(ReadData const & read_data)
method add_signal (line 211) | pod5::Result<std::vector<SignalTableRowIndex>> add_signal(
method add_pre_compressed_signal (line 238) | pod5::Result<SignalTableRowIndex> add_pre_compressed_signal(
method add_signal_batch (line 251) | pod5::Result<std::pair<SignalTableRowIndex, SignalTableRowIndex>> ad...
method SignalType (line 263) | SignalType signal_type() const { return m_signal_table_writer->signa...
method signal_table_batch_size (line 265) | std::size_t signal_table_batch_size() const
method close_run_info_table_writer (line 270) | pod5::Status close_run_info_table_writer()
method close_read_table_writer (line 279) | pod5::Status close_read_table_writer()
method close_signal_table_writer (line 288) | pod5::Status close_signal_table_writer()
method is_closed (line 299) | bool is_closed() const
method RunInfoTableWriter (line 307) | RunInfoTableWriter * run_info_table_writer()
method ReadTableWriter (line 315) | ReadTableWriter * read_table_writer()
method SignalTableWriter (line 323) | SignalTableWriter * signal_table_writer()
class CombinedFileWriterImpl (line 340) | class CombinedFileWriterImpl : public FileWriterImpl {
method CombinedFileWriterImpl (line 342) | CombinedFileWriterImpl(
method path (line 373) | std::string path() const override { return m_path; }
method close (line 375) | arrow::Status close() override
function SignalType (line 511) | SignalType FileWriter::signal_type() const { return m_impl->signal_typ...
function make_dictionary_writers (line 518) | pod5::Result<FileWriterImpl::DictionaryWriters> make_dictionary_writer...
function make_reads_tmp_path (line 529) | std::string make_reads_tmp_path(
function make_run_info_tmp_path (line 536) | std::string make_run_info_tmp_path(
function create_file_writer (line 544) | pod5::Result<std::unique_ptr<FileWriter>> create_file_writer(
function Status (line 655) | static Status add_recovery_failure_context(
function Status (line 670) | static Status append_recovered_file(
type TemporaryFilePaths (line 693) | struct TemporaryFilePaths {
function recover_file (line 699) | static pod5::Status recover_file(
function is_useless (line 779) | static bool is_useless(std::filesystem::path const & file_path)
function remove_if_useless (line 801) | static void remove_if_useless(std::filesystem::path const & file_path)
function try_remove (line 808) | static std::optional<CleanupError> try_remove(std::string const & file...
function Status (line 818) | static Status add_clean_up_error(Status status, std::filesystem::files...
function recover_file (line 823) | pod5::Result<RecoveryDetails> recover_file(
FILE: c++/pod5_format/file_writer.h
function namespace (line 11) | namespace arrow {
function namespace (line 16) | namespace pod5 {
FILE: c++/pod5_format/internal/async_output_stream.h
type PrivateDummy (line 19) | struct PrivateDummy {}
function override (line 70) | const override
function set_file_start_offset (line 162) | void set_file_start_offset(std::size_t val) override { m_file_start_offs...
function FILE (line 205) | FILE * get_or_open_file_handle([[maybe_unused]] std::lock_guard<std::mut...
function close_file_handle (line 215) | void close_file_handle([[maybe_unused]] std::lock_guard<std::mutex> & lock)
function set_error (line 223) | void set_error(arrow::Status status)
function FILE (line 253) | FILE * m_file_handle{nullptr};
FILE: c++/pod5_format/internal/combined_file_utils.h
function pod5 (line 24) | inline pod5::Status pad_file(
function pod5 (line 38) | inline pod5::Status write_file_signature(std::shared_ptr<arrow::io::Outp...
function pod5 (line 43) | inline pod5::Status write_section_marker(
function pod5 (line 50) | inline pod5::Status write_combined_header(
function pod5 (line 58) | inline pod5::Status write_footer_magic(std::shared_ptr<arrow::io::Output...
type FileInfo (line 63) | struct FileInfo {
function FileInfo (line 68) | struct ParsedFileInfo : FileInfo {
function pod5 (line 83) | inline pod5::Result<std::int64_t> write_footer_flatbuffer(
function arrow (line 365) | inline arrow::Result<std::shared_ptr<SubFile>> open_sub_file(ParsedFileI...
function arrow (line 383) | inline arrow::Result<std::shared_ptr<SubFile>> open_sub_file(
function SubFileCleanup (line 399) | enum class SubFileCleanup { CleanupOriginalFile, LeaveOrignalFile };
FILE: c++/pod5_format/internal/linux_output_stream.h
function namespace (line 19) | namespace pod5 {
FILE: c++/pod5_format/io_manager.cpp
type pod5 (line 7) | namespace pod5 {
class IOManagerSyncImpl (line 10) | class IOManagerSyncImpl : public IOManager {
method IOManagerSyncImpl (line 12) | IOManagerSyncImpl(arrow::MemoryPool * memory_pool) : m_memory_pool(m...
method allocate_new_write (line 14) | arrow::Result<std::shared_ptr<QueuedWrite>> allocate_new_write(std::...
method return_used_write (line 34) | arrow::Status return_used_write(std::shared_ptr<QueuedWrite> && used...
method write_buffer (line 43) | arrow::Status write_buffer(std::shared_ptr<QueuedWrite> && data) ove...
function make_sync_io_manager (line 74) | arrow::Result<std::shared_ptr<IOManager>> make_sync_io_manager(arrow::...
FILE: c++/pod5_format/io_manager.h
function prepare_for_write (line 36) | void prepare_for_write(int file_descriptor, std::uint64_t offset)
function iovec (line 52) | iovec * get_iovec_for_buffer() { return &m_iovec; }
type class (line 54) | enum class
function set_state (line 58) | void set_state(WriteState state) { m_state = state; }
function iovec (line 63) | iovec m_iovec{}
function m_file_descriptor (line 64) | int m_file_descriptor{-1};
FILE: c++/pod5_format/memory_pool.cpp
function os_page_detect (line 13) | size_t os_page_detect(void)
type pod5 (line 36) | namespace pod5 {
FILE: c++/pod5_format/memory_pool.h
function namespace (line 4) | namespace pod5 {
FILE: c++/pod5_format/migration/migration.cpp
type pod5 (line 5) | namespace pod5 {
function register_delete_at_exit (line 10) | void register_delete_at_exit(arrow::internal::PlatformFilename const &...
function MakeTmpDir (line 33) | Result<std::unique_ptr<TemporaryDir>> MakeTmpDir(char const * suffix)
FILE: c++/pod5_format/migration/migration.h
function namespace (line 11) | namespace pod5 {
FILE: c++/pod5_format/migration/migration_utils.h
function namespace (line 14) | namespace pod5 {
FILE: c++/pod5_format/migration/v0_to_v1.cpp
type pod5 (line 11) | namespace pod5 {
function migrate_v0_to_v1 (line 13) | arrow::Result<MigrationResult> migrate_v0_to_v1(
FILE: c++/pod5_format/migration/v1_to_v2.cpp
type pod5 (line 12) | namespace pod5 {
function get_num_samples (line 14) | arrow::Result<std::size_t> get_num_samples(
function migrate_v1_to_v2 (line 65) | arrow::Result<MigrationResult> migrate_v1_to_v2(
FILE: c++/pod5_format/migration/v2_to_v3.cpp
type pod5 (line 13) | namespace pod5 {
type StructRow (line 15) | struct StructRow {
type StringDictBuilder (line 20) | struct StringDictBuilder {
method finish (line 24) | arrow::Result<std::shared_ptr<arrow::Array>> finish()
function get_dict_struct (line 42) | arrow::Result<StructRow> get_dict_struct(
function append_struct_row (line 66) | arrow::Status
function append_struct_row_to_dict (line 85) | arrow::Status append_struct_row_to_dict(
function migrate_v2_to_v3 (line 116) | arrow::Result<MigrationResult> migrate_v2_to_v3(
FILE: c++/pod5_format/migration/v3_to_v4.cpp
type pod5 (line 11) | namespace pod5 {
function migrate_v3_to_v4 (line 13) | arrow::Result<MigrationResult> migrate_v3_to_v4(
FILE: c++/pod5_format/read_table_reader.cpp
type pod5 (line 15) | namespace pod5 {
function ReadTableReader (line 212) | ReadTableReader & ReadTableReader::operator=(ReadTableReader && other)
function Status (line 227) | Status ReadTableReader::build_read_id_lookup() const
function make_read_table_reader (line 331) | Result<ReadTableReader> make_read_table_reader(
FILE: c++/pod5_format/read_table_reader.h
function namespace (line 17) | namespace arrow {
type ReadTableRecordColumns (line 37) | struct ReadTableRecordColumns {
function Dict (line 92) | enum class Dict : std::size_t { Pore, EndReason, RunInfo, Max };
type IndexData (line 119) | struct IndexData {
FILE: c++/pod5_format/read_table_schema.cpp
type pod5 (line 6) | namespace pod5 {
function TableSpecVersion (line 66) | TableSpecVersion ReadTableSchemaDescription::table_version_from_file_v...
function read_read_table_schema (line 72) | Result<std::shared_ptr<ReadTableSchemaDescription const>> read_read_ta...
FILE: c++/pod5_format/read_table_schema.h
function namespace (line 13) | namespace arrow {
function namespace (line 20) | namespace pod5 {
FILE: c++/pod5_format/read_table_utils.cpp
type pod5 (line 5) | namespace pod5 {
FILE: c++/pod5_format/read_table_utils.h
function namespace (line 13) | namespace pod5 {
function ReadEndReason (line 219) | enum class ReadEndReason : std::uint8_t {
FILE: c++/pod5_format/read_table_writer.cpp
type pod5 (line 12) | namespace pod5 {
function Status (line 100) | Status ReadTableWriter::close()
function Status (line 113) | Status ReadTableWriter::write_batch(arrow::RecordBatch const & record_...
function Status (line 119) | Status ReadTableWriter::write_batch()
function Status (line 142) | Status ReadTableWriter::reserve_rows()
function make_read_table_writer (line 152) | Result<ReadTableWriter> make_read_table_writer(
FILE: c++/pod5_format/read_table_writer.h
function namespace (line 13) | namespace arrow {
function namespace (line 21) | namespace pod5 {
FILE: c++/pod5_format/read_table_writer_utils.cpp
type pod5 (line 10) | namespace pod5 {
type detail (line 12) | namespace detail {
function get_array_data (line 14) | arrow::Result<std::shared_ptr<arrow::ArrayData>> get_array_data(
function make_pore_writer (line 41) | arrow::Result<std::shared_ptr<PoreWriter>> make_pore_writer(arrow::Mem...
function make_end_reason_writer (line 46) | arrow::Result<std::shared_ptr<EndReasonWriter>> make_end_reason_writer...
function make_run_info_writer (line 61) | arrow::Result<std::shared_ptr<RunInfoWriter>> make_run_info_writer(arr...
FILE: c++/pod5_format/read_table_writer_utils.h
function namespace (line 19) | namespace pod5 {
FILE: c++/pod5_format/result.h
function namespace (line 5) | namespace pod5 {
FILE: c++/pod5_format/run_info_table_reader.cpp
type pod5 (line 14) | namespace pod5 {
function value_for_map (line 16) | inline std::vector<std::pair<std::string, std::string>> value_for_map(
function RunInfoTableRecordBatch (line 47) | RunInfoTableRecordBatch & RunInfoTableRecordBatch::operator=(RunInfoTa...
function RunInfoTableReader (line 107) | RunInfoTableReader & RunInfoTableReader::operator=(RunInfoTableReader ...
function make_run_info_table_reader (line 248) | Result<RunInfoTableReader> make_run_info_table_reader(
FILE: c++/pod5_format/run_info_table_reader.h
function namespace (line 17) | namespace arrow {
function namespace (line 29) | namespace pod5 {
FILE: c++/pod5_format/run_info_table_schema.cpp
type pod5 (line 6) | namespace pod5 {
function TableSpecVersion (line 58) | TableSpecVersion RunInfoTableSchemaDescription::table_version_from_fil...
function read_run_info_table_schema (line 64) | Result<std::shared_ptr<RunInfoTableSchemaDescription const>> read_run_...
FILE: c++/pod5_format/run_info_table_schema.h
function namespace (line 13) | namespace arrow {
function namespace (line 20) | namespace pod5 {
FILE: c++/pod5_format/run_info_table_writer.cpp
type pod5 (line 13) | namespace pod5 {
function Status (line 82) | Status RunInfoTableWriter::close()
function Status (line 95) | Status RunInfoTableWriter::write_batch(arrow::RecordBatch const & reco...
function Status (line 101) | Status RunInfoTableWriter::write_batch()
function Status (line 124) | Status RunInfoTableWriter::reserve_rows()
function make_run_info_table_writer (line 134) | Result<RunInfoTableWriter> make_run_info_table_writer(
FILE: c++/pod5_format/run_info_table_writer.h
function namespace (line 11) | namespace arrow {
function namespace (line 19) | namespace pod5 {
FILE: c++/pod5_format/schema_field_builder.h
function namespace (line 10) | namespace pod5 {
function Status (line 265) | Status append(AppendArgs const &... args)
FILE: c++/pod5_format/schema_metadata.cpp
type pod5 (line 8) | namespace pod5 {
function parse_version_number (line 10) | Result<Version> parse_version_number(std::string const & ver)
function Version (line 57) | Version current_build_version_number()
function make_schema_key_value_metadata (line 62) | Result<std::shared_ptr<arrow::KeyValueMetadata const>> make_schema_key...
function read_schema_key_value_metadata (line 84) | Result<SchemaMetadataDescription> read_schema_key_value_metadata(
FILE: c++/pod5_format/schema_metadata.h
function namespace (line 11) | namespace arrow {
function namespace (line 15) | namespace pod5 {
FILE: c++/pod5_format/schema_utils.cpp
type pod5 (line 3) | namespace pod5 {
function Status (line 21) | Status SchemaDescriptionBase::read_schema(
FILE: c++/pod5_format/schema_utils.h
function namespace (line 8) | namespace pod5 {
FILE: c++/pod5_format/signal_builder.h
function namespace (line 14) | namespace pod5 {
FILE: c++/pod5_format/signal_compression.cpp
type pod5 (line 13) | namespace pod5 {
class DecompressContext (line 20) | class DecompressContext {
type DCtxDeleter (line 21) | struct DCtxDeleter {
method DecompressContext (line 28) | DecompressContext() { m_context.reset(ZSTD_createDCtx()); }
method ZSTD_DCtx (line 30) | ZSTD_DCtx * get() { return m_context.get(); }
function compressed_signal_max_size (line 37) | arrow::Result<std::size_t> compressed_signal_max_size(std::size_t samp...
function compress_signal (line 59) | arrow::Result<std::size_t> compress_signal(
function compress_signal (line 108) | arrow::Result<std::shared_ptr<arrow::Buffer>> compress_signal(
function decompress_signal (line 127) | arrow::Status decompress_signal(
function decompress_signal (line 234) | arrow::Result<std::shared_ptr<arrow::Buffer>> decompress_signal(
FILE: c++/pod5_format/signal_compression.h
function namespace (line 8) | namespace arrow {
function namespace (line 13) | namespace pod5 {
FILE: c++/pod5_format/signal_table_reader.cpp
type pod5 (line 13) | namespace pod5 {
type SignalTableReaderCacheCleaner (line 15) | struct SignalTableReaderCacheCleaner {
method make_space_in_table_batches (line 16) | static void make_space_in_table_batches(
function Status (line 89) | Status SignalTableRecordBatch::extract_signal_row(
function SignalTableReader (line 192) | SignalTableReader & SignalTableReader::operator=(SignalTableReader && ...
function Status (line 269) | Status SignalTableReader::extract_samples(
function SignalType (line 317) | SignalType SignalTableReader::signal_type() const { return m_field_loc...
function make_signal_table_reader (line 320) | Result<SignalTableReader> make_signal_table_reader(
FILE: c++/pod5_format/signal_table_reader.h
function namespace (line 17) | namespace arrow {
function namespace (line 29) | namespace pod5 {
FILE: c++/pod5_format/signal_table_schema.cpp
type pod5 (line 8) | namespace pod5 {
function make_signal_table_schema (line 10) | std::shared_ptr<arrow::Schema> make_signal_table_schema(
function read_signal_table_schema (line 41) | Result<SignalTableSchemaDescription> read_signal_table_schema(
FILE: c++/pod5_format/signal_table_schema.h
function namespace (line 9) | namespace arrow {
function namespace (line 14) | namespace pod5 {
FILE: c++/pod5_format/signal_table_utils.h
function namespace (line 3) | namespace pod5 {
FILE: c++/pod5_format/signal_table_writer.cpp
type pod5 (line 16) | namespace pod5 {
function Status (line 132) | Status SignalTableWriter::close()
function SignalType (line 146) | SignalType SignalTableWriter::signal_type() const { return m_field_loc...
function Status (line 148) | Status SignalTableWriter::write_batch(arrow::RecordBatch const & recor...
function Status (line 154) | Status SignalTableWriter::write_batch()
function Status (line 182) | Status SignalTableWriter::reserve_rows()
function make_signal_table_writer (line 198) | Result<SignalTableWriter> make_signal_table_writer(
FILE: c++/pod5_format/signal_table_writer.h
function namespace (line 12) | namespace arrow {
function namespace (line 20) | namespace pod5 {
FILE: c++/pod5_format/svb16/common.hpp
function svb16_popcount (line 30) | inline int svb16_popcount(unsigned int i)
FILE: c++/pod5_format/svb16/decode.hpp
type svb16 (line 14) | namespace svb16 {
function decode_input_buffer_padding_byte_count (line 19) | inline std::size_t decode_input_buffer_padding_byte_count()
function decode (line 29) | size_t decode(gsl::span<Int16T> out, gsl::span<uint8_t const> in, Int1...
function validate (line 42) | inline bool validate(gsl::span<uint8_t const> compressed_input, std::s...
FILE: c++/pod5_format/svb16/decode_scalar.hpp
type svb16 (line 12) | namespace svb16 {
type detail (line 13) | namespace detail {
function zigzag_decode (line 14) | inline uint16_t zigzag_decode(uint16_t val)
function decode_data (line 19) | inline uint16_t decode_data(gsl::span<uint8_t const>::iterator & dat...
function SVB16_IF_CONSTEXPR (line 62) | SVB16_IF_CONSTEXPR(UseZigzag) { value = detail::zigzag_decode(value); }
function SVB16_IF_CONSTEXPR (line 63) | SVB16_IF_CONSTEXPR(UseDelta)
FILE: c++/pod5_format/svb16/decode_x64.hpp
type svb16 (line 16) | namespace svb16 {
type detail (line 17) | namespace detail {
function __m128i (line 18) | [[gnu::target("ssse3")]] inline __m128i zigzag_decode(__m128i val)
function __m128i (line 29) | [[gnu::target("ssse3")]] inline __m128i unpack(uint32_t key, uint8_t...
function store_8 (line 42) | [[gnu::target("ssse3")]] inline void store_8(Int16T * to, __m128i va...
function SVB16_IF_CONSTEXPR (line 97) | SVB16_IF_CONSTEXPR(UseDelta) { prev_reg = _mm_set1_epi16(prev); }
FILE: c++/pod5_format/svb16/encode.hpp
type svb16 (line 11) | namespace svb16 {
function encode (line 14) | size_t encode(Int16T const * in, uint8_t * SVB_RESTRICT out, uint32_t ...
FILE: c++/pod5_format/svb16/encode_scalar.hpp
type svb16 (line 9) | namespace svb16 {
type detail (line 10) | namespace detail {
function zigzag_encode (line 11) | inline uint16_t zigzag_encode(uint16_t val)
function SVB16_IF_CONSTEXPR (line 38) | SVB16_IF_CONSTEXPR(UseDelta)
function else (line 45) | else SVB16_IF_CONSTEXPR(UseZigzag) {
FILE: c++/pod5_format/svb16/encode_x64.hpp
type svb16 (line 14) | namespace svb16 {
type detail (line 15) | namespace detail {
function __m128i (line 16) | [[gnu::target("ssse3")]] inline __m128i delta(__m128i curr, __m128i ...
function __m128i (line 21) | [[gnu::target("ssse3")]] inline __m128i zigzag_encode(__m128i val)
function __m128i (line 27) | [[gnu::target("ssse3")]] inline __m128i load_8(Int16T const * from, ...
function SVB16_IF_CONSTEXPR (line 61) | SVB16_IF_CONSTEXPR(UseDelta) { prev_reg = _mm_set1_epi16(prev); }
function SVB16_IF_CONSTEXPR (line 111) | SVB16_IF_CONSTEXPR(UseDelta) { prev = _mm_extract_epi16(prev_reg, 7); }
FILE: c++/pod5_format/svb16/generate_shuffle_tables.py
function encode_table_row (line 1) | def encode_table_row(control):
function decode_table_row (line 17) | def decode_table_row(control):
function print_x64_encode_table (line 31) | def print_x64_encode_table():
function print_x64_decode_table (line 39) | def print_x64_decode_table():
FILE: c++/pod5_format/svb16/intrinsics.hpp
type svb16 (line 15) | namespace svb16 { namespace detail {
type detail (line 15) | namespace detail {
function __m128i (line 16) | [[gnu::target("sse2")]] inline constexpr __m128i m128i_from_bytes(
FILE: c++/pod5_format/svb16/simd_detect_x64.hpp
function has_ssse3 (line 14) | inline constexpr bool has_ssse3() { return true; }
function has_sse4_1 (line 16) | inline constexpr bool has_sse4_1() { return true; }
type CpuidResult (line 20) | struct CpuidResult {
function CpuidResult (line 27) | inline CpuidResult cpuid(unsigned int leaf, unsigned int subleaf)
function cpuid_leaf1_ecx (line 47) | inline unsigned int cpuid_leaf1_ecx()
function has_ssse3 (line 55) | inline constexpr bool has_ssse3() { return true; }
function has_ssse3 (line 57) | inline bool has_ssse3() { return (cpuid_leaf1_ecx() & (1 << 9)) != 0; }
function has_sse4_1 (line 60) | inline bool has_sse4_1() { return (cpuid_leaf1_ecx() & (1 << 19)) != 0; }
FILE: c++/pod5_format/svb16/streamvbytedelta_decode_16.c
function zigzag_decode_16 (line 6) | static inline uint16_t zigzag_decode_16(uint16_t val)
function _decode_data (line 11) | static inline uint16_t _decode_data(uint8_t const ** dataPtrPtr, uint8_t...
function streamvbyte_zigzag_delta_decode_16 (line 63) | size_t streamvbyte_zigzag_delta_decode_16(
FILE: c++/pod5_format/svb16/streamvbytedelta_encode_16.c
function _zigzag_encode_16 (line 11) | static inline uint16_t _zigzag_encode_16(uint16_t val)
function _encode_data (line 16) | static uint8_t _encode_data(uint16_t val, uint8_t * __restrict__ * dataP...
function streamvbyte_zigzag_delta_encode_16 (line 65) | size_t streamvbyte_zigzag_delta_encode_16(
FILE: c++/pod5_format/svb16/streamvbytedelta_x64_decode_16.c
function STREAMVBYTE_TARGET_SSSE3 (line 7) | STREAMVBYTE_TARGET_SSSE3
function __m128i (line 22) | static inline __m128i _decode_avx(uint32_t key, uint8_t const * __restri...
function _write_avx (line 37) | static inline void _write_avx(uint16_t * out, __m128i Vec)
function __m128i (line 45) | static inline __m128i _write_16bit_avx_d1(uint16_t * out, __m128i Vec, _...
FILE: c++/pod5_format/svb16/streamvbytedelta_x64_encode_16.c
function STREAMVBYTE_TARGET_SSSE3 (line 10) | STREAMVBYTE_TARGET_SSSE3
function __m128i (line 20) | static __m128i zigzag_16(__m128i buf)
function streamvbyte_zigzag_delta_encode_SSSE3_d1_init (line 29) | size_t streamvbyte_zigzag_delta_encode_SSSE3_d1_init(
FILE: c++/pod5_format/svb16/svb16.h
function svb16_key_length (line 11) | inline uint32_t svb16_key_length(uint32_t count)
function svb16_max_encoded_length (line 18) | inline uint32_t svb16_max_encoded_length(uint32_t count)
FILE: c++/pod5_format/table_reader.cpp
type pod5 (line 7) | namespace pod5 {
function ReadRecordBatchAndValidate (line 53) | Result<std::shared_ptr<arrow::RecordBatch>> ReadRecordBatchAndValidate(
FILE: c++/pod5_format/table_reader.h
function namespace (line 8) | namespace arrow {
function namespace (line 17) | namespace pod5 {
FILE: c++/pod5_format/thread_pool.cpp
type pod5 (line 13) | namespace pod5 {
class ThreadPoolImpl (line 17) | class ThreadPoolImpl : public ThreadPool, public std::enable_shared_fr...
method ThreadPoolImpl (line 19) | ThreadPoolImpl(std::size_t worker_count)
method run_thread (line 29) | void run_thread()
method post (line 80) | void post(std::function<void()> callback) override
method post (line 93) | void post(std::function<void()> callback, uint64_t const strand_id)
method stop_and_drain (line 113) | void stop_and_drain() override
method wait_for_drain (line 129) | void wait_for_drain() override
type WorkItem (line 144) | struct WorkItem {
class StrandImpl (line 163) | class StrandImpl : public ThreadPoolStrand {
method StrandImpl (line 165) | StrandImpl(std::shared_ptr<ThreadPoolImpl> pool, uint64_t const stra...
method post (line 171) | void post(std::function<void()> callback) override
function make_thread_pool (line 194) | std::shared_ptr<ThreadPool> make_thread_pool(std::size_t worker_threads)
FILE: c++/pod5_format/thread_pool.h
function namespace (line 8) | namespace pod5 {
FILE: c++/pod5_format/tuple_utils.h
function namespace (line 6) | namespace pod5 { namespace detail {
FILE: c++/pod5_format/types.cpp
type pod5 (line 9) | namespace pod5 {
function Uuid (line 11) | Uuid const * UuidArray::raw_values() const
function Uuid (line 17) | Uuid UuidArray::Value(int64_t i) const
function make_read_id_builder (line 103) | std::unique_ptr<arrow::FixedSizeBinaryBuilder> make_read_id_builder(ar...
function register_extension_types (line 138) | pod5::Status register_extension_types()
function unregister_extension_types (line 148) | pod5::Status unregister_extension_types()
function check_extension_types_registered (line 163) | bool check_extension_types_registered()
FILE: c++/pod5_format/types.h
function namespace (line 11) | namespace pod5 {
FILE: c++/pod5_format/uuid.h
function namespace (line 36) | namespace pod5 {
function swap (line 137) | void swap(Uuid & other) noexcept { m_data.swap(other.m_data); }
function to_c_array (line 143) | void to_c_array(value_type (&arr)[16]) const noexcept
function std (line 164) | [[nodiscard]] constexpr static std::optional<Uuid> from_string(
function swap (line 258) | inline void swap(Uuid & lhs, Uuid & rhs) noexcept { lhs.swap(rhs); }
function explicit (line 265) | explicit BasicUuidRandomGenerator(engine_type & gen) : generator(&gen) {}
function explicit (line 267) | explicit BasicUuidRandomGenerator(engine_type * gen) : generator(gen) {}
function Uuid (line 269) | [[nodiscard]] Uuid operator()()
function namespace (line 296) | namespace std {
FILE: c++/pod5_format_pybind/api.h
function std (line 22) | inline std::shared_ptr<pod5::FileWriter> create_file(
function pod5 (line 35) | inline pod5::RecoveryDetails recover_file(
function class (line 47) | class Pod5SignalCacheBatch {
function get_file_read_table_location (line 179) | struct Pod5FileReaderPtr {
function close (line 204) | void close() { reader = nullptr; }
function Pod5FileReaderPtr (line 261) | inline Pod5FileReaderPtr open_file(char const * filename)
function write_updated_file_to_dest (line 267) | inline void write_updated_file_to_dest(Pod5FileReaderPtr source, char co...
function pod5 (line 273) | inline pod5::RunInfoDictionaryIndex FileWriter_add_run_info(
function FileWriter_add_reads_pre_compressed (line 435) | inline void FileWriter_add_reads_pre_compressed(
function decompress_signal_wrapper (line 526) | inline void decompress_signal_wrapper(
function compress_signal_wrapper (line 537) | inline std::size_t compress_signal_wrapper(
function vbz_compressed_signal_max_size (line 550) | inline std::size_t vbz_compressed_signal_max_size(std::size_t sample_count)
function load_read_id_iterable (line 557) | inline std::size_t load_read_id_iterable(
FILE: c++/pod5_format_pybind/bindings.cpp
function PYBIND11_MODULE (line 7) | PYBIND11_MODULE(pod5_format_pybind, m)
FILE: c++/pod5_format_pybind/repack/repack_functions.h
function namespace (line 17) | namespace repack {
type RequestedSignalReads (line 186) | struct RequestedSignalReads {
type ReadSignal (line 257) | struct ReadSignal {
FILE: c++/pod5_format_pybind/repack/repack_output.cpp
type repack (line 10) | namespace repack {
type is_not_nullptr (line 13) | struct is_not_nullptr {
type get_name (line 22) | struct get_name{
function dump_queued_items (line 30) | void dump_queued_items(T const& queued) {
type Pod5RepackerOutputThreadState (line 46) | struct Pod5RepackerOutputThreadState {
method Pod5RepackerOutputThreadState (line 47) | Pod5RepackerOutputThreadState(std::shared_ptr<ReadsTableDictionaryMa...
type Pod5RepackerOutputState (line 55) | struct Pod5RepackerOutputState {
method Pod5RepackerOutputState (line 56) | Pod5RepackerOutputState(
method Pod5RepackerOutputThreadState (line 68) | Pod5RepackerOutputThreadState * get_thread_state()
type StateProgressResult (line 97) | struct StateProgressResult {
method StateProgressResult (line 98) | StateProgressResult() = default;
method StateProgressResult (line 100) | StateProgressResult(std::vector<states::shared_variant> && _new_states)
type StateOperator (line 108) | struct StateOperator {
method StateOperator (line 109) | StateOperator(Pod5RepackerOutputState * _progress_state) : progress_...
method ARROW_ASSIGN_OR_RAISE (line 137) | ARROW_ASSIGN_OR_RAISE(
FILE: c++/pod5_format_pybind/repack/repack_output.h
type Pod5RepackerOutputState (line 17) | struct Pod5RepackerOutputState
function set_error (line 61) | void set_error(arrow::Status error)
FILE: c++/pod5_format_pybind/repack/repack_states.h
function namespace (line 14) | namespace repack { namespace states {
FILE: c++/pod5_format_pybind/repack/repack_utils.h
function namespace (line 10) | namespace repack {
function class (line 27) | class ReadsTableDictionaryManager {
function class (line 94) | class ReadsTableDictionaryThreadCache {
FILE: c++/pod5_format_pybind/repack/repacker.cpp
type repack (line 7) | namespace repack {
function repacker_add_reads_preconditions (line 11) | void repacker_add_reads_preconditions(
FILE: c++/pod5_format_pybind/repack/repacker.h
function namespace (line 11) | namespace repack {
FILE: c++/pod5_format_pybind/subset.cpp
type io_limits (line 28) | namespace io_limits {
function clamp_open_inputs (line 37) | std::size_t clamp_open_inputs(std::size_t soft_limit, std::size_t outp...
function clamp_open_outputs (line 47) | std::size_t clamp_open_outputs(std::size_t soft_limit)
function detect_soft_limit (line 62) | std::size_t detect_soft_limit()
class ProgressBar (line 84) | class ProgressBar {
method ProgressBar (line 88) | ProgressBar() {}
method set_task (line 92) | void set_task(std::string const & task_name)
method update_max_steps (line 98) | void update_max_steps(std::size_t max_steps) { this->m_max_steps = max...
method update (line 100) | void update(std::size_t current_step)
method print_progress (line 109) | void print_progress()
function subset_pod5s_with_mapping (line 136) | void subset_pod5s_with_mapping(
FILE: c++/pod5_format_pybind/utils.h
function raise_error (line 5) | inline void raise_error(arrow::Status const & status)
function throw_on_error (line 35) | inline void throw_on_error(pod5::Status const & s)
FILE: c++/test/TemporaryDirectory.h
function namespace (line 7) | namespace ont { namespace testutils {
FILE: c++/test/c_api_null_input.cpp
function pod5_reset_error (line 11) | void pod5_reset_error()
type detail (line 18) | namespace detail {
function ptr_idx_to_arg_idx (line 21) | constexpr std::size_t ptr_idx_to_arg_idx()
function make_ptr_null_impl (line 38) | void make_ptr_null_impl(std::tuple<Args...> & args, std::uint64_t vali...
function make_ptrs_null (line 54) | void make_ptrs_null(
function unpack_and_call (line 63) | auto unpack_and_call(
function call_with_nulls (line 74) | void call_with_nulls(pod5_error_t (*func)(Args...), Args... args)
FILE: c++/test/c_api_test_utils.h
function namespace (line 33) | namespace testutils {
function class (line 45) | class IsPod5COk : public Catch::MatcherBase<Pod5C_Result> {
function Pod5C_Result (line 57) | struct Catch::StringMaker<testutils::Pod5C_Result> {
FILE: c++/test/c_api_tests.cpp
type Pod5ReadId (line 17) | struct Pod5ReadId {
method Pod5ReadId (line 18) | Pod5ReadId() = default;
method Pod5ReadId (line 20) | Pod5ReadId(pod5::Uuid const & uid) { uid.to_c_array(read_id); }
method as_uuid (line 22) | pod5::Uuid as_uuid() const { return pod5::Uuid{read_id}; }
FILE: c++/test/file_reader_writer_tests.cpp
function run_file_reader_writer_tests (line 26) | void run_file_reader_writer_tests(
type ReadData (line 239) | struct ReadData {
function touch (line 406) | static void touch(std::filesystem::path const & path) { std::ofstream co...
function write_zeros (line 409) | static void write_zeros(std::filesystem::path const & path)
function file_writing_started (line 418) | static bool file_writing_started(std::filesystem::path const & file_path)
function files_ready_to_recover (line 443) | static bool files_ready_to_recover(std::filesystem::path const & directo...
function wait_for_files_to_recover (line 453) | static void wait_for_files_to_recover(std::filesystem::path const & dire...
function create_files_for_recovery (line 468) | static std::filesystem::path create_files_for_recovery(
function ends_with (line 558) | static bool ends_with(std::string const & search_in, std::string const &...
function escape_for_regex (line 575) | static std::string escape_for_regex(std::string const & input)
FILE: c++/test/output_stream_tests.cpp
function get_test_data (line 14) | std::shared_ptr<arrow::Buffer> get_test_data()
function read_file (line 27) | std::vector<char> read_file(char const * filename)
function check_file_contents (line 34) | void check_file_contents(char const * filename)
function run_output_stream_test (line 48) | void run_output_stream_test(std::shared_ptr<arrow::io::OutputStream> out...
FILE: c++/test/svb16_scalar_tests.cpp
function test_scalar_encode_scalar_decode (line 15) | void test_scalar_encode_scalar_decode()
FILE: c++/test/svb16_x64_tests.cpp
function test_sse_encode_scalar_decode (line 18) | void test_sse_encode_scalar_decode()
FILE: c++/test/test_utils.h
function match (line 17) | bool match(arrow::Status const & status) const override { return status....
function match (line 27) | bool match(arrow::Result<T> const & status) const override { return stat...
FILE: c++/test/utils.h
function arrow (line 39) | inline arrow::Status remove_file_if_exists(std::string const & file)
FILE: conanfile.py
class Pod5Conan (line 9) | class Pod5Conan(ConanFile):
method _setup_third_party_deps_packaging (line 36) | def _setup_third_party_deps_packaging(self):
method _licenses_path (line 56) | def _licenses_path(self):
method _copy_licenses (line 60) | def _copy_licenses(self):
method layout (line 73) | def layout(self):
method requirements (line 76) | def requirements(self):
method build_requirements (line 97) | def build_requirements(self):
method generate (line 105) | def generate(self):
method build (line 127) | def build(self):
method package (line 132) | def package(self):
method package_info (line 150) | def package_info(self):
FILE: fuzz/fuzz_compress.cpp
function setenv (line 14) | static int setenv(char const * name, char const * value, int) { return _...
function CheckPod5 (line 27) | void CheckPod5(pod5_error_t err, char const * msg)
function LLVMFuzzerInitialize (line 42) | int LLVMFuzzerInitialize(int * argc, char *** argv)
function LLVMFuzzerTestOneInput (line 55) | int LLVMFuzzerTestOneInput(uint8_t const * data, size_t size)
FILE: fuzz/fuzz_file.cpp
function setenv (line 19) | static int setenv(char const * name, char const * value, int) { return _...
function check_pod5_ok (line 46) | void check_pod5_ok(pod5_error_t err, char const * msg)
function check_pod5_consistency (line 55) | void check_pod5_consistency(pod5_error_t err, char const * msg)
function keep_result (line 74) | void keep_result(T && t)
function validate_string (line 81) | void validate_string(char const * ptr)
type POD5FileCloser (line 88) | struct POD5FileCloser {
function LLVMFuzzerInitialize (line 100) | int LLVMFuzzerInitialize(int * argc, char *** argv)
function LLVMFuzzerTestOneInput (line 116) | int LLVMFuzzerTestOneInput(uint8_t const * data, size_t size)
FILE: fuzz/runner.cpp
function run_one (line 19) | void run_one(bool verbose, std::filesystem::path const & path)
function run_recursive (line 35) | void run_recursive(bool verbose, std::filesystem::path const & path)
function main (line 48) | int main(int argc, char ** argv)
FILE: pod5_make_version.py
function create_pod5_version_cmake (line 10) | def create_pod5_version_cmake():
function copy_version_py (line 26) | def copy_version_py():
FILE: python/lib_pod5/setup.py
class BinaryInstall (line 32) | class BinaryInstall(install):
method __init__ (line 33) | def __init__(self, dist):
class BdistWheel (line 42) | class BdistWheel(bdist_wheel):
method finalize_options (line 43) | def finalize_options(self):
method get_tag (line 47) | def get_tag(self):
FILE: python/lib_pod5/src/lib_pod5/pod5_format_pybind.pyi
class CleanupError (line 16) | class CleanupError:
method __init__ (line 19) | def __init__(self) -> None: ...
class EmbeddedFileData (line 21) | class EmbeddedFileData:
method __init__ (line 22) | def __init__(self, *args, **kwargs) -> None: ...
method length (line 24) | def length(self) -> int: ...
method offset (line 26) | def offset(self) -> int: ...
method file_path (line 28) | def file_path(self) -> str: ...
class FileWriter (line 30) | class FileWriter:
method __init__ (line 31) | def __init__(self, *args, **kwargs) -> None: ...
method add_end_reason (line 32) | def add_end_reason(self, end_reason_enum: int) -> int: ...
method add_pore (line 33) | def add_pore(self, pore_type: str) -> int: ...
method add_reads (line 34) | def add_reads(
method add_reads_pre_compressed (line 59) | def add_reads_pre_compressed(
method add_run_info (line 86) | def add_run_info(
method close (line 109) | def close(self) -> None: ...
class FileWriterOptions (line 111) | class FileWriterOptions:
method __init__ (line 116) | def __init__(self, *args, **kwargs) -> None: ...
class Pod5AsyncSignalLoader (line 118) | class Pod5AsyncSignalLoader:
method __init__ (line 119) | def __init__(self, *args, **kwargs) -> None: ...
method release_next_batch (line 120) | def release_next_batch(self) -> Pod5SignalCacheBatch: ...
class Pod5FileReader (line 122) | class Pod5FileReader:
method __init__ (line 123) | def __init__(self, *args, **kwargs) -> None: ...
method batch_get_signal (line 124) | def batch_get_signal(
method batch_get_signal_batches (line 127) | def batch_get_signal_batches(
method batch_get_signal_selection (line 133) | def batch_get_signal_selection(
method close (line 140) | def close(self) -> None: ...
method get_file_read_table_location (line 141) | def get_file_read_table_location(self) -> EmbeddedFileData: ...
method get_file_run_info_table_location (line 142) | def get_file_run_info_table_location(self) -> EmbeddedFileData: ...
method get_file_signal_table_location (line 143) | def get_file_signal_table_location(self) -> EmbeddedFileData: ...
method get_file_version_pre_migration (line 144) | def get_file_version_pre_migration(self) -> str: ...
method plan_traversal (line 145) | def plan_traversal(
class Pod5RepackerOutput (line 152) | class Pod5RepackerOutput:
method __init__ (line 153) | def __init__(self, *args, **kwargs) -> None: ...
class Pod5SignalCacheBatch (line 155) | class Pod5SignalCacheBatch:
method __init__ (line 156) | def __init__(self, *args, **kwargs) -> None: ...
method batch_index (line 158) | def batch_index(self) -> int: ...
method sample_count (line 160) | def sample_count(self) -> npt.NDArray[np.uint64]: ...
method samples (line 162) | def samples(self) -> List[npt.NDArray[np.int16]]: ...
class RecoverFileOptions (line 164) | class RecoverFileOptions:
method __init__ (line 167) | def __init__(self) -> None: ...
class RecoveredRowCounts (line 169) | class RecoveredRowCounts:
method __init__ (line 173) | def __init__(self) -> None: ...
class RecoveryDetails (line 175) | class RecoveryDetails:
method __init__ (line 178) | def __init__(self) -> None: ...
class Repacker (line 180) | class Repacker:
method __init__ (line 181) | def __init__(self) -> None: ...
method add_all_reads_to_output (line 182) | def add_all_reads_to_output(
method add_output (line 185) | def add_output(
method add_selected_reads_to_output (line 188) | def add_selected_reads_to_output(
method finish (line 195) | def finish(self) -> None: ...
method is_complete (line 197) | def is_complete(self) -> bool: ...
method open_file_readers (line 199) | def open_file_readers(self) -> int: ...
method reads_completed (line 201) | def reads_completed(self) -> int: ...
function compress_signal (line 203) | def compress_signal(
function create_file (line 206) | def create_file(
function recover_file (line 209) | def recover_file(
function decompress_signal (line 212) | def decompress_signal(
function format_read_id_to_str (line 216) | def format_read_id_to_str(
function get_error_string (line 219) | def get_error_string() -> str: ...
function load_read_id_iterable (line 220) | def load_read_id_iterable(
function open_file (line 223) | def open_file(filename: str) -> Pod5FileReader: ...
function update_file (line 224) | def update_file(reader: Pod5FileReader, output: str): ...
function vbz_compressed_signal_max_size (line 225) | def vbz_compressed_signal_max_size(sample_count: int) -> int: ...
FILE: python/lib_pod5/src/test/test_lib_pod5.py
function test_create_file (line 10) | def test_create_file(tmp_path: Path) -> None:
function test_open_file (line 21) | def test_open_file(tmp_path: Path) -> None:
FILE: python/pod5/examples/find_all_reads.py
function main (line 9) | def main():
FILE: python/pod5/examples/find_specific_reads.py
function main (line 12) | def main():
FILE: python/pod5/src/pod5/api_utils.py
class Pod5ApiException (line 14) | class Pod5ApiException(Exception):
function pack_read_ids (line 18) | def pack_read_ids(
function format_read_ids (line 43) | def format_read_ids(
function deprecation_warning (line 64) | def deprecation_warning(deprecated: str, alternate: str) -> None:
function safe_close (line 83) | def safe_close(obj: Any, attr: str) -> None:
FILE: python/pod5/src/pod5/dataset.py
class DatasetReader (line 27) | class DatasetReader:
method __init__ (line 28) | def __init__(
method __iter__ (line 91) | def __iter__(self) -> Generator[ReadRecord, None, None]:
method __len__ (line 94) | def __len__(self) -> int:
method num_reads (line 99) | def num_reads(self) -> int:
method paths (line 119) | def paths(self) -> List[Path]:
method read_ids (line 124) | def read_ids(self) -> Generator[str, None, None]:
method reads (line 135) | def reads(
method get_read (line 170) | def get_read(self, read_id: str) -> Optional[ReadRecord]:
method _init_get_reader (line 204) | def _init_get_reader(maxsize: Optional[int]) -> Callable[[Path], Reader]:
method get_reader (line 216) | def get_reader(self, path: PathOrStr) -> Reader:
method get_path (line 231) | def get_path(self, read_id: str) -> Optional[Path]:
method clear_readers (line 264) | def clear_readers(self) -> None:
method clear_index (line 268) | def clear_index(self) -> None:
method has_duplicate (line 272) | def has_duplicate(self) -> bool:
method _collect_dataset (line 285) | def _collect_dataset(
method index_read_ids (line 307) | def index_read_ids(self) -> None:
method _index_read_ids (line 315) | def _index_read_ids(self) -> None:
method _issue_duplicate_read_warning (line 327) | def _issue_duplicate_read_warning(self) -> None:
method _run_max_workers (line 332) | def _run_max_workers(
method __enter__ (line 348) | def __enter__(self) -> "DatasetReader":
method __exit__ (line 351) | def __exit__(self, *exc_details) -> None:
FILE: python/pod5/src/pod5/pod5_types.py
class EndReasonEnum (line 21) | class EndReasonEnum(enum.Enum):
class EndReason (line 53) | class EndReason:
method name (line 72) | def name(self) -> str:
method from_reason_with_default_forced (line 77) | def from_reason_with_default_forced(cls, reason: EndReasonEnum) -> "En...
class Calibration (line 86) | class Calibration:
method from_range (line 105) | def from_range(
class Pore (line 113) | class Pore:
class RunInfo (line 137) | class RunInfo:
class ShiftScalePair (line 242) | class ShiftScalePair:
method __eq__ (line 248) | def __eq__(self, other: object) -> bool:
class BaseRead (line 259) | class BaseRead:
class Read (line 329) | class Read(BaseRead):
method sample_count (line 363) | def sample_count(self) -> int:
class CompressedRead (line 369) | class CompressedRead(BaseRead):
method sample_count (line 406) | def sample_count(self) -> int:
method decompressed_signal (line 411) | def decompressed_signal(self) -> npt.NDArray[np.int16]:
FILE: python/pod5/src/pod5/reader.py
class ReadRecord (line 121) | class ReadRecord:
method __init__ (line 126) | def __init__(
method read_id (line 142) | def read_id(self) -> UUID:
method read_number (line 149) | def read_number(self) -> int:
method start_sample (line 156) | def start_sample(self) -> int:
method num_samples (line 163) | def num_samples(self) -> int:
method median_before (line 170) | def median_before(self) -> float:
method num_minknow_events (line 177) | def num_minknow_events(self) -> int:
method tracked_scaling (line 187) | def tracked_scaling(self) -> ShiftScalePair:
method predicted_scaling (line 200) | def predicted_scaling(self) -> ShiftScalePair:
method num_reads_since_mux_change (line 213) | def num_reads_since_mux_change(self) -> int:
method time_since_mux_change (line 223) | def time_since_mux_change(self) -> float:
method open_pore_level (line 230) | def open_pore_level(self) -> float:
method pore (line 239) | def pore(self) -> Pore:
method calibration (line 250) | def calibration(self) -> Calibration:
method calibration_digitisation (line 260) | def calibration_digitisation(self) -> int:
method calibration_range (line 269) | def calibration_range(self) -> float:
method end_reason (line 278) | def end_reason(self) -> EndReason:
method run_info (line 290) | def run_info(self) -> RunInfo:
method end_reason_index (line 297) | def end_reason_index(self) -> int:
method run_info_index (line 305) | def run_info_index(self) -> int:
method sample_count (line 312) | def sample_count(self) -> int:
method byte_count (line 319) | def byte_count(self) -> int:
method has_cached_signal (line 326) | def has_cached_signal(self) -> bool:
method signal (line 333) | def signal(self) -> npt.NDArray[np.int16]:
method signal_pa (line 372) | def signal_pa(self) -> npt.NDArray[np.float32]:
method signal_for_chunk (line 383) | def signal_for_chunk(self, index: int) -> npt.NDArray[np.int16]:
method signal_rows (line 397) | def signal_rows(self) -> List[SignalRowInfo]:
method calibrate_signal_array (line 425) | def calibrate_signal_array(
method _find_signal_row_index (line 439) | def _find_signal_row_index(self, signal_row: int) -> Tuple[Signal, int...
method _get_signal_for_row (line 454) | def _get_signal_for_row(self, signal_row: int) -> npt.NDArray[np.int16]:
method to_read (line 475) | def to_read(self) -> Read:
class ReadRecordBatch (line 502) | class ReadRecordBatch:
method __init__ (line 507) | def __init__(self, reader: "Reader", batch: pa.RecordBatch):
method columns (line 518) | def columns(self) -> ReadRecordV4Columns:
method set_cached_signal (line 529) | def set_cached_signal(self, signal_cache: p5b.Pod5SignalCacheBatch) ->...
method set_selected_batch_rows (line 533) | def set_selected_batch_rows(self, selected_batch_rows: Iterable[int]) ...
method reads (line 537) | def reads(self) -> Generator[ReadRecord, None, None]:
method get_read (line 564) | def get_read(self, row: int) -> ReadRecord:
method num_reads (line 569) | def num_reads(self) -> int:
method read_id_column (line 574) | def read_id_column(self) -> pa.FixedSizeBinaryArray:
method read_number_column (line 583) | def read_number_column(self) -> pa.UInt32Array:
method cached_sample_count_column (line 592) | def cached_sample_count_column(self) -> npt.NDArray[np.uint64]:
method cached_samples_column (line 601) | def cached_samples_column(self) -> List[npt.NDArray[np.int16]]:
class ArrowTableHandle (line 610) | class ArrowTableHandle:
method __init__ (line 613) | def __init__(
method _open_without_mmap (line 660) | def _open_without_mmap(self) -> pa.PythonFile:
method _open_with_mmap (line 688) | def _open_with_mmap(self) -> pa.BufferReader:
method reader (line 715) | def reader(self) -> pa.ipc.RecordBatchFileReader:
method stream (line 723) | def stream(self) -> Union[pa.PythonFile, pa.NativeFile]:
method close (line 730) | def close(self) -> None:
method __enter__ (line 746) | def __enter__(self) -> "ArrowTableHandle":
method __exit__ (line 749) | def __exit__(self, *exc_details) -> None:
method __del__ (line 752) | def __del__(self):
class Reader (line 756) | class Reader:
method __init__ (line 761) | def __init__(self, path: PathOrStr):
method _open_arrow_table_handles (line 804) | def _open_arrow_table_handles(
method __enter__ (line 826) | def __enter__(self) -> "Reader":
method __exit__ (line 829) | def __exit__(self, *exc_details) -> None:
method __iter__ (line 832) | def __iter__(self) -> Generator[ReadRecord, None, None]:
method close (line 836) | def close(self) -> None:
method path (line 855) | def path(self) -> Path:
method inner_file_reader (line 860) | def inner_file_reader(self) -> p5b.Pod5FileReader:
method read_table (line 867) | def read_table(self) -> pa.ipc.RecordBatchFileReader:
method run_info_table (line 874) | def run_info_table(self) -> pa.ipc.RecordBatchFileReader:
method signal_table (line 881) | def signal_table(self) -> pa.ipc.RecordBatchFileReader:
method file_version (line 888) | def file_version(self) -> packaging.version.Version:
method file_version_pre_migration (line 893) | def file_version_pre_migration(self) -> packaging.version.Version:
method writing_software (line 898) | def writing_software(self) -> str:
method file_identifier (line 902) | def file_identifier(self) -> UUID:
method reads_table_version (line 906) | def reads_table_version(self) -> int:
method is_vbz_compressed (line 910) | def is_vbz_compressed(self) -> bool:
method signal_batch_row_count (line 919) | def signal_batch_row_count(self) -> int:
method batch_count (line 929) | def batch_count(self) -> int:
method num_reads (line 936) | def num_reads(self) -> int:
method read_ids_raw (line 948) | def read_ids_raw(self) -> pa.ChunkedArray:
method read_ids (line 958) | def read_ids(self) -> List[str]:
method get_batch (line 978) | def get_batch(self, index: int) -> ReadRecordBatch:
method read_batches (line 989) | def read_batches(
method reads (line 1027) | def reads(
method _reads (line 1057) | def _reads(
method _select_reads (line 1065) | def _select_reads(
method _reads_batches (line 1076) | def _reads_batches(
method _read_some_batches (line 1093) | def _read_some_batches(
method _select_read_batches (line 1113) | def _select_read_batches(
method _plan_traversal (line 1151) | def _plan_traversal(
method _get_signal_batch (line 1192) | def _get_signal_batch(self, batch_id: int) -> Signal:
method _lookup_run_info (line 1204) | def _lookup_run_info(self, batch: ReadRecordBatch, batch_row_id: int) ...
method __del__ (line 1237) | def __del__(self):
FILE: python/pod5/src/pod5/repack.py
class Repacker (line 11) | class Repacker:
method __init__ (line 14) | def __init__(self):
method is_complete (line 19) | def is_complete(self) -> bool:
method currently_open_file_reader_count (line 24) | def currently_open_file_reader_count(self) -> int:
method reads_completed (line 29) | def reads_completed(self) -> int:
method reads_requested (line 34) | def reads_requested(self) -> int:
method add_output (line 38) | def add_output(
method add_selected_reads_to_output (line 64) | def add_selected_reads_to_output(
method add_all_reads_to_output (line 104) | def add_all_reads_to_output(
method finish (line 121) | def finish(self) -> None:
method set_output_finished (line 128) | def set_output_finished(self, output) -> None:
FILE: python/pod5/src/pod5/signal_tools.py
function vbz_decompress_signal (line 14) | def vbz_decompress_signal(
function vbz_decompress_signal_chunked (line 39) | def vbz_decompress_signal_chunked(
function vbz_decompress_signal_into (line 83) | def vbz_decompress_signal_into(
function vbz_compress_signal (line 109) | def vbz_compress_signal(signal: npt.NDArray[np.int16]) -> npt.NDArray[np...
function vbz_compress_signal_chunked (line 134) | def vbz_compress_signal_chunked(
FILE: python/pod5/src/pod5/tools/main.py
function main (line 23) | def main() -> Any:
FILE: python/pod5/src/pod5/tools/parsers.py
class SubcommandHelpFormatter (line 17) | class SubcommandHelpFormatter(
method _format_action (line 26) | def _format_action(self, action):
function run_tool (line 33) | def run_tool(parser: argparse.ArgumentParser) -> Any:
function add_recursive_argument (line 47) | def add_recursive_argument(parser: argparse.ArgumentParser):
function add_force_overwrite_argument (line 57) | def add_force_overwrite_argument(parser: argparse._ActionsContainer):
function pod5_convert_from_fast5_argparser (line 69) | def pod5_convert_from_fast5_argparser(
function pod5_convert_to_fast5_argparser (line 147) | def pod5_convert_to_fast5_argparser(
function prepare_pod5_convert (line 204) | def prepare_pod5_convert(parent: argparse._SubParsersAction) -> argparse...
function prepare_pod5_filter_argparser (line 228) | def prepare_pod5_filter_argparser(
function prepare_pod5_inspect_argparser (line 294) | def prepare_pod5_inspect_argparser(
function prepare_pod5_merge_argparser (line 355) | def prepare_pod5_merge_argparser(
function prepare_pod5_repack_argparser (line 415) | def prepare_pod5_repack_argparser(
function prepare_pod5_subset_argparser (line 458) | def prepare_pod5_subset_argparser(
function prepare_pod5_recover_argparser (line 570) | def prepare_pod5_recover_argparser(
function prepare_pod5_update_argparser (line 610) | def prepare_pod5_update_argparser(
function prepare_pod5_view_argparser (line 652) | def prepare_pod5_view_argparser(
FILE: python/pod5/src/pod5/tools/pod5_convert_from_fast5.py
class QueueManager (line 53) | class QueueManager:
method __init__ (line 54) | def __init__(
method _await (line 71) | def _await(self, queue: mp.Queue) -> Any:
method enqueue_request (line 80) | def enqueue_request(self) -> None:
method await_request (line 83) | def await_request(self) -> None:
method enqueue_data (line 88) | def enqueue_data(
method await_data (line 99) | def await_data(
method enqueue_exception (line 119) | def enqueue_exception(self, path: Path, exception: Exception, trace: s...
method get_exception (line 122) | def get_exception(self) -> Optional[Tuple[Path, Exception, str]]:
method enqueue_input (line 137) | def enqueue_input(self, path: Path) -> None:
method get_input (line 142) | def get_input(self) -> Optional[Path]:
method _discard_and_close (line 151) | def _discard_and_close(self, queue: mp.Queue) -> int:
method shutdown (line 168) | def shutdown(self) -> Tuple[int, int, int, int]:
method _start (line 185) | def _start(self, inputs: Iterable[Path]) -> None:
class OutputHandler (line 195) | class OutputHandler:
method __init__ (line 199) | def __init__(
method _open_writer (line 213) | def _open_writer(self, output_path: Path) -> Optional[p5.Writer]:
method get_writer (line 232) | def get_writer(self, input_path: Path) -> Optional[p5.Writer]:
method resolve_one_to_one_path (line 245) | def resolve_one_to_one_path(path: Path, root: Path, relative_root: Path):
method resolve_output_path (line 263) | def resolve_output_path(
method set_input_complete (line 291) | def set_input_complete(self, input_path: Path, is_exception: bool) -> ...
method close_all (line 306) | def close_all(self):
class StatusMonitor (line 319) | class StatusMonitor:
method __init__ (line 323) | def __init__(self, paths: Sequence[Path]):
method total_files (line 337) | def total_files(self) -> int:
method total_reads (line 341) | def total_reads(self) -> int:
method increment_reads (line 345) | def increment_reads(self, n: int) -> None:
method update_reads_total (line 350) | def update_reads_total(self, path: Path, total: int) -> None:
method write (line 357) | def write(self, msg: str, file: Any) -> None:
method close (line 362) | def close(self) -> None:
function is_multi_read_fast5 (line 368) | def is_multi_read_fast5(path: Path) -> bool:
function decode_str (line 394) | def decode_str(value: Union[str, bytes]) -> str:
function convert_fast5_end_reason (line 401) | def convert_fast5_end_reason(fast5_end_reason: int) -> p5.EndReason:
function convert_datetime_as_epoch_ms (line 429) | def convert_datetime_as_epoch_ms(
function convert_run_info (line 442) | def convert_run_info(
function convert_fast5_read (line 484) | def convert_fast5_read(
function get_read_from_fast5 (line 571) | def get_read_from_fast5(group_name: str, h5_file: h5py.File) -> Optional...
function convert_fast5_file_chunk (line 587) | def convert_fast5_file_chunk(
function convert_fast5_file (line 614) | def convert_fast5_file(
function issue_not_multi_read_exception (line 636) | def issue_not_multi_read_exception(path: Path, queues: QueueManager):
function convert_fast5_files (line 648) | def convert_fast5_files(
function handle_exception (line 684) | def handle_exception(
function process_conversion_tasks (line 702) | def process_conversion_tasks(
function convert_from_fast5 (line 756) | def convert_from_fast5(
function main (line 834) | def main():
FILE: python/pod5/src/pod5/tools/pod5_convert_to_fast5.py
class StatusMonitor (line 39) | class StatusMonitor:
method __init__ (line 42) | def __init__(self, file_count: int):
method running (line 55) | def running(self) -> bool:
method increment (line 59) | def increment(
method samples_mb (line 76) | def samples_mb(self) -> float:
method time_elapsed (line 81) | def time_elapsed(self) -> float:
method sample_rate (line 86) | def sample_rate(self) -> float:
method print_status (line 90) | def print_status(self, force: bool = False):
method formatted_sample_count (line 105) | def formatted_sample_count(self) -> str:
function write_pod5_record_to_fast5 (line 120) | def write_pod5_record_to_fast5(read: p5.ReadRecord, fast5: h5py.File) ->...
function convert_pod5_to_fast5 (line 218) | def convert_pod5_to_fast5(
function convert_to_fast5 (line 253) | def convert_to_fast5(
function main (line 317) | def main():
FILE: python/pod5/src/pod5/tools/pod5_filter.py
function parse_read_id_targets (line 28) | def parse_read_id_targets(ids: Path, output: Path) -> pl.LazyFrame:
function filter_pod5 (line 57) | def filter_pod5(
function main (line 107) | def main():
FILE: python/pod5/src/pod5/tools/pod5_inspect.py
function format_shift_scale_pair (line 18) | def format_shift_scale_pair(pair):
function format_shift_scale_pair_num (line 22) | def format_shift_scale_pair_num(pair):
function do_reads_command (line 26) | def do_reads_command(reader: p5.Reader, write_header: bool):
function dump_run_info (line 82) | def dump_run_info(run_info: p5.RunInfo):
function do_read_command (line 93) | def do_read_command(reader: p5.Reader, read_id: str, **_):
function do_debug_command (line 132) | def do_debug_command(reader: p5.Reader, **_):
function do_summary_command (line 174) | def do_summary_command(reader: p5.Reader, **kwargs):
function inspect_pod5 (line 199) | def inspect_pod5(
function main (line 225) | def main():
FILE: python/pod5/src/pod5/tools/pod5_merge.py
function merge_pod5 (line 25) | def merge_pod5(
function main (line 104) | def main():
FILE: python/pod5/src/pod5/tools/pod5_recover.py
class RecoveredData (line 17) | class RecoveredData:
function is_file_ok (line 28) | def is_file_ok(path: Path) -> bool:
function recover_pod5 (line 37) | def recover_pod5(
function main (line 95) | def main():
FILE: python/pod5/src/pod5/tools/pod5_repack.py
function resolve_overwrite (line 22) | def resolve_overwrite(src: Path, dest: Path, force: bool) -> None:
function repack_pod5_file (line 34) | def repack_pod5_file(src: Path, dest: Path):
function repack_pod5 (line 46) | def repack_pod5(
function main (line 90) | def main():
FILE: python/pod5/src/pod5/tools/pod5_subset.py
function get_separator (line 36) | def get_separator(path: Path) -> str:
function default_filename_template (line 52) | def default_filename_template(subset_columns: List[str]) -> str:
function column_keys_from_template (line 60) | def column_keys_from_template(template: str) -> List[str]:
function fstring_to_polars (line 66) | def fstring_to_polars(
function parse_table_mapping (line 82) | def parse_table_mapping(
function assert_filename_template (line 134) | def assert_filename_template(
function create_default_filename_template (line 162) | def create_default_filename_template(subset_columns: List[str]) -> str:
function parse_csv_mapping (line 170) | def parse_csv_mapping(csv_path: Path) -> pl.LazyFrame:
function build_targets_dict (line 198) | def build_targets_dict(
function subset_pod5 (line 211) | def subset_pod5(
function main (line 268) | def main():
FILE: python/pod5/src/pod5/tools/pod5_update.py
function update_pod5 (line 21) | def update_pod5(
function main (line 62) | def main():
FILE: python/pod5/src/pod5/tools/pod5_view.py
class Selection (line 39) | class Selection(NamedTuple):
method __contains__ (line 44) | def __contains__(self, key):
method union (line 47) | def union(self) -> Set[str]:
class Field (line 51) | class Field(NamedTuple):
function print_fields (line 169) | def print_fields():
function get_field_or_raise (line 177) | def get_field_or_raise(key: str) -> Field:
function select_fields (line 189) | def select_fields(
function get_format_view_table_fn (line 247) | def get_format_view_table_fn(
function write (line 303) | def write(
function write_header (line 333) | def write_header(
function resolve_output (line 345) | def resolve_output(output: Optional[Path], force_overwrite: bool) -> Opt...
function assert_unique_acquisition_id (line 370) | def assert_unique_acquisition_id(run_info: pl.LazyFrame, path: Path) -> ...
function parse_reads_table_all (line 382) | def parse_reads_table_all(
function parse_reads_table_batch (line 400) | def parse_reads_table_batch(
function parse_read_table_chunks (line 423) | def parse_read_table_chunks(
function parse_run_info_table (line 454) | def parse_run_info_table(
function join_reads_to_run_info (line 479) | def join_reads_to_run_info(reads: pl.LazyFrame, run_info: pl.LazyFrame) ...
function get_included_reads_table_fields (line 488) | def get_included_reads_table_fields(reader: p5.Reader, selection: Select...
function get_reads_tables (line 501) | def get_reads_tables(
function join_workers (line 535) | def join_workers(processes: List[SpawnProcess], exceptions: mp.JoinableQ...
function worker_process (line 572) | def worker_process(
function launch_view_workers (line 605) | def launch_view_workers(
function view_pod5 (line 649) | def view_pod5(
function main (line 696) | def main():
FILE: python/pod5/src/pod5/tools/polars_utils.py
function pl_format_read_id (line 12) | def pl_format_read_id(read_id_col: pl.Expr) -> pl.Expr:
function pl_format_empty_string (line 25) | def pl_format_empty_string(expr: pl.Expr, subst: Optional[str]) -> pl.Expr:
function pl_from_arrow (line 30) | def pl_from_arrow(table: pa.Table, rechunk: bool) -> pl.DataFrame:
function pl_from_arrow_batch (line 51) | def pl_from_arrow_batch(record_batch: pa.RecordBatch, rechunk: bool) -> ...
FILE: python/pod5/src/pod5/tools/utils.py
function init_logging (line 22) | def init_logging():
function logged (line 46) | def logged(log_return: bool = False, log_args: bool = False, log_time: b...
function terminate_processes (line 80) | def terminate_processes(processes: List[SpawnProcess]) -> None:
function limit_threads (line 92) | def limit_threads(requested: int) -> int:
function collect_inputs (line 102) | def collect_inputs(
function assert_inputs_exist (line 125) | def assert_inputs_exist(inputs: Iterable[Path]):
function search_paths (line 137) | def search_paths(
function search_path (line 161) | def search_path(path: Path, recursive: bool, patterns: Collection[str]) ...
function assert_no_duplicate_filenames (line 186) | def assert_no_duplicate_filenames(inputs: Collection[Path]) -> None:
function is_disable_pbar (line 199) | def is_disable_pbar() -> bool:
function is_pod5_debug (line 217) | def is_pod5_debug() -> bool:
FILE: python/pod5/src/pod5/writer.py
function force_type_and_default (line 51) | def force_type_and_default(value, dtype, count, default_value=None):
function map_to_tuples (line 58) | def map_to_tuples(info_map: Any) -> List[Tuple[str, str]]:
function timestamp_to_int (line 70) | def timestamp_to_int(time_stamp: Union[datetime.datetime, int]) -> int:
class Writer (line 77) | class Writer:
method __init__ (line 80) | def __init__(
method __enter__ (line 136) | def __enter__(self) -> "Writer":
method __exit__ (line 139) | def __exit__(self, *exc_details) -> None:
method close (line 142) | def close(self) -> None:
method path (line 148) | def path(self) -> Path:
method software_name (line 153) | def software_name(self) -> str:
method signal_compression_type (line 158) | def signal_compression_type(self) -> SignalType:
method add (line 162) | def add(self, obj: Union[EndReason, PoreType, RunInfo]) -> int:
method _add_end_reason (line 193) | def _add_end_reason(self, end_reason: EndReason) -> int:
method _add_pore_type (line 199) | def _add_pore_type(self, pore_type: PoreType) -> int:
method _add_run_info (line 205) | def _add_run_info(self, run_info: RunInfo) -> int:
method contains (line 233) | def contains(self, obj: Union[EndReason, RunInfo]) -> bool:
method find (line 249) | def find(self, obj: Union[EndReason, RunInfo]) -> int:
method add_read (line 275) | def add_read(self, read: Union[Read, CompressedRead]) -> None:
method add_reads (line 287) | def add_reads(self, reads: Sequence[Union[Read, CompressedRead]]) -> N...
method _prepare_add_reads_args (line 334) | def _prepare_add_reads_args(self, reads: Sequence[BaseRead]) -> List[A...
FILE: python/pod5/src/tests/conftest.py
function pytest_addoption (line 35) | def pytest_addoption(parser):
function assert_no_leaked_handles (line 46) | def assert_no_leaked_handles() -> Generator[None, None, None]:
function assert_no_leaked_handles_win (line 57) | def assert_no_leaked_handles_win(path: Path) -> None:
function reader (line 68) | def reader() -> Generator[p5.Reader, None, None]:
function writer (line 77) | def writer(tmp_path: Path) -> Generator[p5.Writer, None, None]:
function rand_float (line 90) | def rand_float(seed: int) -> float:
function rand_int (line 96) | def rand_int(low: int, high: int, seed: int) -> int:
function rand_str (line 102) | def rand_str(prefix: str, seed: int) -> str:
function _random_read_id (line 108) | def _random_read_id(seed: int = 1) -> UUID:
function random_read_id (line 114) | def random_read_id(request) -> UUID:
function _random_pore (line 119) | def _random_pore(seed: int) -> p5.Pore:
function random_pore (line 127) | def random_pore(request) -> p5.Pore:
function _random_calibration (line 132) | def _random_calibration(seed: int = 1) -> p5.Calibration:
function random_calibration (line 138) | def random_calibration(request) -> p5.Calibration:
function _random_end_reason (line 143) | def _random_end_reason(seed: int = 1) -> p5.EndReason:
function random_end_reason (line 151) | def random_end_reason(request) -> p5.EndReason:
function _random_run_info (line 156) | def _random_run_info(seed: int = 1) -> p5.RunInfo:
function random_run_info (line 185) | def random_run_info(request) -> p5.RunInfo:
function _random_signal (line 190) | def _random_signal(seed: int = 1) -> numpy.typing.NDArray[numpy.int16]:
function random_signal (line 198) | def random_signal(request) -> numpy.typing.NDArray[numpy.int16]:
function _random_read (line 203) | def _random_read(seed: int = 1) -> p5.Read:
function random_read (line 222) | def random_read(request) -> p5.Read:
function _random_read_pre_compressed (line 227) | def _random_read_pre_compressed(seed: int = 1) -> p5.CompressedRead:
function random_read_pre_compressed (line 247) | def random_read_pre_compressed(request) -> p5.CompressedRead:
function _seeder (line 252) | def _seeder(seed: int) -> Generator[int, None, None]:
function pod5_factory (line 262) | def pod5_factory(request, tmp_path_factory: pytest.TempPathFactory, pyte...
function nested_dataset (line 313) | def nested_dataset(tmp_path_factory: pytest.TempPathFactory, pod5_factor...
FILE: python/pod5/src/tests/test_api.py
function gen_test_read (line 17) | def gen_test_read(seed, compressed=False) -> Union[p5.Read, p5.Compresse...
function run_writer_test (line 88) | def run_writer_test(f: Writer):
function run_reader_test (line 118) | def run_reader_test(reader: p5.Reader):
function test_pyarrow_from_pathlib (line 233) | def test_pyarrow_from_pathlib():
function test_pyarrow_from_str (line 244) | def test_pyarrow_from_str():
function test_pyarrow_from_pathlib_uncompressed (line 255) | def test_pyarrow_from_pathlib_uncompressed():
function test_read_id_packing (line 267) | def test_read_id_packing():
FILE: python/pod5/src/tests/test_convert_from_fast5.py
function unraisablehook (line 211) | def unraisablehook(unraisable):
class TestFast5Conversion (line 218) | class TestFast5Conversion:
method test_convert_fast5_read (line 221) | def test_convert_fast5_read(self) -> None:
method test_end_reason (line 258) | def test_end_reason(self, fast5: int, expected: pod5.EndReasonEnum) ->...
method test_convert_run_info_defaults (line 262) | def test_convert_run_info_defaults(self) -> None:
method test_convert_run_info (line 296) | def test_convert_run_info(self) -> None:
class TestFast5Detection (line 349) | class TestFast5Detection:
method test_single_read_fast5_detection (line 350) | def test_single_read_fast5_detection(self):
method test_multi_read_fast5_detection (line 354) | def test_multi_read_fast5_detection(self):
method test_read_id_keys_detected (line 358) | def test_read_id_keys_detected(self) -> None:
method test_unknown_keys_ignored (line 364) | def test_unknown_keys_ignored(self) -> None:
method test_bad_keys_skipped_with_warning (line 369) | def test_bad_keys_skipped_with_warning(self) -> None:
class TestConvertBehaviour (line 377) | class TestConvertBehaviour:
method test_no_unforced_overwrite (line 380) | def test_no_unforced_overwrite(self, tmp_path: Path):
method test_forced_overwrite (line 388) | def test_forced_overwrite(self, tmp_path: Path):
method test_directory_output (line 395) | def test_directory_output(self, tmp_path: Path):
method test_single_file_output (line 406) | def test_single_file_output(self, tmp_path: Path):
method test_output_121_relative (line 415) | def test_output_121_relative(self, tmp_path: Path):
method test_output_121_relative_no_parents (line 440) | def test_output_121_relative_no_parents(self, tmp_path: Path):
class TestOutputHandler (line 465) | class TestOutputHandler:
method test_output_handler_default_writer (line 466) | def test_output_handler_default_writer(self, tmp_path: Path):
method test_output_handler_one_to_one_writer (line 479) | def test_output_handler_one_to_one_writer(self, tmp_path: Path):
method test_output_handler_one_to_one_multiple_writer (line 492) | def test_output_handler_one_to_one_multiple_writer(self, tmp_path: Path):
method test_no_reopen (line 506) | def test_no_reopen(self, tmp_path: Path):
method test_none_if_exception (line 515) | def test_none_if_exception(self, tmp_path: Path):
method test_no_duplicate_open (line 523) | def test_no_duplicate_open(self, tmp_path: Path):
class TestQueueManager (line 532) | class TestQueueManager:
method test_shutdown (line 533) | def test_shutdown(self, monkeypatch, caplog: pytest.LogCaptureFixture):
method test_shutdown_with_work (line 558) | def test_shutdown_with_work(self, monkeypatch, caplog: pytest.LogCaptu...
method test_blocked_by_requests (line 587) | def test_blocked_by_requests(self) -> None:
method test_data_queue (line 606) | def test_data_queue(self) -> None:
method test_exception_queue (line 634) | def test_exception_queue(self) -> None:
class TestConvertLoop (line 656) | class TestConvertLoop:
method test_convert_fast5_files_file_type_exceptions (line 657) | def test_convert_fast5_files_file_type_exceptions(self, tmp_path: Path...
method test_convert_fast5_files_breaks_loop (line 674) | def test_convert_fast5_files_breaks_loop(self) -> None:
method test_convert_fast5_file_exception (line 691) | def test_convert_fast5_file_exception(self, mock: Mock) -> None:
method test_handle_exception (line 710) | def test_handle_exception(self) -> None:
FILE: python/pod5/src/tests/test_convert_to_fast5.py
class TestPod5ConversionRoundTrip (line 19) | class TestPod5ConversionRoundTrip:
method test_convert_pod5_to_fast5_and_back (line 22) | def test_convert_pod5_to_fast5_and_back(self, tmp_path: Path) -> None:
class TestConvertBehaviour (line 74) | class TestConvertBehaviour:
method test_no_unforced_overwrite (line 77) | def test_no_unforced_overwrite(self, tmp_path: Path):
method test_forced_overwrite (line 85) | def test_forced_overwrite(self, tmp_path: Path):
method test_recursive_input (line 96) | def test_recursive_input(self, tmp_path: Path):
method test_multiple_outputs (line 107) | def test_multiple_outputs(self, tmp_path: Path):
FILE: python/pod5/src/tests/test_dataset.py
class TestDatasetReader (line 39) | class TestDatasetReader:
method test_bad_file_num_reads (line 44) | def test_bad_file_num_reads(self, tmp_path: Path) -> None:
method test_len_single (line 52) | def test_len_single(self) -> None:
method test_iter_single (line 59) | def test_iter_single(self) -> None:
method test_no_recursive (line 66) | def test_no_recursive(self, nested_dataset: Path) -> None:
method test_recursive (line 80) | def test_recursive(self, nested_dataset: Path) -> None:
method test_get_reader_is_cached (line 107) | def test_get_reader_is_cached(self, nested_dataset: Path) -> None:
method test_reader_all_cache (line 120) | def test_reader_all_cache(self, nested_dataset: Path) -> None:
method test_reader_all_cache_context (line 139) | def test_reader_all_cache_context(self, nested_dataset: Path) -> None:
method test_reader_no_cache (line 157) | def test_reader_no_cache(self, nested_dataset: Path) -> None:
method test_reader_clear_readers (line 176) | def test_reader_clear_readers(self, nested_dataset: Path) -> None:
method test_reader_cache_delete (line 195) | def test_reader_cache_delete(self, nested_dataset: Path) -> None:
method test_random_read_indexing (line 213) | def test_random_read_indexing(self, nested_dataset: Path) -> None:
method test_duplicate_read_selection (line 229) | def test_duplicate_read_selection(self, nested_dataset: Path) -> None:
method test_missing_id_does_not_return_member (line 245) | def test_missing_id_does_not_return_member(self, nested_dataset: Path)...
method test_invalid_id_does_not_return_member (line 271) | def test_invalid_id_does_not_return_member(self, nested_dataset: Path)...
method test_empty_read_selection (line 291) | def test_empty_read_selection(self, nested_dataset: Path) -> None:
method test_prompt_read_indexing (line 297) | def test_prompt_read_indexing(self, nested_dataset: Path) -> None:
method test_iter_multi (line 304) | def test_iter_multi(self, nested_dataset: Path) -> None:
method test_iter_multi_single_thread (line 317) | def test_iter_multi_single_thread(self, nested_dataset: Path) -> None:
method test_iter_multi_multi_thread (line 335) | def test_iter_multi_multi_thread(self, nested_dataset: Path) -> None:
method test_iter_multi_multi_thread_no_cache (line 351) | def test_iter_multi_multi_thread_no_cache(self, nested_dataset: Path) ...
method test_mixed_load (line 372) | def test_mixed_load(self, nested_dataset: Path) -> None:
method test_iter_selection (line 380) | def test_iter_selection(self, nested_dataset: Path) -> None:
method test_iter_duplicate (line 393) | def test_iter_duplicate(self, nested_dataset: Path) -> None:
method test_duplicate (line 409) | def test_duplicate(self, tmp_path: Path) -> None:
method test_duplicate_index_warns (line 424) | def test_duplicate_index_warns(self, tmp_path: Path) -> None:
method test_iter_missing (line 443) | def test_iter_missing(self, nested_dataset: Path) -> None:
method test_get_path (line 458) | def test_get_path(self, nested_dataset: Path) -> None:
method test_collect_paths (line 468) | def test_collect_paths(self, nested_dataset: Path) -> None:
FILE: python/pod5/src/tests/test_filter.py
class TestFilterParseIds (line 27) | class TestFilterParseIds:
method _read_ids_path (line 30) | def _read_ids_path(self, tmp_path: Path, ids: List[str]) -> Path:
method _assert_columns (line 35) | def _assert_columns(self, df: pl.LazyFrame) -> None:
method _assert_all_expected (line 39) | def _assert_all_expected(self, df: pl.LazyFrame) -> None:
method test_example (line 45) | def test_example(self, tmp_path: Path) -> None:
method test_example_with_header (line 53) | def test_example_with_header(self, tmp_path: Path) -> None:
method test_example_with_comments (line 64) | def test_example_with_comments(self, tmp_path: Path) -> None:
method test_example_with_whitespace (line 76) | def test_example_with_whitespace(self, tmp_path: Path) -> None:
method test_no_ids (line 88) | def test_no_ids(self, tmp_path: Path) -> None:
class TestFilter (line 98) | class TestFilter:
method test_all_in_out (line 99) | def test_all_in_out(self, tmp_path: Path) -> None:
method test_no_duplicates (line 131) | def test_no_duplicates(self, tmp_path: Path) -> None:
method test_missing_read_ids (line 161) | def test_missing_read_ids(self, tmp_path: Path) -> None:
method test_force_overwrite (line 194) | def test_force_overwrite(self, tmp_path: Path) -> None:
method test_empty_input_fails (line 222) | def test_empty_input_fails(self, tmp_path: Path) -> None:
method test_random_inputs (line 240) | def test_random_inputs(self, pod5_factory, tmp_path: Path, n_reads: in...
method test_input_directory (line 266) | def test_input_directory(self, tmp_path: Path) -> None:
method test_recursive_inputs_symlink (line 286) | def test_recursive_inputs_symlink(self, tmp_path: Path) -> None:
FILE: python/pod5/src/tests/test_inspect.py
class TestReads (line 11) | class TestReads:
method test_reads_header_written_once (line 12) | def test_reads_header_written_once(
FILE: python/pod5/src/tests/test_merge.py
class TestMerge (line 11) | class TestMerge:
method test_merge_runs (line 14) | def test_merge_runs(self, tmp_path: Path):
method test_merge_duplicate_stopped (line 33) | def test_merge_duplicate_stopped(self, tmp_path: Path):
FILE: python/pod5/src/tests/test_reader.py
class TestPod5Reader (line 25) | class TestPod5Reader:
method test_reader_fixture (line 28) | def test_reader_fixture(self, reader: p5.Reader) -> None:
method test_reader_reads_types (line 52) | def test_reader_reads_types(
method test_reader_reads_numpy_types (line 73) | def test_reader_reads_numpy_types(
method test_reader_reads_container_types (line 100) | def test_reader_reads_container_types(
method test_attribute_types (line 122) | def test_attribute_types(self) -> None:
method test_without_mmap (line 152) | def test_without_mmap(self) -> None:
method test_sparse_file_warns_during_preflight (line 169) | def test_sparse_file_warns_during_preflight(self, tmp_path: Path, capf...
method test_iter_selection_in_file_order (line 197) | def test_iter_selection_in_file_order(self, reader: p5.Reader) -> None:
class TestRecordBatch (line 208) | class TestRecordBatch:
method test_get_read (line 209) | def test_get_read(self, pod5_factory) -> None:
method test_column_selection (line 223) | def test_column_selection(self, pod5_factory) -> None:
method test_read_batches (line 248) | def test_read_batches(self, pod5_factory) -> None:
method test_read_batches_raises (line 257) | def test_read_batches_raises(self, pod5_factory) -> None:
method test_cache_exceptions (line 269) | def test_cache_exceptions(self, pod5_factory) -> None:
FILE: python/pod5/src/tests/test_recover.py
class TestRecover (line 17) | class TestRecover:
method _generate_recoverable_file (line 20) | def _generate_recoverable_file(self, dest_path: Path, read_count=1200):
method test_recover_runs (line 40) | def test_recover_runs(
FILE: python/pod5/src/tests/test_repack.py
class TestRepack (line 17) | class TestRepack:
method test_works (line 20) | def test_works(self, tmp_path: Path) -> None:
method test_detect_name_collision (line 41) | def test_detect_name_collision(self, tmp_path: Path) -> None:
method test_overwrite_symlink (line 56) | def test_overwrite_symlink(self, tmp_path: Path) -> None:
method test_overwrite_data (line 85) | def test_overwrite_data(self, tmp_path: Path) -> None:
class TestRepacker (line 106) | class TestRepacker:
method test_add_all (line 107) | def test_add_all(self, tmp_path: Path, pod5_factory) -> None:
method test_add_selection (line 130) | def test_add_selection(self, tmp_path: Path, pod5_factory) -> None:
method test_missing_selection (line 154) | def test_missing_selection(self, tmp_path: Path, pod5_factory) -> None:
FILE: python/pod5/src/tests/test_signal_tools.py
class TestPod5SignalTools (line 24) | class TestPod5SignalTools:
method test_round_trip (line 28) | def test_round_trip(self, random_signal: npt.NDArray[np.int16]) -> None:
method test_round_trip_empty (line 37) | def test_round_trip_empty(self) -> None:
method test_round_trip_chunked (line 47) | def test_round_trip_chunked(self, random_signal: npt.NDArray[np.int16]...
method test_round_trip_chunked_empty (line 66) | def test_round_trip_chunked_empty(self) -> None:
class DemoObj (line 86) | class DemoObj:
method __init__ (line 87) | def __init__(self, path: Path) -> None:
method __del__ (line 91) | def __del__(self):
function demo_obj (line 96) | def demo_obj(tmp_path: Path) -> DemoObj:
class TestSafeClose (line 102) | class TestSafeClose:
method test_closes (line 105) | def test_closes(self, demo_obj: DemoObj) -> None:
method test_passes_unknown_attribute (line 111) | def test_passes_unknown_attribute(self, demo_obj: DemoObj) -> None:
method test_passes_known_non_handle_attribute (line 116) | def test_passes_known_non_handle_attribute(self, demo_obj: DemoObj) ->...
FILE: python/pod5/src/tests/test_subset.py
function get_resource_module (line 29) | def get_resource_module() -> ModuleType | None:
class TestSubset (line 91) | class TestSubset:
method csv_mapping_single (line 95) | def csv_mapping_single(path: Path, mapping: Dict[str, Set[str]]) -> Path:
method _test_subset (line 104) | def _test_subset(self, tmp: Path, csv: Path, mapping: Dict[str, Set[st...
method test_subset_base (line 132) | def test_subset_base(self, tmp_path: Path):
method test_subset_shared_read_id (line 137) | def test_subset_shared_read_id(self, tmp_path: Path):
method test_subset_duplicate_read_id (line 142) | def test_subset_duplicate_read_id(self, tmp_path: Path):
method test_subset_dir_and_recurse (line 147) | def test_subset_dir_and_recurse(
method test_assert_overwrite (line 180) | def test_assert_overwrite(self, tmp_path: Path) -> None:
method _pod5s_with_view_table (line 190) | def _pod5s_with_view_table(
method test_subset_ulimit_below_num_outputs (line 214) | def test_subset_ulimit_below_num_outputs(
method test_subset_ulimit_below_num_inputs (line 262) | def test_subset_ulimit_below_num_inputs(
class TestFilenameTemplating (line 307) | class TestFilenameTemplating:
method test_default_template (line 318) | def test_default_template(self, columns: List[str], expected: str):
method test_column_keys_from_template (line 336) | def test_column_keys_from_template(self, keys: List[str], template: st...
method test_fstring_to_polars (line 353) | def test_fstring_to_polars(
method test_template_assertions (line 360) | def test_template_assertions(self) -> None:
class TestParse (line 373) | class TestParse:
method test_csv_separator (line 374) | def test_csv_separator(self, tmp_path: Path) -> None:
method test_tsv_separator (line 380) | def test_tsv_separator(self, tmp_path: Path) -> None:
method _inspect_reads_content (line 386) | def _inspect_reads_content(
method _write_csv (line 392) | def _write_csv(self, tmp_path: Path, content: str) -> Path:
method _write_tsv (line 398) | def _write_tsv(self, tmp_path: Path, content: str) -> Path:
method test_csv_tsv_parse_equal_1 (line 405) | def test_csv_tsv_parse_equal_1(
method test_csv_tsv_parse_equal_2 (line 462) | def test_csv_tsv_parse_equal_2(
method test_parse_csv_filters_invalid_read_ids (line 516) | def test_parse_csv_filters_invalid_read_ids(self, tmp_path: Path) -> N...
method test_parse_table_filters_invalid_read_ids (line 532) | def test_parse_table_filters_invalid_read_ids(self, tmp_path: Path) ->...
FILE: python/pod5/src/tests/test_tools.py
function assert_exit_code (line 30) | def assert_exit_code(func: Callable, func_kwargs: Dict, exit_code: int =...
class TestPod5Tools (line 38) | class TestPod5Tools:
method test_main_calls_run (line 42) | def test_main_calls_run(self, m_run_tool: Mock) -> None:
method test_run_tool_debug_env (line 49) | def test_run_tool_debug_env(
method test_run_tool_raises (line 72) | def test_run_tool_raises(self, monkeypatch: pytest.MonkeyPatch) -> None:
method test_pod5_version_argument (line 90) | def test_pod5_version_argument(self, capsys: pytest.CaptureFixture) ->...
method test_convert_exists (line 98) | def test_convert_exists(self, subcommand: str) -> None:
method test_inspect_exists (line 105) | def test_inspect_exists(self, subcommand: str) -> None:
method test_tool_exists (line 115) | def test_tool_exists(self, command: str) -> None:
method test_convert_from_fast5_runs (line 121) | def test_convert_from_fast5_runs(self, tmp_path: Path) -> None:
method test_convert_to_fast5_runs (line 136) | def test_convert_to_fast5_runs(self, tmp_path: Path) -> None:
method test_inspect_command_runs (line 163) | def test_inspect_command_runs(self, tmp_path: Path, subcommand: str) -...
method test_inspect_read_finds_read (line 175) | def test_inspect_read_finds_read(self, capsys: pytest.CaptureFixture) ...
method test_merge_command_runs (line 196) | def test_merge_command_runs(self, tmp_path: Path) -> None:
method test_repack_command_runs (line 209) | def test_repack_command_runs(self, tmp_path: Path) -> None:
method test_recover_command_runs (line 222) | def test_recover_command_runs(self) -> None:
method test_subset_command_runs (line 233) | def test_subset_command_runs(self, tmp_path: Path) -> None:
method test_filter_command_runs (line 252) | def test_filter_command_runs(self, tmp_path: Path) -> None:
method test_update_command_runs (line 267) | def test_update_command_runs(self, tmp_path: Path) -> None:
method test_view_command_runs (line 280) | def test_view_command_runs(self) -> None:
method test_view_command_runs_list_fields (line 291) | def test_view_command_runs_list_fields(self) -> None:
method test_scripts_run_directly (line 309) | def test_scripts_run_directly(self, script: Path) -> None:
class TestUtils (line 315) | class TestUtils:
method test_collect_inputs (line 316) | def test_collect_inputs(self, tmp_path: Path) -> None:
method test_collect_inputs_non_existent (line 366) | def test_collect_inputs_non_existent(self, tmp_path: Path) -> None:
method test_limit_threads (line 372) | def test_limit_threads(self) -> None:
FILE: python/pod5/src/tests/test_update.py
class TestUpdate (line 14) | class TestUpdate:
method test_detect_inplace_update (line 17) | def test_detect_inplace_update(self, tmp_path: Path) -> None:
method test_update (line 25) | def test_update(self, tmp_path: Path) -> None:
FILE: python/pod5/src/tests/test_view.py
class TestView (line 60) | class TestView:
method is_equal_or_not_set (line 63) | def is_equal_or_not_set(self, field: str, expected: str) -> None:
method _compare (line 66) | def _compare(self, record: p5.ReadRecord, row: Dict[str, Any]) -> None:
method test_view (line 102) | def test_view(self, tmp_path: Path):
method test_view_no_input (line 130) | def test_view_no_input(self, tmp_path: Path):
method test_write_stdout (line 135) | def test_write_stdout(self, capsys: pytest.CaptureFixture) -> None:
method test_is_loadable (line 151) | def test_is_loadable(self, tmp_path: Path) -> None:
method test_parse_run_info (line 163) | def test_parse_run_info(self, pod5_factory) -> None:
method test_parse_reads_all (line 180) | def test_parse_reads_all(self, pod5_factory) -> None:
method test_parse_reads_multi_chunk (line 198) | def test_parse_reads_multi_chunk(self, pod5_factory) -> None:
method test_unique_on_duplicated_run_info (line 223) | def test_unique_on_duplicated_run_info(self) -> None:
class TestSelection (line 241) | class TestSelection:
method test_select (line 244) | def test_select(self) -> None:
method test_misspelling (line 276) | def test_misspelling(self, field: str) -> None:
method test_randomly (line 281) | def test_randomly(self) -> None:
method test_get_field (line 298) | def test_get_field(self) -> None:
class TestMisc (line 311) | class TestMisc:
method test_resolve_output (line 312) | def test_resolve_output(self, tmp_path: Path) -> None:
method test_fields (line 331) | def test_fields(self) -> None:
method test_unique_acquisition_id (line 335) | def test_unique_acquisition_id(self) -> None:
FILE: python/pod5/src/tests/test_writer.py
class TestPod5Writer (line 13) | class TestPod5Writer:
method test_writer_fixture (line 16) | def test_writer_fixture(self, writer: p5.Writer) -> None:
method test_writer_random_reads (line 22) | def test_writer_random_reads(self, writer: p5.Writer, random_read: p5....
method test_writer_random_reads_compressed (line 28) | def test_writer_random_reads_compressed(
method test_read_edit_write (line 34) | def test_read_edit_write(self, reader: p5.Reader, writer: p5.Writer) -...
method test_read_copy (line 72) | def test_read_copy(self, reader: p5.Reader, writer: p5.Writer) -> None:
method test_read_record_type_check (line 118) | def test_read_record_type_check(self, reader: p5.Reader, writer: p5.Wr...
FILE: python/pod5/test_utils/check_pod5_files_equal.py
function main (line 9) | def main():
FILE: test_package/conanfile.py
class TestPackageConan (line 8) | class TestPackageConan(ConanFile):
method requirements (line 22) | def requirements(self):
method layout (line 25) | def layout(self):
method build (line 28) | def build(self):
method _test_executable (line 34) | def _test_executable(self):
method test (line 37) | def test(self):
FILE: test_package/test_package.cpp
function main (line 5) | int main()
FILE: third_party/include/catch2/catch.hpp
type Catch (line 97) | namespace Catch {
type CaseSensitive (line 514) | struct CaseSensitive {
type Choice (line 515) | enum Choice { Yes, No }
class NonCopyable (line 518) | class NonCopyable {
method NonCopyable (line 519) | NonCopyable(NonCopyable const &) = delete;
method NonCopyable (line 520) | NonCopyable(NonCopyable &&) = delete;
method NonCopyable (line 521) | NonCopyable &operator=(NonCopyable const &) = delete;
method NonCopyable (line 522) | NonCopyable &operator=(NonCopyable &&) = delete;
type SourceLineInfo (line 529) | struct SourceLineInfo {
method SourceLineInfo (line 530) | SourceLineInfo() = delete;
method SourceLineInfo (line 531) | SourceLineInfo(char const *_file, std::size_t _line) noexcept : file...
method SourceLineInfo (line 533) | SourceLineInfo(SourceLineInfo const &other) = default;
method SourceLineInfo (line 534) | SourceLineInfo &operator=(SourceLineInfo const &) = default;
method SourceLineInfo (line 535) | SourceLineInfo(SourceLineInfo &&) noexcept = default;
method SourceLineInfo (line 536) | SourceLineInfo &operator=(SourceLineInfo &&) noexcept = default;
method empty (line 538) | bool empty() const noexcept { return file[0] == '\0'; }
type StreamEndStop (line 557) | struct StreamEndStop {
function T (line 561) | T const &operator+(T const &value, StreamEndStop) {
type RegistrarForTagAliases (line 572) | struct RegistrarForTagAliases {
class TestSpec (line 596) | class TestSpec
class Pattern (line 5521) | class Pattern {
class NamePattern (line 5533) | class NamePattern : public Pattern {
class TagPattern (line 5542) | class TagPattern : public Pattern {
class ExcludedPattern (line 5551) | class ExcludedPattern : public Pattern {
type Filter (line 5560) | struct Filter {
type FilterMatch (line 5568) | struct FilterMatch {
type ITestInvoker (line 598) | struct ITestInvoker {
class TestCase (line 603) | class TestCase
type IConfig (line 604) | struct IConfig
type ITestCaseRegistry (line 606) | struct ITestCaseRegistry {
class StringRef (line 634) | class StringRef {
method StringRef (line 646) | constexpr StringRef() noexcept = default;
method StringRef (line 650) | constexpr StringRef(char const *rawChars, size_type size) noexcept
method StringRef (line 653) | StringRef(std::string const &stdString) noexcept
method empty (line 668) | constexpr auto empty() const noexcept -> bool { return m_size == 0; }
method size (line 669) | constexpr auto size() const noexcept -> size_type { return m_size; }
method isNullTerminated (line 684) | constexpr auto isNullTerminated() const noexcept -> bool { return m_...
method const_iterator (line 687) | constexpr const_iterator begin() const { return m_start; }
method const_iterator (line 688) | constexpr const_iterator end() const { return m_start + m_size; }
type always_false (line 1150) | struct always_false : std::false_type {}
type true_given (line 1153) | struct true_given : std::true_type {}
type is_callable_tester (line 1154) | struct is_callable_tester {
type is_callable (line 1162) | struct is_callable
class TestInvokerAsMethod (line 1190) | class TestInvokerAsMethod : public ITestInvoker {
method TestInvokerAsMethod (line 1194) | TestInvokerAsMethod(void (C::*testAsMethod)()) noexcept : m_testAsMe...
method invoke (line 1196) | void invoke() const override {
function makeTestInvoker (line 1205) | auto makeTestInvoker(void (C::*testAsMethod)()) noexcept -> ITestInvok...
type NameAndTags (line 1209) | struct NameAndTags {
type AutoReg (line 1216) | struct AutoReg : NonCopyable {
type ResultWas (line 1784) | struct ResultWas {
type OfType (line 1785) | enum OfType {
type ResultDisposition (line 1810) | struct ResultDisposition {
type Flags (line 1811) | enum Flags {
function isFalseTest (line 1823) | inline bool isFalseTest(int flags) { return (flags & ResultDisposition...
type AssertionInfo (line 1831) | struct AssertionInfo {
class StringRef (line 1865) | class StringRef
method StringRef (line 646) | constexpr StringRef() noexcept = default;
method StringRef (line 650) | constexpr StringRef(char const *rawChars, size_type size) noexcept
method StringRef (line 653) | StringRef(std::string const &stdString) noexcept
method empty (line 668) | constexpr auto empty() const noexcept -> bool { return m_size == 0; }
method size (line 669) | constexpr auto size() const noexcept -> size_type { return m_size; }
method isNullTerminated (line 684) | constexpr auto isNullTerminated() const noexcept -> bool { return m_...
method const_iterator (line 687) | constexpr const_iterator begin() const { return m_start; }
method const_iterator (line 688) | constexpr const_iterator end() const { return m_start + m_size; }
type IStream (line 1867) | struct IStream {
class ReusableStringStream (line 1874) | class ReusableStringStream : NonCopyable {
method get (line 1889) | auto get() -> std::ostream & { return *m_oss; }
type Detail (line 1900) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type IMutableEnumValuesRegistry (line 1911) | struct IMutableEnumValuesRegistry {
type Detail (line 1990) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type StringMaker (line 2052) | struct StringMaker {
method convert (line 2054) | static typename std::enable_if<::Catch::Detail::IsStreamInsertable<F...
method convert (line 2065) | static typename std::enable_if<!::Catch::Detail::IsStreamInsertable<...
type Detail (line 2076) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type StringMaker<std::string> (line 2103) | struct StringMaker<std::string> {
type StringMaker<std::string_view> (line 2109) | struct StringMaker<std::string_view> {
type StringMaker<char const *> (line 2115) | struct StringMaker<char const *> {
type StringMaker<char *> (line 2119) | struct StringMaker<char *> {
type StringMaker<std::wstring> (line 2125) | struct StringMaker<std::wstring> {
type StringMaker<std::wstring_view> (line 2131) | struct StringMaker<std::wstring_view> {
type StringMaker<wchar_t const *> (line 2137) | struct StringMaker<wchar_t const *> {
type StringMaker<wchar_t *> (line 2141) | struct StringMaker<wchar_t *> {
type StringMaker<char[SZ]> (line 2149) | struct StringMaker<char[SZ]> {
method convert (line 2150) | static std::string convert(char const *str) {
type StringMaker<signed char[SZ]> (line 2155) | struct StringMaker<signed char[SZ]> {
method convert (line 2156) | static std::string convert(signed char const *str) {
type StringMaker<unsigned char[SZ]> (line 2161) | struct StringMaker<unsigned char[SZ]> {
method convert (line 2162) | static std::string convert(unsigned char const *str) {
type StringMaker<std::byte> (line 2169) | struct StringMaker<std::byte> {
type StringMaker<int> (line 2174) | struct StringMaker<int> {
type StringMaker<long> (line 2178) | struct StringMaker<long> {
type StringMaker<long long> (line 2182) | struct StringMaker<long long> {
type StringMaker<unsigned int> (line 2186) | struct StringMaker<unsigned int> {
type StringMaker<unsigned long> (line 2190) | struct StringMaker<unsigned long> {
type StringMaker<unsigned long long> (line 2194) | struct StringMaker<unsigned long long> {
type StringMaker<bool> (line 2199) | struct StringMaker<bool> {
type StringMaker<char> (line 2204) | struct StringMaker<char> {
type StringMaker<signed char> (line 2208) | struct StringMaker<signed char> {
type StringMaker<unsigned char> (line 2212) | struct StringMaker<unsigned char> {
type StringMaker<std::nullptr_t> (line 2217) | struct StringMaker<std::nullptr_t> {
type StringMaker<float> (line 2222) | struct StringMaker<float> {
type StringMaker<double> (line 2228) | struct StringMaker<double> {
type StringMaker<T *> (line 2234) | struct StringMaker<T *> {
method convert (line 2236) | static std::string convert(U *p) {
type StringMaker<R C::*> (line 2246) | struct StringMaker<R C::*> {
method convert (line 2247) | static std::string convert(R C::*p) {
type StringMaker<T ^> (line 2258) | struct StringMaker<T ^> {
method convert (line 2259) | static std::string convert(T ^ ref) { return ::Catch::Detail::clrRef...
type Detail (line 2263) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type StringMaker<NSString *> (line 2280) | struct StringMaker<NSString *> {
method convert (line 2281) | static std::string convert(NSString *nsstring) {
type StringMaker<NSObject *> (line 2288) | struct StringMaker<NSObject *> {
method convert (line 2289) | static std::string convert(NSObject *nsObject) {
type Detail (line 2293) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type StringMaker<std::pair<T1, T2>> (line 2320) | struct StringMaker<std::pair<T1, T2>> {
method convert (line 2321) | static std::string convert(const std::pair<T1, T2> &pair) {
type StringMaker<std::optional<T>> (line 2335) | struct StringMaker<std::optional<T>> {
method convert (line 2336) | static std::string convert(const std::optional<T> &optional) {
type Detail (line 2353) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type StringMaker<std::monostate> (line 2386) | struct StringMaker<std::monostate> {
method convert (line 2387) | static std::string convert(const std::monostate &) { return "{ }"; }
type detail (line 2409) | namespace detail {
type void_type (line 2411) | struct void_type {
type is_range_impl (line 2416) | struct is_range_impl : std::false_type {}
type is_range_impl<T, typename void_type<decltype(begin(std::declval<T>()))>::type> (line 2419) | struct is_range_impl<T, typename void_type<decltype(begin(std::declv...
type is_range (line 2424) | struct is_range : detail::is_range_impl<T> {}
type is_range<T ^> (line 2428) | struct is_range<T ^> {
function rangeToString (line 2434) | std::string rangeToString(Range const &range) {
function rangeToString (line 2440) | std::string rangeToString(std::vector<bool, Allocator> const &v) {
type StringMaker<R,
typename std::enable_if<is_range<R>::value &&
!::Catch::Detail::IsStreamInsertable<R>::value>::type> (line 2456) | struct StringMaker<R,
method convert (line 2459) | static std::string convert(R const &range) { return rangeToString(ra...
type StringMaker<T[SZ]> (line 2463) | struct StringMaker<T[SZ]> {
method convert (line 2464) | static std::string convert(T const (&arr)[SZ]) { return rangeToStrin...
type ratio_string (line 2478) | struct ratio_string {
type ratio_string<std::atto> (line 2489) | struct ratio_string<std::atto> {
type ratio_string<std::femto> (line 2493) | struct ratio_string<std::femto> {
type ratio_string<std::pico> (line 2497) | struct ratio_string<std::pico> {
type ratio_string<std::nano> (line 2501) | struct ratio_string<std::nano> {
type ratio_string<std::micro> (line 2505) | struct ratio_string<std::micro> {
type ratio_string<std::milli> (line 2509) | struct ratio_string<std::milli> {
type StringMaker<std::chrono::duration<Value, Ratio>> (line 2516) | struct StringMaker<std::chrono::duration<Value, Ratio>> {
method convert (line 2517) | static std::string convert(std::chrono::duration<Value, Ratio> const...
type StringMaker<std::chrono::duration<Value, std::ratio<1>>> (line 2524) | struct StringMaker<std::chrono::duration<Value, std::ratio<1>>> {
method convert (line 2525) | static std::string convert(std::chrono::duration<Value, std::ratio<1...
type StringMaker<std::chrono::duration<Value, std::ratio<60>>> (line 2532) | struct StringMaker<std::chrono::duration<Value, std::ratio<60>>> {
method convert (line 2533) | static std::string convert(std::chrono::duration<Value, std::ratio<6...
type StringMaker<std::chrono::duration<Value, std::ratio<3600>>> (line 2540) | struct StringMaker<std::chrono::duration<Value, std::ratio<3600>>> {
method convert (line 2541) | static std::string convert(std::chrono::duration<Value, std::ratio<3...
type StringMaker<std::chrono::time_point<Clock, Duration>> (line 2553) | struct StringMaker<std::chrono::time_point<Clock, Duration>> {
method convert (line 2554) | static std::string convert(std::chrono::time_point<Clock, Duration> ...
type StringMaker<std::chrono::time_point<std::chrono::system_clock, Duration>> (line 2560) | struct StringMaker<std::chrono::time_point<std::chrono::system_clock, ...
method convert (line 2561) | static std::string convert(
type ITransientExpression (line 2621) | struct ITransientExpression {
method isBinaryExpression (line 2622) | auto isBinaryExpression() const -> bool { return m_isBinaryExpressio...
method getResult (line 2623) | auto getResult() const -> bool { return m_result; }
method ITransientExpression (line 2626) | ITransientExpression(bool isBinaryExpression, bool result)
class BinaryExpr (line 2643) | class BinaryExpr : public ITransientExpression {
method streamReconstructedExpression (line 2648) | void streamReconstructedExpression(std::ostream &os) const override {
method BinaryExpr (line 2654) | BinaryExpr(bool comparisonResult, LhsT lhs, StringRef op, RhsT rhs)
class UnaryExpr (line 2715) | class UnaryExpr : public ITransientExpression {
method streamReconstructedExpression (line 2718) | void streamReconstructedExpression(std::ostream &os) const override {
method UnaryExpr (line 2723) | explicit UnaryExpr(LhsT lhs)
function compareEqual (line 2730) | auto compareEqual(LhsT const &lhs, RhsT const &rhs) -> bool {
function compareEqual (line 2734) | auto compareEqual(T *const &lhs, int rhs) -> bool {
function compareEqual (line 2738) | auto compareEqual(T *const &lhs, long rhs) -> bool {
function compareEqual (line 2742) | auto compareEqual(int lhs, T *const &rhs) -> bool {
function compareEqual (line 2746) | auto compareEqual(long lhs, T *const &rhs) -> bool {
function compareNotEqual (line 2751) | auto compareNotEqual(LhsT const &lhs, RhsT &&rhs) -> bool {
function compareNotEqual (line 2755) | auto compareNotEqual(T *const &lhs, int rhs) -> bool {
function compareNotEqual (line 2759) | auto compareNotEqual(T *const &lhs, long rhs) -> bool {
function compareNotEqual (line 2763) | auto compareNotEqual(int lhs, T *const &rhs) -> bool {
function compareNotEqual (line 2767) | auto compareNotEqual(long lhs, T *const &rhs) -> bool {
class ExprLhs (line 2772) | class ExprLhs {
method ExprLhs (line 2776) | explicit ExprLhs(LhsT lhs) : m_lhs(lhs) {}
method makeUnaryExpr (line 2837) | auto makeUnaryExpr() const -> UnaryExpr<LhsT> { return UnaryExpr<Lhs...
function handleExpression (line 2843) | void handleExpression(ExprLhs<T> const &expr) {
type Decomposer (line 2847) | struct Decomposer {
class AssertionResult (line 2870) | class AssertionResult
method AssertionResult (line 5808) | AssertionResult() = delete;
type AssertionInfo (line 2871) | struct AssertionInfo
type SectionInfo (line 2872) | struct SectionInfo
method SectionInfo (line 3316) | SectionInfo(SourceLineInfo const &_lineInfo, std::string const &_nam...
type SectionEndInfo (line 2873) | struct SectionEndInfo
type MessageInfo (line 2874) | struct MessageInfo
type MessageBuilder (line 2875) | struct MessageBuilder
method MessageBuilder (line 3059) | MessageBuilder &operator<<(T const &value) {
type Counts (line 2876) | struct Counts
type AssertionReaction (line 2877) | struct AssertionReaction
type SourceLineInfo (line 2878) | struct SourceLineInfo
method SourceLineInfo (line 530) | SourceLineInfo() = delete;
method SourceLineInfo (line 531) | SourceLineInfo(char const *_file, std::size_t _line) noexcept : file...
method SourceLineInfo (line 533) | SourceLineInfo(SourceLineInfo const &other) = default;
method SourceLineInfo (line 534) | SourceLineInfo &operator=(SourceLineInfo const &) = default;
method SourceLineInfo (line 535) | SourceLineInfo(SourceLineInfo &&) noexcept = default;
method SourceLineInfo (line 536) | SourceLineInfo &operator=(SourceLineInfo &&) noexcept = default;
method empty (line 538) | bool empty() const noexcept { return file[0] == '\0'; }
type ITransientExpression (line 2880) | struct ITransientExpression
method isBinaryExpression (line 2622) | auto isBinaryExpression() const -> bool { return m_isBinaryExpressio...
method getResult (line 2623) | auto getResult() const -> bool { return m_result; }
method ITransientExpression (line 2626) | ITransientExpression(bool isBinaryExpression, bool result)
type IGeneratorTracker (line 2881) | struct IGeneratorTracker
type BenchmarkInfo (line 2884) | struct BenchmarkInfo
type BenchmarkStats (line 2886) | struct BenchmarkStats
type IResultCapture (line 2889) | struct IResultCapture {
type TestFailureException (line 2945) | struct TestFailureException {}
type AssertionResultData (line 2946) | struct AssertionResultData
method AssertionResultData (line 5794) | AssertionResultData() = delete;
type IResultCapture (line 2947) | struct IResultCapture
class RunContext (line 2948) | class RunContext
method RunContext (line 8436) | RunContext(RunContext const &) = delete;
method RunContext (line 8437) | RunContext &operator=(RunContext const &) = delete;
class LazyExpression (line 2950) | class LazyExpression {
method LazyExpression (line 2961) | LazyExpression &operator=(LazyExpression const &) = delete;
type AssertionReaction (line 2968) | struct AssertionReaction {
class AssertionHandler (line 2973) | class AssertionHandler {
method handleExpr (line 2991) | void handleExpr(ExprLhs<T> const &expr) {
type MessageInfo (line 3025) | struct MessageInfo {
type MessageStream (line 3043) | struct MessageStream {
method MessageStream (line 3045) | MessageStream &operator<<(T const &value) {
type MessageBuilder (line 3053) | struct MessageBuilder : MessageStream {
method MessageBuilder (line 3059) | MessageBuilder &operator<<(T const &value) {
class ScopedMessage (line 3067) | class ScopedMessage {
method ScopedMessage (line 3070) | ScopedMessage(ScopedMessage &duplicate) = delete;
class Capturer (line 3078) | class Capturer {
method captureValues (line 3093) | void captureValues(size_t index, T const &value) {
method captureValues (line 3098) | void captureValues(size_t index, T const &value, Ts const &...values) {
type Counts (line 3282) | struct Counts {
type Totals (line 3295) | struct Totals {
type SectionInfo (line 3312) | struct SectionInfo {
method SectionInfo (line 3316) | SectionInfo(SourceLineInfo const &_lineInfo, std::string const &_nam...
type SectionEndInfo (line 3324) | struct SectionEndInfo {
class Timer (line 3342) | class Timer {
class Section (line 3360) | class Section : NonCopyable {
class TestCase (line 3404) | class TestCase
type ITestCaseRegistry (line 3405) | struct ITestCaseRegistry
type IExceptionTranslatorRegistry (line 3406) | struct IExceptionTranslatorRegistry
type IExceptionTranslator (line 3407) | struct IExceptionTranslator
type IReporterRegistry (line 3408) | struct IReporterRegistry
type IReporterFactory (line 3409) | struct IReporterFactory
type ITagAliasRegistry (line 3410) | struct ITagAliasRegistry
type IMutableEnumValuesRegistry (line 3411) | struct IMutableEnumValuesRegistry
class StartupExceptionRegistry (line 3413) | class StartupExceptionRegistry
type IRegistryHub (line 3417) | struct IRegistryHub {
type IMutableRegistryHub (line 3428) | struct IMutableRegistryHub {
type IExceptionTranslator (line 3461) | struct IExceptionTranslator
type IExceptionTranslator (line 3464) | struct IExceptionTranslator {
type IExceptionTranslatorRegistry (line 3470) | struct IExceptionTranslatorRegistry {
class ExceptionTranslatorRegistrar (line 3476) | class ExceptionTranslatorRegistrar {
class ExceptionTranslator (line 3478) | class ExceptionTranslator : public IExceptionTranslator {
method ExceptionTranslator (line 3480) | ExceptionTranslator(std::string (*translateFunction)(T &))
method translate (line 3483) | std::string translate(ExceptionTranslators::const_iterator it,
method ExceptionTranslatorRegistrar (line 3505) | ExceptionTranslatorRegistrar(std::string (*translateFunction)(T &)) {
type Detail (line 3533) | namespace Detail {
type EnumInfo (line 1901) | struct EnumInfo {
function rawMemoryToString (line 1997) | std::string rawMemoryToString(const T &object) {
class IsStreamInsertable (line 2002) | class IsStreamInsertable {
function convertUnstreamable (line 2018) | typename std::enable_if<!std::is_enum<T>::value && !std::is_base_of<...
function convertUnstreamable (line 2024) | typename std::enable_if<!std::is_enum<T>::value && std::is_base_of<s...
function convertUnstreamable (line 2031) | typename std::enable_if<std::is_enum<T>::value, std::string>::type c...
function stringify (line 2081) | std::string stringify(const T &e) {
function convertUnknownEnumToString (line 2087) | std::string convertUnknownEnumToString(E e) {
function rangeToString (line 2265) | std::string rangeToString(InputIterator first, Sentinel last) {
function stringify (line 2294) | inline std::string stringify(NSString *nsstring) {
type TupleElementPrinter (line 2355) | struct TupleElementPrinter {
method print (line 2356) | static void print(const Tuple &tuple, std::ostream &os) {
type TupleElementPrinter<Tuple, N, false> (line 2363) | struct TupleElementPrinter<Tuple, N, false> {
method print (line 2364) | static void print(const Tuple &, std::ostream &) {}
class Approx (line 3535) | class Approx {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8258) | Approx Approx::custom() { return Approx(0); }
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
function Approx (line 8260) | Approx Approx::operator-() const {
method Approx (line 3554) | Approx operator()(T const &value) {
method Approx (line 3564) | explicit Approx(T const &value) : Approx(static_cast<double>(value...
method Approx (line 3617) | Approx &epsilon(T const &newEpsilon) {
method Approx (line 3625) | Approx &margin(T const &newMargin) {
method Approx (line 3633) | Approx &scale(T const &newScale) {
class EnumValuesRegistry (line 10864) | class EnumValuesRegistry : public IMutableEnumValuesRegistry {
function StringRef (line 10892) | StringRef extractInstanceName(StringRef enumInstance) {
function parseEnums (line 10902) | std::vector<StringRef> parseEnums(StringRef enums) {
function StringRef (line 10914) | StringRef EnumInfo::lookup(int value) const {
function makeEnumInfo (line 10922) | std::unique_ptr<EnumInfo> makeEnumInfo(StringRef enumName,
function EnumInfo (line 10938) | EnumInfo const &EnumValuesRegistry::registerEnum(StringRef enumName,
class StreamBufImpl (line 13821) | class StreamBufImpl : public std::streambuf {
method StreamBufImpl (line 13826) | StreamBufImpl() { setp(data, data + sizeof(data)); }
method overflow (line 13831) | int overflow(int c) override {
method sync (line 13843) | int sync() override {
type OutputDebugWriter (line 13854) | struct OutputDebugWriter {
class FileStream (line 13860) | class FileStream : public IStream {
method FileStream (line 13864) | FileStream(StringRef filename) {
class CoutStream (line 13876) | class CoutStream : public IStream {
method CoutStream (line 13882) | CoutStream() : m_os(Catch::cout().rdbuf()) {}
class DebugOutStream (line 13891) | class DebugOutStream : public IStream {
method DebugOutStream (line 13896) | DebugOutStream()
type Endianness (line 15117) | struct Endianness {
type Arch (line 15118) | enum Arch { Big, Little }
method Arch (line 15120) | static Arch which() {
function rawMemoryToString (line 15130) | std::string rawMemoryToString(const void *object, std::size_t size) {
type literals (line 3648) | namespace literals {
type StringMaker<Catch::Detail::Approx> (line 3654) | struct StringMaker<Catch::Detail::Approx> {
type pluralise (line 3687) | struct pluralise {
type Matchers (line 3707) | namespace Matchers {
type Impl (line 3708) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 3866) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
type Floating (line 3892) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
type Generic (line 3958) | namespace Generic {
type Detail (line 3960) | namespace Detail {
class PredicateMatcher (line 3965) | class PredicateMatcher : public MatcherBase<T> {
method PredicateMatcher (line 3970) | PredicateMatcher(std::function<bool(T const &)> const &elem, std...
method match (line 3973) | bool match(T const &item) const override { return m_predicate(it...
method describe (line 3975) | std::string describe() const override { return m_description; }
function Predicate (line 3985) | Generic::PredicateMatcher<T> Predicate(std::function<bool(T const &)...
type StdString (line 4001) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
type Vector (line 4074) | namespace Vector {
type ContainsElementMatcher (line 4076) | struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {
method ContainsElementMatcher (line 4077) | ContainsElementMatcher(T const &comparator) : m_comparator(compa...
method match (line 4079) | bool match(std::vector<T, Alloc> const &v) const override {
method describe (line 4088) | std::string describe() const override {
type ContainsMatcher (line 4096) | struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ContainsMatcher (line 4097) | ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m...
method match (line 4099) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4117) | std::string describe() const override {
type EqualsMatcher (line 4125) | struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method EqualsMatcher (line 4126) | EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4128) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4140) | std::string describe() const override {
type ApproxMatcher (line 4147) | struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ApproxMatcher (line 4148) | ApproxMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4150) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4158) | std::string describe() const override {
method ApproxMatcher (line 4162) | ApproxMatcher &epsilon(T const &newEpsilon) {
method ApproxMatcher (line 4167) | ApproxMatcher &margin(T const &newMargin) {
method ApproxMatcher (line 4172) | ApproxMatcher &scale(T const &newScale) {
type UnorderedEqualsMatcher (line 4182) | struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMa...
method UnorderedEqualsMatcher (line 4183) | UnorderedEqualsMatcher(std::vector<T, AllocComp> const &target) ...
method match (line 4184) | bool match(std::vector<T, AllocMatch> const &vec) const override {
method describe (line 4191) | std::string describe() const override {
function Contains (line 4205) | Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains(
function VectorContains (line 4211) | Vector::ContainsElementMatcher<T, Alloc> VectorContains(T const &com...
function Equals (line 4216) | Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals(
function Approx (line 4222) | Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx(
function UnorderedEquals (line 4228) | Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEq...
type Impl (line 11679) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 11701) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
function Message (line 11712) | Exception::ExceptionMessageMatcher Message(std::string const &messag...
type Floating (line 11831) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
function WithinULP (line 11928) | Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlp...
function WithinULP (line 11932) | Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpD...
function WithinAbs (line 11936) | Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
function WithinRel (line 11940) | Floating::WithinRelMatcher WithinRel(double target, double eps) {
function WithinRel (line 11944) | Floating::WithinRelMatcher WithinRel(double target) {
function WithinRel (line 11948) | Floating::WithinRelMatcher WithinRel(float target, float eps) {
function WithinRel (line 11952) | Floating::WithinRelMatcher WithinRel(float target) {
type StdString (line 11976) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
function Equals (line 12050) | StdString::EqualsMatcher Equals(std::string const &str, CaseSensitiv...
function Contains (line 12053) | StdString::ContainsMatcher Contains(std::string const &str, CaseSens...
function EndsWith (line 12056) | StdString::EndsWithMatcher EndsWith(std::string const &str, CaseSens...
function StartsWith (line 12059) | StdString::StartsWithMatcher StartsWith(std::string const &str,
function Matches (line 12064) | StdString::RegexMatcher Matches(std::string const ®ex, CaseSensit...
type Matchers (line 3865) | namespace Matchers {
type Impl (line 3708) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 3866) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
type Floating (line 3892) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
type Generic (line 3958) | namespace Generic {
type Detail (line 3960) | namespace Detail {
class PredicateMatcher (line 3965) | class PredicateMatcher : public MatcherBase<T> {
method PredicateMatcher (line 3970) | PredicateMatcher(std::function<bool(T const &)> const &elem, std...
method match (line 3973) | bool match(T const &item) const override { return m_predicate(it...
method describe (line 3975) | std::string describe() const override { return m_description; }
function Predicate (line 3985) | Generic::PredicateMatcher<T> Predicate(std::function<bool(T const &)...
type StdString (line 4001) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
type Vector (line 4074) | namespace Vector {
type ContainsElementMatcher (line 4076) | struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {
method ContainsElementMatcher (line 4077) | ContainsElementMatcher(T const &comparator) : m_comparator(compa...
method match (line 4079) | bool match(std::vector<T, Alloc> const &v) const override {
method describe (line 4088) | std::string describe() const override {
type ContainsMatcher (line 4096) | struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ContainsMatcher (line 4097) | ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m...
method match (line 4099) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4117) | std::string describe() const override {
type EqualsMatcher (line 4125) | struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method EqualsMatcher (line 4126) | EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4128) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4140) | std::string describe() const override {
type ApproxMatcher (line 4147) | struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ApproxMatcher (line 4148) | ApproxMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4150) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4158) | std::string describe() const override {
method ApproxMatcher (line 4162) | ApproxMatcher &epsilon(T const &newEpsilon) {
method ApproxMatcher (line 4167) | ApproxMatcher &margin(T const &newMargin) {
method ApproxMatcher (line 4172) | ApproxMatcher &scale(T const &newScale) {
type UnorderedEqualsMatcher (line 4182) | struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMa...
method UnorderedEqualsMatcher (line 4183) | UnorderedEqualsMatcher(std::vector<T, AllocComp> const &target) ...
method match (line 4184) | bool match(std::vector<T, AllocMatch> const &vec) const override {
method describe (line 4191) | std::string describe() const override {
function Contains (line 4205) | Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains(
function VectorContains (line 4211) | Vector::ContainsElementMatcher<T, Alloc> VectorContains(T const &com...
function Equals (line 4216) | Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals(
function Approx (line 4222) | Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx(
function UnorderedEquals (line 4228) | Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEq...
type Impl (line 11679) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 11701) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
function Message (line 11712) | Exception::ExceptionMessageMatcher Message(std::string const &messag...
type Floating (line 11831) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
function WithinULP (line 11928) | Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlp...
function WithinULP (line 11932) | Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpD...
function WithinAbs (line 11936) | Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
function WithinRel (line 11940) | Floating::WithinRelMatcher WithinRel(double target, double eps) {
function WithinRel (line 11944) | Floating::WithinRelMatcher WithinRel(double target) {
function WithinRel (line 11948) | Floating::WithinRelMatcher WithinRel(float target, float eps) {
function WithinRel (line 11952) | Floating::WithinRelMatcher WithinRel(float target) {
type StdString (line 11976) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
function Equals (line 12050) | StdString::EqualsMatcher Equals(std::string const &str, CaseSensitiv...
function Contains (line 12053) | StdString::ContainsMatcher Contains(std::string const &str, CaseSens...
function EndsWith (line 12056) | StdString::EndsWithMatcher EndsWith(std::string const &str, CaseSens...
function StartsWith (line 12059) | StdString::StartsWithMatcher StartsWith(std::string const &str,
function Matches (line 12064) | StdString::RegexMatcher Matches(std::string const ®ex, CaseSensit...
type Matchers (line 3890) | namespace Matchers {
type Impl (line 3708) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 3866) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
type Floating (line 3892) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
type Generic (line 3958) | namespace Generic {
type Detail (line 3960) | namespace Detail {
class PredicateMatcher (line 3965) | class PredicateMatcher : public MatcherBase<T> {
method PredicateMatcher (line 3970) | PredicateMatcher(std::function<bool(T const &)> const &elem, std...
method match (line 3973) | bool match(T const &item) const override { return m_predicate(it...
method describe (line 3975) | std::string describe() const override { return m_description; }
function Predicate (line 3985) | Generic::PredicateMatcher<T> Predicate(std::function<bool(T const &)...
type StdString (line 4001) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
type Vector (line 4074) | namespace Vector {
type ContainsElementMatcher (line 4076) | struct ContainsElementMatcher : MatcherBase<std::vector<T, Alloc>> {
method ContainsElementMatcher (line 4077) | ContainsElementMatcher(T const &comparator) : m_comparator(compa...
method match (line 4079) | bool match(std::vector<T, Alloc> const &v) const override {
method describe (line 4088) | std::string describe() const override {
type ContainsMatcher (line 4096) | struct ContainsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ContainsMatcher (line 4097) | ContainsMatcher(std::vector<T, AllocComp> const &comparator) : m...
method match (line 4099) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4117) | std::string describe() const override {
type EqualsMatcher (line 4125) | struct EqualsMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method EqualsMatcher (line 4126) | EqualsMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4128) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4140) | std::string describe() const override {
type ApproxMatcher (line 4147) | struct ApproxMatcher : MatcherBase<std::vector<T, AllocMatch>> {
method ApproxMatcher (line 4148) | ApproxMatcher(std::vector<T, AllocComp> const &comparator) : m_c...
method match (line 4150) | bool match(std::vector<T, AllocMatch> const &v) const override {
method describe (line 4158) | std::string describe() const override {
method ApproxMatcher (line 4162) | ApproxMatcher &epsilon(T const &newEpsilon) {
method ApproxMatcher (line 4167) | ApproxMatcher &margin(T const &newMargin) {
method ApproxMatcher (line 4172) | ApproxMatcher &scale(T const &newScale) {
type UnorderedEqualsMatcher (line 4182) | struct UnorderedEqualsMatcher : MatcherBase<std::vector<T, AllocMa...
method UnorderedEqualsMatcher (line 4183) | UnorderedEqualsMatcher(std::vector<T, AllocComp> const &target) ...
method match (line 4184) | bool match(std::vector<T, AllocMatch> const &vec) const override {
method describe (line 4191) | std::string describe() const override {
function Contains (line 4205) | Vector::ContainsMatcher<T, AllocComp, AllocMatch> Contains(
function VectorContains (line 4211) | Vector::ContainsElementMatcher<T, Alloc> VectorContains(T const &com...
function Equals (line 4216) | Vector::EqualsMatcher<T, AllocComp, AllocMatch> Equals(
function Approx (line 4222) | Vector::ApproxMatcher<T, AllocComp, AllocMatch> Approx(
function UnorderedEquals (line 4228) | Vector::UnorderedEqualsMatcher<T, AllocComp, AllocMatch> UnorderedEq...
type Impl (line 11679) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3715) | struct MatchNotOf
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
class MatcherUntypedBase (line 3717) | class MatcherUntypedBase {
method MatcherUntypedBase (line 3719) | MatcherUntypedBase() = default;
method MatcherUntypedBase (line 3720) | MatcherUntypedBase(MatcherUntypedBase const &) = default;
method MatcherUntypedBase (line 3721) | MatcherUntypedBase &operator=(MatcherUntypedBase const &) = delete;
type MatcherMethod (line 3736) | struct MatcherMethod {
type MatcherMethod<NSString *> (line 3745) | struct MatcherMethod<NSString *> {
type MatcherBase (line 3755) | struct MatcherBase : MatcherUntypedBase, MatcherMethod<T> {
type MatchAllOf (line 3762) | struct MatchAllOf : MatcherBase<ArgT> {
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3795) | struct MatchAnyOf : MatcherBase<ArgT> {
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | std::string describe() const override {
type MatchNotOf (line 3829) | struct MatchNotOf : MatcherBase<ArgT> {
method MatchNotOf (line 3830) | MatchNotOf(MatcherBase<ArgT> const &underlyingMatcher)
method match (line 3833) | bool match(ArgT const &arg) const override { return !m_underlyin...
method describe (line 3835) | std::string describe() const override { return "not " + m_underl...
type Exception (line 11701) | namespace Exception {
class ExceptionMessageMatcher (line 3868) | class ExceptionMessageMatcher : public MatcherBase<std::exception> {
method ExceptionMessageMatcher (line 3872) | ExceptionMessageMatcher(std::string const &message) : m_message(...
function Message (line 11712) | Exception::ExceptionMessageMatcher Message(std::string const &messag...
type Floating (line 11831) | namespace Floating {
type FloatingPointKind (line 3894) | enum class FloatingPointKind : uint8_t
type WithinAbsMatcher (line 3896) | struct WithinAbsMatcher : MatcherBase<double> {
type WithinUlpsMatcher (line 3906) | struct WithinUlpsMatcher : MatcherBase<double> {
type WithinRelMatcher (line 3923) | struct WithinRelMatcher : MatcherBase<double> {
type FloatingPointKind (line 11833) | enum class FloatingPointKind : uint8_t { Float, Double }
function WithinULP (line 11928) | Floating::WithinUlpsMatcher WithinULP(double target, uint64_t maxUlp...
function WithinULP (line 11932) | Floating::WithinUlpsMatcher WithinULP(float target, uint64_t maxUlpD...
function WithinAbs (line 11936) | Floating::WithinAbsMatcher WithinAbs(double target, double margin) {
function WithinRel (line 11940) | Floating::WithinRelMatcher WithinRel(double target, double eps) {
function WithinRel (line 11944) | Floating::WithinRelMatcher WithinRel(double target) {
function WithinRel (line 11948) | Floating::WithinRelMatcher WithinRel(float target, float eps) {
function WithinRel (line 11952) | Floating::WithinRelMatcher WithinRel(float target) {
type StdString (line 11976) | namespace StdString {
type CasedString (line 4003) | struct CasedString {
type StringMatcherBase (line 4012) | struct StringMatcherBase : MatcherBase<std::string> {
type EqualsMatcher (line 4020) | struct EqualsMatcher : StringMatcherBase {
type ContainsMatcher (line 4024) | struct ContainsMatcher : StringMatcherBase {
type StartsWithMatcher (line 4028) | struct StartsWithMatcher : StringMatcherBase {
type EndsWithMatcher (line 4032) | struct EndsWithMatcher : StringMatcherBase {
type RegexMatcher (line 4037) | struct RegexMatcher : MatcherBase<std::string> {
function Equals (line 12050) | StdString::EqualsMatcher Equals(std::string const &str, CaseSensitiv...
function Contains (line 12053) | StdString::ContainsMatcher Contains(std::string const &str, CaseSens...
function EndsWith (line 12056) | StdString::EndsWithMatcher EndsWith(std::string const &str, CaseSens...
function StartsWith (line 12059) | StdString::StartsWithMatcher StartsWith(std::string const &str,
function Matches (line 12064) | StdString::RegexMatcher Matches(std::string const ®ex, CaseSensit...
type Matchers (line 3957) | namespace Matchers {
type Impl (line 3708) | namespace Impl {
type MatchAllOf (line 3711) | struct MatchAllOf
method match (line 3763) | bool match(ArgT const &arg) const override {
method describe (line 3770) | std::string describe() const override {
type MatchAnyOf (line 3713) | struct MatchAnyOf
method match (line 3796) | bool match(ArgT const &arg) const override {
method describe (line 3803) | st
Condensed preview — 297 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,477K chars).
[
{
"path": ".clang-format",
"chars": 2826,
"preview": "---\n# See https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html\nBasedOnStyle: Chromium\nAccessMo"
},
{
"path": ".codespellrc",
"chars": 834,
"preview": "# Waiting for pyproject.toml support: https://github.com/codespell-project/codespell/issues/2055\n\n[codespell]\n# \"write-c"
},
{
"path": ".flake8",
"chars": 196,
"preview": "# Waiting for pyproject.toml support: https://gitlab.com/pycqa/flake8/-/issues/428\n\n[flake8]\nextend-ignore = E203, W503\n"
},
{
"path": ".gitattributes",
"chars": 1975,
"preview": "# Based on https://github.com/alexkaratarakis/gitattributes\n# Auto detect text files and force linux-style line endings\n"
},
{
"path": ".github/ISSUE_TEMPLATE/bug_report.md",
"chars": 443,
"preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n## Issue Descrip"
},
{
"path": ".gitignore",
"chars": 302,
"preview": "build*/\n.conan/\ncmake-build*/\nCMakeUserPresets.json\n_build/\n.conan/\n.cache/\ndist/\n.DS_Store\n.pod5\nvenv/\n*.venv/\nuv.lock\n"
},
{
"path": ".gitlab-ci.yml",
"chars": 35332,
"preview": "stages:\n - .pre\n - build\n - test\n - build-conan\n - archive\n - deploy\n\ninclude:\n - local: '/ci/gitlab-ci-common."
},
{
"path": ".gitmodules",
"chars": 127,
"preview": "[submodule \"third_party/pybind11\"]\n\tpath = third_party/pybind11\n\turl = https://github.com/pybind/pybind11.git\n\tbranch = "
},
{
"path": ".pre-commit-config.yaml",
"chars": 1623,
"preview": "# See https://pre-commit.com for more information\n# See https://pre-commit.com/hooks.html for more hooks\nrepos:\n - repo"
},
{
"path": ".readthedocs.yaml",
"chars": 709,
"preview": "# Read the Docs configuration file\n# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details\n\n# Requir"
},
{
"path": "CHANGELOG.md",
"chars": 21363,
"preview": "<!-- markdownlint-disable MD024 -->\n\n# Changelog\n\nAll notable changes, updates, and fixes to pod5 will be documented her"
},
{
"path": "CMakeLists.txt",
"chars": 5267,
"preview": "cmake_minimum_required(VERSION 3.18.0)\n\nproject(POD5)\n\ninclude(${PROJECT_SOURCE_DIR}/cmake/POD5Version.cmake)\n\nset(CMAKE"
},
{
"path": "CMakePresets.json",
"chars": 14197,
"preview": "{\n \"version\": 4,\n \"include\": [\n \"cmake/presets/conan-provider.json\",\n \"cmake/presets/conan-build-opt"
},
{
"path": "DEV.md",
"chars": 1762,
"preview": "Development\n===========\n\nIf you want to contribute to pod5_file_format, or our pre-built binaries do not meet your platf"
},
{
"path": "LICENSE.md",
"chars": 15712,
"preview": "This Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distri"
},
{
"path": "README.md",
"chars": 1556,
"preview": "[](https://pod5-file-for"
},
{
"path": "benchmarks/.gitignore",
"chars": 23,
"preview": "*/outputs/\nimage/*.whl\n"
},
{
"path": "benchmarks/README.md",
"chars": 2529,
"preview": "POD5 Benchmarks\n==============\n\nBuilding the benchmark environment\n----------------------------------\n\nTo run benchmarks"
},
{
"path": "benchmarks/build.sh",
"chars": 243,
"preview": "#!/bin/bash\n\nset -o errexit\nset -o pipefail\nset -o nounset\n# set -o xtrace\n\nscript_dir=$( cd -- \"$( dirname -- \"${BASH_S"
},
{
"path": "benchmarks/convert/run_blow5.sh",
"chars": 101,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\n./tools/fast5_to_single_blow5.sh \"$input_dir\" \"$output_dir\"\n"
},
{
"path": "benchmarks/convert/run_pod5.sh",
"chars": 96,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\npod5 convert fast5 \"$input_dir\" --output \"$output_dir\"\n"
},
{
"path": "benchmarks/find_all_read_ids/run_blow5.sh",
"chars": 126,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\ntools/pyslow5_tests.py \"${input_dir}\"/blow5/*.blow5 \"${output_dir}\" get_all_rea"
},
{
"path": "benchmarks/find_all_read_ids/run_fast5.sh",
"chars": 106,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\ntools/find_and_get_fast5.py \"${input_dir}/fast5\" \"${output_dir}\"\n"
},
{
"path": "benchmarks/find_all_read_ids/run_pod5.sh",
"chars": 106,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\n./tools/find_and_get_pod5.py \"${input_dir}/pod5\" \"${output_dir}\"\n"
},
{
"path": "benchmarks/find_all_samples/run_blow5.sh",
"chars": 141,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\ntools/pyslow5_tests.py \"${input_dir}\"/blow5/*.blow5 \"${output_dir}\" all_values "
},
{
"path": "benchmarks/find_all_samples/run_fast5.sh",
"chars": 127,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\ntools/find_and_get_fast5.py \"${input_dir}/fast5\" \"${output_dir}\" --get-column s"
},
{
"path": "benchmarks/find_all_samples/run_pod5.sh",
"chars": 127,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\n./tools/find_and_get_pod5.py \"${input_dir}/pod5\" \"${output_dir}\" --get-column s"
},
{
"path": "benchmarks/find_selected_read_ids_read_number/run_blow5.sh",
"chars": 223,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/pyslow5_tests.py \"${input_dir}\"/blow5/*.blow5 \"${outpu"
},
{
"path": "benchmarks/find_selected_read_ids_read_number/run_fast5.sh",
"chars": 206,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/find_and_get_fast5.py \"${input_dir}/fast5\" \"${output_d"
},
{
"path": "benchmarks/find_selected_read_ids_read_number/run_pod5.sh",
"chars": 216,
"preview": "#!/bin/bash\n\ninput_dir=$1\ntype_output_dir=$2\nfull_output_dir=$3\n\n./tools/find_and_get_pod5.py \"${input_dir}/pod5\" \"${typ"
},
{
"path": "benchmarks/find_selected_read_ids_sample_count/run_blow5.sh",
"chars": 224,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/pyslow5_tests.py \"${input_dir}\"/blow5/*.blow5 \"${outpu"
},
{
"path": "benchmarks/find_selected_read_ids_sample_count/run_fast5.sh",
"chars": 207,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/find_and_get_fast5.py \"${input_dir}/fast5\" \"${output_d"
},
{
"path": "benchmarks/find_selected_read_ids_sample_count/run_pod5.sh",
"chars": 217,
"preview": "#!/bin/bash\n\ninput_dir=$1\ntype_output_dir=$2\nfull_output_dir=$3\n\n./tools/find_and_get_pod5.py \"${input_dir}/pod5\" \"${typ"
},
{
"path": "benchmarks/find_selected_read_ids_samples/run_blow5.sh",
"chars": 219,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/pyslow5_tests.py \"${input_dir}\"/blow5/*.blow5 \"${outpu"
},
{
"path": "benchmarks/find_selected_read_ids_samples/run_fast5.sh",
"chars": 202,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\nfull_output_dir=$3\n\ntools/find_and_get_fast5.py \"${input_dir}/fast5\" \"${output_d"
},
{
"path": "benchmarks/find_selected_read_ids_samples/run_pod5.sh",
"chars": 212,
"preview": "#!/bin/bash\n\ninput_dir=$1\ntype_output_dir=$2\nfull_output_dir=$3\n\n./tools/find_and_get_pod5.py \"${input_dir}/pod5\" \"${typ"
},
{
"path": "benchmarks/image/Dockerfile.base",
"chars": 580,
"preview": "FROM ubuntu:20.04\n\nRUN apt update && apt install -y wget python3 python3-pip git libzstd-dev\n\nRUN wget https://github.co"
},
{
"path": "benchmarks/image/install_slow5.sh",
"chars": 996,
"preview": "#!/bin/bash\n\nset -e\n\n: \"${SLOW_5_TOOLS_VERSION:=v1.3.0}\"\n: \"${SLOW_5_LIB_VERSION:=v1.3.1}\"\n\napt update\napt install -y li"
},
{
"path": "benchmarks/image/requirements-benchmarks.txt",
"chars": 27,
"preview": "h5py\nnumpy\npandas\ntabulate\n"
},
{
"path": "benchmarks/run_benchmarks.py",
"chars": 8334,
"preview": "#!/usr/bin/env python3\n\"\"\"\nExample usage:\n```\n> taskset -c 0-10 ./benchmarks/run_benchmarks.py ./input_files/ \\\n ./be"
},
{
"path": "benchmarks/run_benchmarks_in_docker.sh",
"chars": 422,
"preview": "#!/bin/bash\n\nset -e\n\ninput_dir=$(readlink -f \"$1\")\noutput_dir=\"$(pwd)/pod5-benchmark-outputs\"\nmkdir -p \"${output_dir}\"\n\n"
},
{
"path": "benchmarks/tools/check_csvs_consistent.py",
"chars": 724,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nimport sys\n\nimport pandas as pd\nfrom pandas.testing import assert_frame_equal\n\n\n"
},
{
"path": "benchmarks/tools/fast5_to_single_blow5.sh",
"chars": 1465,
"preview": "#!/bin/bash\n\ninput_path=$1\noutput_path=$2\n\nmkdir -p \"$output_path\"\n\ntemp_dir=\"${output_path}/tmp\"\nmkdir -p \"$temp_dir\"\n\n"
},
{
"path": "benchmarks/tools/find_and_get_fast5.py",
"chars": 2550,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nfrom pathlib import Path\n\nimport h5py\nimport numpy\nimport pandas as pd\n\n\ndef sel"
},
{
"path": "benchmarks/tools/find_and_get_pod5.py",
"chars": 8611,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nimport multiprocessing as mp\nimport tempfile\nfrom collections import namedtuple\n"
},
{
"path": "benchmarks/tools/pyslow5_tests.py",
"chars": 4672,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nimport multiprocessing as mp\nfrom pathlib import Path\nfrom queue import Empty\n\ni"
},
{
"path": "benchmarks/tools/run_benchmarks_docker_entry.sh",
"chars": 171,
"preview": "#!/bin/bash\n\n# Use taskset to limit benchmarks to specific cores, ensuring a fair test of limited resources:\ntaskset -c "
},
{
"path": "benchmarks/tools/select-random-ids.py",
"chars": 566,
"preview": "#!/usr/bin/env python3\n\nimport argparse\nfrom pathlib import Path\n\nimport pandas as pd\n\n\ndef main():\n parser = argpars"
},
{
"path": "c++/CMakeLists.txt",
"chars": 7025,
"preview": "\n\nif (ENABLE_CONAN)\n find_package(Arrow REQUIRED CONFIG)\n find_package(Flatbuffers REQUIRED CONFIG)\n find_packa"
},
{
"path": "c++/examples/CMakeLists.txt",
"chars": 1007,
"preview": "add_executable(find_all_read_ids\n find_all_read_ids.cpp\n)\n\ntarget_link_libraries(find_all_read_ids\n pod5_format\n)\n"
},
{
"path": "c++/examples/README.md",
"chars": 365,
"preview": "C++ Examples\n============\n\nThese examples use the POD5 C API to read file data, they are written using C++.\n\nfind_all_re"
},
{
"path": "c++/examples/find_all_read_data.cpp",
"chars": 3317,
"preview": "#include \"pod5_format/c_api.h\"\n#include \"pod5_format/uuid.h\"\n\n#include <array>\n#include <fstream>\n#include <iostream>\n#i"
},
{
"path": "c++/examples/find_all_read_ids.cpp",
"chars": 3075,
"preview": "#include \"pod5_format/c_api.h\"\n#include \"pod5_format/uuid.h\"\n\n#include <array>\n#include <fstream>\n#include <iostream>\n#i"
},
{
"path": "c++/examples/find_specific_read_ids.cpp",
"chars": 4526,
"preview": "#include \"pod5_format/c_api.h\"\n#include \"pod5_format/uuid.h\"\n\n#include <fstream>\n#include <iostream>\n#include <vector>\n\n"
},
{
"path": "c++/examples/find_specific_read_ids_with_signal.cpp",
"chars": 5223,
"preview": "#include \"pod5_format/c_api.h\"\n#include \"pod5_format/uuid.h\"\n\n#include <fstream>\n#include <iostream>\n#include <vector>\n\n"
},
{
"path": "c++/pod5_format/async_signal_loader.cpp",
"chars": 8821,
"preview": "#include \"pod5_format/async_signal_loader.h\"\n\nnamespace pod5 {\n\nstd::size_t const AsyncSignalLoader::MINIMUM_JOB_SIZE = "
},
{
"path": "c++/pod5_format/async_signal_loader.h",
"chars": 6490,
"preview": "#pragma once\n\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/rea"
},
{
"path": "c++/pod5_format/c_api.cpp",
"chars": 49564,
"preview": "#include \"pod5_format/c_api.h\"\n\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/file_writer.h\"\n#include \"pod5"
},
{
"path": "c++/pod5_format/c_api.h",
"chars": 40532,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n\n#include <stddef.h>\n#include <stdint.h>\n\n#ifdef __cplusplus\ne"
},
{
"path": "c++/pod5_format/dictionary_writer.h",
"chars": 584,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n\nnamespace arrow {\nclass Array"
},
{
"path": "c++/pod5_format/expandable_buffer.h",
"chars": 3952,
"preview": "#pragma once\n\n#include <arrow/buffer.h>\n#include <arrow/result.h>\n#include <gsl/gsl-lite.hpp>\n\n#include <cassert>\n\nnames"
},
{
"path": "c++/pod5_format/file_output_stream.h",
"chars": 312,
"preview": "#pragma once\n\n#include <arrow/io/file.h>\n#include <arrow/status.h>\n\nnamespace pod5 {\n\nclass FileOutputStream : public ar"
},
{
"path": "c++/pod5_format/file_reader.cpp",
"chars": 10853,
"preview": "#include \"pod5_format/file_reader.h\"\n\n#include \"pod5_format/internal/combined_file_utils.h\"\n#include \"pod5_format/memory"
},
{
"path": "c++/pod5_format/file_reader.h",
"chars": 4590,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/read_table_utils.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/file_recovery.h",
"chars": 2398,
"preview": "#pragma once\n\n#include \"pod5_format/internal/combined_file_utils.h\"\n#include \"pod5_format/schema_metadata.h\"\n\n#include <"
},
{
"path": "c++/pod5_format/file_updater.cpp",
"chars": 2088,
"preview": "#include \"pod5_format/file_updater.h\"\n\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/internal/combined_file"
},
{
"path": "c++/pod5_format/file_updater.h",
"chars": 585,
"preview": "#pragma once\n\n#include \"pod5_format/result.h\"\n\n#include <memory>\n\nnamespace arrow {\nclass MemoryPool;\n}\n\nnamespace pod5 "
},
{
"path": "c++/pod5_format/file_writer.cpp",
"chars": 30303,
"preview": "#include \"pod5_format/file_writer.h\"\n\n#include \"pod5_format/file_recovery.h\"\n#include \"pod5_format/internal/async_output"
},
{
"path": "c++/pod5_format/file_writer.h",
"chars": 7503,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/read_table_utils.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/flatbuffers/footer.fbs",
"chars": 1409,
"preview": "namespace Minknow.ReadsFormat;\n\nenum ContentType:short {\n // The Reads table (an Arrow table)\n ReadsTable,\n // "
},
{
"path": "c++/pod5_format/internal/async_output_stream.h",
"chars": 7915,
"preview": "#pragma once\n\n#include \"pod5_format/file_output_stream.h\"\n#include \"pod5_format/internal/tracing/tracing.h\"\n#include \"po"
},
{
"path": "c++/pod5_format/internal/combined_file_utils.h",
"chars": 16507,
"preview": "#pragma once\n\n#include \"pod5_flatbuffers/footer_generated.h\"\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/"
},
{
"path": "c++/pod5_format/internal/linux_output_stream.h",
"chars": 14404,
"preview": "#pragma once\n\n#include \"pod5_format/file_output_stream.h\"\n#include \"pod5_format/internal/tracing/tracing.h\"\n#include \"po"
},
{
"path": "c++/pod5_format/internal/tracing/tracing.h",
"chars": 44,
"preview": "#pragma once\n\n#define POD5_TRACE_FUNCTION()\n"
},
{
"path": "c++/pod5_format/io_manager.cpp",
"chars": 2607,
"preview": "#include \"pod5_format/io_manager.h\"\n\n#ifdef __linux__\n#include <unistd.h>\n#endif\n\nnamespace pod5 {\n\n#ifdef __linux__\ncla"
},
{
"path": "c++/pod5_format/io_manager.h",
"chars": 2539,
"preview": "#pragma once\n\n#include <arrow/buffer.h>\n#include <arrow/result.h>\n#include <arrow/status.h>\n\n#ifdef __linux__\n#include <"
},
{
"path": "c++/pod5_format/memory_pool.cpp",
"chars": 1016,
"preview": "#include \"memory_pool.h\"\n\n#ifdef _WIN32\n#include <windows.h>\n#elif !defined(__FreeBSD__)\n#include <unistd.h>\n#endif\n\nnam"
},
{
"path": "c++/pod5_format/memory_pool.h",
"chars": 379,
"preview": "#pragma once\n#include <arrow/memory_pool.h>\n\nnamespace pod5 {\n\n/// \\brief Find a memory pool that should be used by defa"
},
{
"path": "c++/pod5_format/migration/migration.cpp",
"chars": 1759,
"preview": "#include \"pod5_format/migration/migration.h\"\n\n#include <random>\n\nnamespace pod5 {\n\nstatic bool registered_delete_at_exit"
},
{
"path": "c++/pod5_format/migration/migration.h",
"chars": 3376,
"preview": "#pragma once\n\n#include \"pod5_format/internal/combined_file_utils.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/migration/migration_utils.h",
"chars": 8936,
"preview": "#pragma once\n\n#include \"pod5_format/internal/combined_file_utils.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/migration/v0_to_v1.cpp",
"chars": 4722,
"preview": "#include \"pod5_format/migration/migration.h\"\n#include \"pod5_format/migration/migration_utils.h\"\n#include \"pod5_format/ta"
},
{
"path": "c++/pod5_format/migration/v1_to_v2.cpp",
"chars": 5602,
"preview": "#include \"pod5_format/migration/migration.h\"\n#include \"pod5_format/migration/migration_utils.h\"\n#include \"pod5_format/ta"
},
{
"path": "c++/pod5_format/migration/v2_to_v3.cpp",
"chars": 13984,
"preview": "#include \"pod5_format/migration/migration.h\"\n#include \"pod5_format/migration/migration_utils.h\"\n#include \"pod5_format/ty"
},
{
"path": "c++/pod5_format/migration/v3_to_v4.cpp",
"chars": 2806,
"preview": "#include \"pod5_format/migration/migration.h\"\n#include \"pod5_format/migration/migration_utils.h\"\n#include \"pod5_format/ta"
},
{
"path": "c++/pod5_format/read_table_reader.cpp",
"chars": 13211,
"preview": "#include \"pod5_format/read_table_reader.h\"\n\n#include \"pod5_format/read_table_utils.h\"\n#include \"pod5_format/schema_metad"
},
{
"path": "c++/pod5_format/read_table_reader.h",
"chars": 4657,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/read_table_schema.h\"\n#include \"pod5_form"
},
{
"path": "c++/pod5_format/read_table_schema.cpp",
"chars": 3022,
"preview": "#include \"pod5_format/read_table_schema.h\"\n\n#include \"pod5_format/schema_metadata.h\"\n#include \"pod5_format/types.h\"\n\nnam"
},
{
"path": "c++/pod5_format/read_table_schema.h",
"chars": 4129,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/schema_u"
},
{
"path": "c++/pod5_format/read_table_utils.cpp",
"chars": 598,
"preview": "#include \"pod5_format/read_table_utils.h\"\n\n#include <algorithm>\n\nnamespace pod5 {\n\nReadIdSearchInput::ReadIdSearchInput("
},
{
"path": "c++/pod5_format/read_table_utils.h",
"chars": 11256,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/uuid.h\"\n\n#include <gsl/gsl-lite.hpp>\n\n#i"
},
{
"path": "c++/pod5_format/read_table_writer.cpp",
"chars": 5595,
"preview": "#include \"pod5_format/read_table_writer.h\"\n\n#include \"pod5_format/file_output_stream.h\"\n#include \"pod5_format/internal/t"
},
{
"path": "c++/pod5_format/read_table_writer.h",
"chars": 3656,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/read_table_schema.h\"\n#include \"pod5_form"
},
{
"path": "c++/pod5_format/read_table_writer_utils.cpp",
"chars": 3520,
"preview": "#include \"pod5_format/read_table_writer_utils.h\"\n\n#include \"pod5_format/read_table_schema.h\"\n\n#include <arrow/array/arra"
},
{
"path": "c++/pod5_format/read_table_writer_utils.h",
"chars": 4008,
"preview": "#pragma once\n\n#include \"pod5_format/dictionary_writer.h\"\n#include \"pod5_format/expandable_buffer.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/result.h",
"chars": 218,
"preview": "#pragma once\n\n#include <arrow/result.h>\n\nnamespace pod5 {\n\n/// pod5::Result is just an Arrow Result right now.\ntemplate "
},
{
"path": "c++/pod5_format/run_info_table_reader.cpp",
"chars": 10249,
"preview": "#include \"pod5_format/run_info_table_reader.h\"\n\n#include \"pod5_format/schema_metadata.h\"\n#include \"pod5_format/schema_ut"
},
{
"path": "c++/pod5_format/run_info_table_reader.h",
"chars": 3917,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/read_table_utils.h\"\n#include \"pod5_forma"
},
{
"path": "c++/pod5_format/run_info_table_schema.cpp",
"chars": 2868,
"preview": "#include \"pod5_format/run_info_table_schema.h\"\n\n#include \"pod5_format/schema_metadata.h\"\n#include \"pod5_format/types.h\"\n"
},
{
"path": "c++/pod5_format/run_info_table_schema.h",
"chars": 3046,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/schema_u"
},
{
"path": "c++/pod5_format/run_info_table_writer.cpp",
"chars": 4621,
"preview": "#include \"pod5_format/run_info_table_writer.h\"\n\n#include \"pod5_format/file_output_stream.h\"\n#include \"pod5_format/intern"
},
{
"path": "c++/pod5_format/run_info_table_writer.h",
"chars": 3026,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/run_info"
},
{
"path": "c++/pod5_format/schema_field_builder.h",
"chars": 8227,
"preview": "#pragma once\n\n#include \"pod5_format/dictionary_writer.h\"\n#include \"pod5_format/read_table_schema.h\"\n\n#include <arrow/arr"
},
{
"path": "c++/pod5_format/schema_metadata.cpp",
"chars": 3554,
"preview": "#include \"pod5_format/schema_metadata.h\"\n\n#include \"pod5_format/uuid.h\"\n#include \"pod5_format/version.h\"\n\n#include <arro"
},
{
"path": "c++/pod5_format/schema_metadata.h",
"chars": 1914,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/uuid.h\"\n"
},
{
"path": "c++/pod5_format/schema_utils.cpp",
"chars": 2422,
"preview": "#include \"pod5_format/schema_utils.h\"\n\nnamespace pod5 {\n\n/// \\brief Make a new schema for a read table to be written (wi"
},
{
"path": "c++/pod5_format/schema_utils.h",
"chars": 7983,
"preview": "#pragma once\n\n#include \"pod5_format/schema_metadata.h\"\n\n#include <arrow/record_batch.h>\n#include <arrow/type.h>\n\nnamespa"
},
{
"path": "c++/pod5_format/signal_builder.h",
"chars": 5023,
"preview": "#pragma once\n\n#include \"pod5_format/expandable_buffer.h\"\n#include \"pod5_format/signal_compression.h\"\n#include \"pod5_form"
},
{
"path": "c++/pod5_format/signal_compression.cpp",
"chars": 9021,
"preview": "#include \"pod5_format/signal_compression.h\"\n\n#include \"pod5_format/svb16/decode.hpp\"\n#include \"pod5_format/svb16/encode."
},
{
"path": "c++/pod5_format/signal_compression.h",
"chars": 1077,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n\n#include <gsl/gsl-lite.hpp>\n\n"
},
{
"path": "c++/pod5_format/signal_table_reader.cpp",
"chars": 12925,
"preview": "#include \"pod5_format/signal_table_reader.h\"\n\n#include \"pod5_format/schema_metadata.h\"\n#include \"pod5_format/signal_comp"
},
{
"path": "c++/pod5_format/signal_table_reader.h",
"chars": 4335,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/schema_m"
},
{
"path": "c++/pod5_format/signal_table_schema.cpp",
"chars": 2442,
"preview": "#include \"pod5_format/signal_table_schema.h\"\n\n#include \"pod5_format/schema_utils.h\"\n#include \"pod5_format/types.h\"\n\n#inc"
},
{
"path": "c++/pod5_format/signal_table_schema.h",
"chars": 1068,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/signal_t"
},
{
"path": "c++/pod5_format/signal_table_utils.h",
"chars": 164,
"preview": "#pragma once\n\nnamespace pod5 {\n\nusing SignalTableRowIndex = std::uint64_t;\n\nenum class SignalType {\n UncompressedSign"
},
{
"path": "c++/pod5_format/signal_table_writer.cpp",
"chars": 7074,
"preview": "#include \"pod5_format/signal_table_writer.h\"\n\n#include \"pod5_format/file_output_stream.h\"\n#include \"pod5_format/internal"
},
{
"path": "c++/pod5_format/signal_table_writer.h",
"chars": 4509,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/signal_b"
},
{
"path": "c++/pod5_format/svb16/common.hpp",
"chars": 976,
"preview": "#pragma once\n\n#if __cplusplus >= 201703L\n#define SVB16_IF_CONSTEXPR if constexpr\n#else\n#define SVB16_IF_CONSTEXPR if\n#en"
},
{
"path": "c++/pod5_format/svb16/decode.hpp",
"chars": 2510,
"preview": "#pragma once\n\n#include \"common.hpp\"\n#include \"decode_scalar.hpp\"\n#include \"svb16.h\" // svb16_key_length\n\n#include <type"
},
{
"path": "c++/pod5_format/svb16/decode_scalar.hpp",
"chars": 1912,
"preview": "#pragma once\n\n#include \"common.hpp\"\n\n#include <gsl/gsl-lite.hpp>\n\n#include <cassert>\n#include <cstddef>\n#include <cstdin"
},
{
"path": "c++/pod5_format/svb16/decode_x64.hpp",
"chars": 10441,
"preview": "#pragma once\n\n#include \"common.hpp\"\n#include \"decode_scalar.hpp\"\n#include \"intrinsics.hpp\"\n#include \"shuffle_tables.hpp\""
},
{
"path": "c++/pod5_format/svb16/encode.hpp",
"chars": 702,
"preview": "#pragma once\n\n#include \"common.hpp\"\n#include \"encode_scalar.hpp\"\n#include \"svb16.h\" // svb16_key_length\n#ifdef SVB16_X6"
},
{
"path": "c++/pod5_format/svb16/encode_scalar.hpp",
"chars": 1776,
"preview": "#pragma once\n\n#include \"common.hpp\"\n\n#include <cstddef>\n#include <cstdint>\n#include <cstring>\n\nnamespace svb16 {\nnamespa"
},
{
"path": "c++/pod5_format/svb16/encode_x64.hpp",
"chars": 3907,
"preview": "#pragma once\n\n#include \"common.hpp\"\n#include \"encode_scalar.hpp\"\n#include \"intrinsics.hpp\"\n#include \"shuffle_tables.hpp\""
},
{
"path": "c++/pod5_format/svb16/generate_shuffle_tables.py",
"chars": 1435,
"preview": "def encode_table_row(control):\n table = []\n for i in range(7):\n offset = i * 2\n # first byte\n "
},
{
"path": "c++/pod5_format/svb16/intrinsics.hpp",
"chars": 1647,
"preview": "#pragma once\n\n#include \"common.hpp\" // architecture macros\n\n#if defined(_MSC_VER)\n#include <intrin.h>\n#elif defined(__G"
},
{
"path": "c++/pod5_format/svb16/shuffle_tables.hpp",
"chars": 58335,
"preview": "#pragma once\n#include \"common.hpp\" // arch macros\n\n#include <cstdint>\n\n#ifdef SVB16_X64\nstatic constexpr uint8_t g_enco"
},
{
"path": "c++/pod5_format/svb16/simd_detect_x64.hpp",
"chars": 1470,
"preview": "#pragma once\n\n#include \"common.hpp\" // architecture macros\n\n#if defined(SVB16_X64)\n\n#ifdef _MSC_VER\n#include <intrin.h>"
},
{
"path": "c++/pod5_format/svb16/streamvbytedelta_decode_16.c",
"chars": 2064,
"preview": "#include \"streamvbyte_isadetection.h\"\n#include \"streamvbytedelta.h\"\n\n#include <string.h> // for memcpy\n\nstatic inline u"
},
{
"path": "c++/pod5_format/svb16/streamvbytedelta_encode_16.c",
"chars": 2223,
"preview": "#include \"streamvbyte_isadetection.h\"\n#include \"streamvbytedelta.h\"\n\n#include <stdio.h>\n#include <string.h> // for memc"
},
{
"path": "c++/pod5_format/svb16/streamvbytedelta_x64_decode_16.c",
"chars": 7088,
"preview": "#include \"streamvbyte_isadetection.h\"\n#include \"streamvbyte_shuffle_tables_decode_16.h\"\n\n#include <string.h> // for mem"
},
{
"path": "c++/pod5_format/svb16/streamvbytedelta_x64_encode_16.c",
"chars": 2973,
"preview": "\n#include \"streamvbyte_isadetection.h\"\n#include \"streamvbyte_shuffle_tables_encode_16.h\"\n\n#include <stdio.h>\n#include <s"
},
{
"path": "c++/pod5_format/svb16/svb16.c",
"chars": 0,
"preview": ""
},
{
"path": "c++/pod5_format/svb16/svb16.h",
"chars": 618,
"preview": "#ifndef SVB16_H\n#define SVB16_H\n\n#include <stdint.h>\n\n#if defined(__cplusplus)\nextern \"C\" {\n#endif\n\n/// Get the number o"
},
{
"path": "c++/pod5_format/table_reader.cpp",
"chars": 2355,
"preview": "#include \"pod5_format/table_reader.h\"\n\n#include <arrow/ipc/reader.h>\n#include <arrow/record_batch.h>\n#include <arrow/uti"
},
{
"path": "c++/pod5_format/table_reader.h",
"chars": 2004,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/schema_metadata.h\"\n\n#include <memory>\n\nn"
},
{
"path": "c++/pod5_format/thread_pool.cpp",
"chars": 5970,
"preview": "#include \"pod5_format/thread_pool.h\"\n\n#include <atomic>\n#include <cassert>\n#include <condition_variable>\n#include <deque"
},
{
"path": "c++/pod5_format/thread_pool.h",
"chars": 934,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n\n#include <functional>\n#include <memory>\n\nnamespace pod5 {\n\ncl"
},
{
"path": "c++/pod5_format/tuple_utils.h",
"chars": 1018,
"preview": "#pragma once\n\n#include <tuple>\n#include <utility>\n\nnamespace pod5 { namespace detail {\n\ntemplate <typename T, typename F"
},
{
"path": "c++/pod5_format/types.cpp",
"chars": 5307,
"preview": "#include \"pod5_format/types.h\"\n\n#include <arrow/array/array_binary.h>\n#include <arrow/array/builder_binary.h>\n#include <"
},
{
"path": "c++/pod5_format/types.h",
"chars": 3392,
"preview": "#pragma once\n\n#include \"pod5_format/pod5_format_export.h\"\n#include \"pod5_format/result.h\"\n#include \"pod5_format/uuid.h\"\n"
},
{
"path": "c++/pod5_format/uuid.h",
"chars": 10593,
"preview": "#pragma once\n\n// This file contains code from https://github.com/mariusbancila/stduuid/ which has the following\n// licen"
},
{
"path": "c++/pod5_format/version.h.in",
"chars": 292,
"preview": "#pragma once\n\n#include <string>\n\nnamespace pod5 {\n\nstd::uint16_t const Pod5MajorVersion = @POD5_VERSION_MAJOR@;\nstd::uin"
},
{
"path": "c++/pod5_format_pybind/CMakeLists.txt",
"chars": 2181,
"preview": "\npybind11_add_module(pod5_format_pybind\n api.h\n bindings.cpp\n utils.h\n subset.cpp\n subset.h\n\n repack/r"
},
{
"path": "c++/pod5_format_pybind/_version.py.in",
"chars": 205,
"preview": "# This file is auto generated by cmake during compilation\n__version__ = version = \"@POD5_FULL_VERSION@\"\n__version_tuple_"
},
{
"path": "c++/pod5_format_pybind/api.h",
"chars": 24772,
"preview": "#pragma once\n\n#include \"pod5_format/async_signal_loader.h\"\n#include \"pod5_format/c_api.h\"\n#include \"pod5_format/file_rea"
},
{
"path": "c++/pod5_format_pybind/bindings.cpp",
"chars": 7087,
"preview": "#include \"api.h\"\n#include \"pod5_format/c_api.h\"\n#include \"repack/repack_output.h\"\n#include \"repack/repacker.h\"\n#include "
},
{
"path": "c++/pod5_format_pybind/build_wheel.cmake",
"chars": 1448,
"preview": "\nmessage(\"Building python lib-pod5 wheel using ${PYTHON_EXECUTABLE}\")\nmessage(\" project dir ${PYTHON_PROJECT_DIR}\")\nmes"
},
{
"path": "c++/pod5_format_pybind/repack/repack_functions.h",
"chars": 13049,
"preview": "#pragma once\n\n#include \"pod5_format/internal/tracing/tracing.h\"\n#include \"pod5_format/read_table_reader.h\"\n#include \"pod"
},
{
"path": "c++/pod5_format_pybind/repack/repack_output.cpp",
"chars": 12035,
"preview": "#include \"repack_output.h\"\n\n#include \"pod5_format/internal/tracing/tracing.h\"\n#include \"repack_functions.h\"\n\n#include <i"
},
{
"path": "c++/pod5_format_pybind/repack/repack_output.h",
"chars": 2269,
"preview": "#pragma once\n\n#include \"pod5_format/file_writer.h\"\n#include \"pod5_format/thread_pool.h\"\n#include \"repack_states.h\"\n\n#inc"
},
{
"path": "c++/pod5_format_pybind/repack/repack_states.h",
"chars": 2358,
"preview": "#pragma once\n\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/signal_builder.h\"\n\n#include <arrow/array/builde"
},
{
"path": "c++/pod5_format_pybind/repack/repack_utils.h",
"chars": 5462,
"preview": "#pragma once\n\n#include \"pod5_format/read_table_reader.h\"\n\n#include <arrow/array/array_dict.h>\n\n#include <mutex>\n#include"
},
{
"path": "c++/pod5_format_pybind/repack/repacker.cpp",
"chars": 4608,
"preview": "#include \"repacker.h\"\n\n#include \"pod5_format/internal/tracing/tracing.h\"\n#include \"repack_output.h\"\n#include \"repack_sta"
},
{
"path": "c++/pod5_format_pybind/repack/repacker.h",
"chars": 2168,
"preview": "#pragma once\n\n#include \"pod5_format_pybind/api.h\"\n\n#include <pybind11/pybind11.h>\n\n#include <memory>\n#include <set>\n#inc"
},
{
"path": "c++/pod5_format_pybind/subset.cpp",
"chars": 18545,
"preview": "#include \"subset.h\"\n\n#include <algorithm>\n#include <chrono>\n#include <cmath>\n#include <cstddef>\n#include <cstdlib>\n#incl"
},
{
"path": "c++/pod5_format_pybind/subset.h",
"chars": 365,
"preview": "#include <pybind11/stl/filesystem.h>\n\n#include <filesystem>\n#include <map>\n#include <string>\n#include <vector>\n\nvoid sub"
},
{
"path": "c++/pod5_format_pybind/utils.h",
"chars": 1472,
"preview": "#pragma once\n\n#include \"pod5_format/result.h\"\n\ninline void raise_error(arrow::Status const & status)\n{\n throw std::ru"
},
{
"path": "c++/test/CMakeLists.txt",
"chars": 977,
"preview": "\nadd_executable(pod5_unit_tests\n main.cpp\n c_api_null_input.cpp\n c_api_test_utils.h\n c_api_tests.cpp\n c_a"
},
{
"path": "c++/test/TemporaryDirectory.h",
"chars": 2622,
"preview": "#pragma once\n\n#include \"pod5_format/uuid.h\"\n\n#include <filesystem>\n\nnamespace ont { namespace testutils {\n\nstatic std::s"
},
{
"path": "c++/test/c_api_build_test.c",
"chars": 88,
"preview": "#include \"pod5_format/c_api.h\"\n\n// Build check to verify a c file can include the c_api\n"
},
{
"path": "c++/test/c_api_null_input.cpp",
"chars": 23203,
"preview": "#include \"c_api_test_utils.h\"\n#include \"pod5_format/c_api.h\"\n#include \"utils.h\"\n\n#include <bit>\n#include <numeric>\n#incl"
},
{
"path": "c++/test/c_api_test_utils.h",
"chars": 2366,
"preview": "#pragma once\n\n#include \"pod5_format/c_api.h\"\n\n#include <catch2/catch.hpp>\n\n#include <string>\n\n#define CHECK_POD5_OK(stat"
},
{
"path": "c++/test/c_api_tests.cpp",
"chars": 35004,
"preview": "#include \"pod5_format/c_api.h\"\n\n#include \"c_api_test_utils.h\"\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format"
},
{
"path": "c++/test/file_reader_writer_tests.cpp",
"chars": 35859,
"preview": "#include \"pod5_format/async_signal_loader.h\"\n#include \"pod5_format/file_reader.h\"\n#include \"pod5_format/file_writer.h\"\n#"
},
{
"path": "c++/test/main.cpp",
"chars": 54,
"preview": "#define CATCH_CONFIG_MAIN\n#include <catch2/catch.hpp>\n"
},
{
"path": "c++/test/output_stream_tests.cpp",
"chars": 4354,
"preview": "#include \"pod5_format/internal/async_output_stream.h\"\n#include \"pod5_format/internal/linux_output_stream.h\"\n#include \"te"
},
{
"path": "c++/test/read_table_tests.cpp",
"chars": 9365,
"preview": "#include \"pod5_format/internal/async_output_stream.h\"\n#include \"pod5_format/read_table_reader.h\"\n#include \"pod5_format/r"
},
{
"path": "c++/test/read_table_writer_utils_tests.cpp",
"chars": 1665,
"preview": "#include \"pod5_format/read_table_writer_utils.h\"\n\n#include \"test_utils.h\"\n#include \"utils.h\"\n\n#include <arrow/array/arra"
},
{
"path": "c++/test/run_info_table_tests.cpp",
"chars": 5266,
"preview": "#include \"pod5_format/internal/async_output_stream.h\"\n#include \"pod5_format/run_info_table_reader.h\"\n#include \"pod5_form"
},
{
"path": "c++/test/schema_tests.cpp",
"chars": 1145,
"preview": "#include \"pod5_format/schema_metadata.h\"\n#include \"test_utils.h\"\n\n#include <catch2/catch.hpp>\n\nSCENARIO(\"Version Tests\")"
},
{
"path": "c++/test/signal_compression_tests.cpp",
"chars": 957,
"preview": "#include \"pod5_format/signal_compression.h\"\n\n#include \"test_utils.h\"\n#include \"utils.h\"\n\n#include <arrow/buffer.h>\n#incl"
},
{
"path": "c++/test/signal_table_tests.cpp",
"chars": 5752,
"preview": "#include \"pod5_format/internal/async_output_stream.h\"\n#include \"pod5_format/schema_metadata.h\"\n#include \"pod5_format/sig"
},
{
"path": "c++/test/svb16_scalar_tests.cpp",
"chars": 2671,
"preview": "#include \"pod5_format/svb16/decode.hpp\"\n#include \"pod5_format/svb16/encode.hpp\"\n\n#include <catch2/catch.hpp>\n\n#include <"
},
{
"path": "c++/test/svb16_x64_tests.cpp",
"chars": 3328,
"preview": "#include \"pod5_format/svb16/decode.hpp\"\n#include \"pod5_format/svb16/encode.hpp\"\n\n#include <catch2/catch.hpp>\n\n#include <"
},
{
"path": "c++/test/test_utils.h",
"chars": 2255,
"preview": "#pragma once\n\n#include <arrow/result.h>\n#include <arrow/status.h>\n#include <catch2/catch.hpp>\n\ntemplate <typename T>\nstr"
},
{
"path": "c++/test/thread_pool_tests.cpp",
"chars": 3053,
"preview": "#include \"pod5_format/thread_pool.h\"\n\n#include <catch2/catch.hpp>\n\n#include <condition_variable>\n#include <mutex>\n#inclu"
},
{
"path": "c++/test/utils.h",
"chars": 1515,
"preview": "#pragma once\n\n#include \"pod5_format/read_table_utils.h\"\n#include \"test_utils.h\"\n\n#include <arrow/result.h>\n#include <arr"
},
{
"path": "c++/test/uuid_tests.cpp",
"chars": 8973,
"preview": "// This file contains code from https://github.com/mariusbancila/stduuid/ which has the following\n// license:\n//\n// MI"
},
{
"path": "ci/docker/Dockerfile.conda",
"chars": 44,
"preview": "FROM condaforge/mambaforge:latest\nWORKDIR /\n"
},
{
"path": "ci/docker/Dockerfile.py39.arm64",
"chars": 434,
"preview": "from git.oxfordnanolabs.local:4567/minknow/images/build-aarch64-gcc9\n\nRUN yum groupinstall \"Development Tools\" -y\nRUN yu"
},
{
"path": "ci/docker/Dockerfile.py39.x64",
"chars": 433,
"preview": "from git.oxfordnanolabs.local:4567/minknow/images/build-x86_64-gcc9\n\nRUN yum groupinstall \"Development Tools\" -y\nRUN yum"
},
{
"path": "ci/generate_coverage_report.sh",
"chars": 1959,
"preview": "#!/bin/bash -e\n\n# Parse args.\nif [ $# -ne 1 ]; then\n echo \"Usage: $0 build_dir\"\n exit 1\nfi\nbuild_dir=$(realpath \"$"
},
{
"path": "ci/get_tag_version.cmake",
"chars": 126,
"preview": "set(CANONICAL_TAG_BUILD TRUE)\ninclude(\"${CMAKE_CURRENT_LIST_DIR}/../cmake/POD5Version.cmake\")\nmessage(\"${POD5_FULL_VERSI"
},
{
"path": "ci/gitlab-ci-common.yml",
"chars": 25281,
"preview": "variables:\n CONAN_USER: nanopore\n CONAN_CHANNEL: stable\n CONAN_REFERENCE: '.'\n # Location of the .conan dir:"
},
{
"path": "ci/install.sh",
"chars": 639,
"preview": "#!/bin/bash\n\nset -o errexit\nset -o pipefail\nset -o nounset\n# set -o xtrace\n\n# Tar up the archive build:\n(\n cmake -DCM"
},
{
"path": "ci/package.sh",
"chars": 898,
"preview": "#!/bin/bash\n\nset -o errexit\nset -o pipefail\nset -o nounset\n# set -o xtrace\n\noutput_sku=$1\nauditwheel_platform=\nif [ $# -"
},
{
"path": "ci/unpack_libs_for_python.sh",
"chars": 713,
"preview": "#!/bin/bash\n\ninput_dir=$1\noutput_dir=$2\n\necho \"Unpacking builds from $input_dir to $output_dir\"\n\nfile_regex=\".*/lib_pod5"
},
{
"path": "cmake/BuildFlatBuffers.cmake",
"chars": 15842,
"preview": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# "
},
{
"path": "cmake/Findzstd.cmake",
"chars": 2781,
"preview": "find_path(ZSTD_INCLUDE_DIR\n NAMES zstd.h\n PATHS\n ${CONAN_INCLUDE_DIRS_RELEASE}\n ${CONAN_INCLUDE_DIRS"
},
{
"path": "cmake/conan_provider.cmake",
"chars": 29097,
"preview": "# The MIT License (MIT)\n#\n# Copyright (c) 2024 JFrog\n#\n# Permission is hereby granted, free of charge, to any person obt"
},
{
"path": "cmake/pod5_fuzz.cmake",
"chars": 547,
"preview": "if (NOT CMAKE_CXX_COMPILER_ID MATCHES \"Clang\")\n message(FATAL_ERROR\n \"Only LLVM based compilers are supported "
},
{
"path": "cmake/pod5_packaging.cmake",
"chars": 360,
"preview": "\nset(CPACK_PACKAGE_NAME \"lib_pod5\")\nset(CPACK_PACKAGE_VENDOR \"Oxford Nanopore\")\nset(CPACK_VERBATIM_VARIABLES true)\nset(C"
},
{
"path": "cmake/presets/conan-build-options.json",
"chars": 1227,
"preview": "{\n \"version\": 4,\n \"configurePresets\": [\n {\n \"name\": \"conan2-debug\",\n \"binaryDir\": \"${"
},
{
"path": "cmake/presets/conan-profiles.json",
"chars": 3684,
"preview": "{\n \"version\": 4,\n \"configurePresets\": [\n {\n \"name\": \"conan2-gcc9-x86_64-profile\",\n \"h"
},
{
"path": "cmake/presets/conan-provider.json",
"chars": 505,
"preview": "{\n \"version\": 4,\n \"configurePresets\": [\n {\n \"name\": \"conan2-provider\",\n \"hidden\": tru"
},
{
"path": "conanfile.py",
"chars": 7321,
"preview": "from conan import ConanFile\nfrom conan.tools.cmake import CMakeToolchain, CMake, CMakeDeps\nfrom conan.tools.files import"
},
{
"path": "docs/DESIGN.md",
"chars": 3377,
"preview": "POD5 File Format Design Details\n==============================\n\n## Summary\n\nThis file format has the following design go"
},
{
"path": "docs/README.md",
"chars": 1083,
"preview": "Design documentation for POD5\n============================\n\nThe POD5 file format has been specifically designed to be su"
},
{
"path": "docs/SPECIFICATION.md",
"chars": 8726,
"preview": "POD5 Format Specification\n=========================\n\n## Overview\n\nThe file format is, at its core, a collection of Apach"
}
]
// ... and 97 more files (download for full content)
About this extraction
This page contains the full source code of the nanoporetech/pod5-file-format GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 297 files (2.3 MB), approximately 606.6k tokens, and a symbol index with 3153 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.