Metadata-Version: 2.4
Name: podfish
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Dist: numpy>=1.21
Requires-Dist: requests>=2.28
Requires-Dist: pod5>=0.3.23 ; extra == 'test'
Requires-Dist: pytest>=8 ; extra == 'test'
Provides-Extra: test
License-File: LICENSE
Summary: Ultralight local and remote POD5 connector
Keywords: nanopore,pod5,signal,s3,range-requests
Home-Page: https://github.com/satriobio/podfish
Author: Satrio
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/satriobio/podfish
Project-URL: Issues, https://github.com/satriobio/podfish/issues
Project-URL: Repository, https://github.com/satriobio/podfish

# podfish

Fish reads directly from POD5 files located in public cloud bucket without downloading the whole object.

## Quick start

```bash
pip install podfish
```

Fish a single read:

```python
import numpy as np
import matplotlib.pyplot as plt
import podfish as pf

example_pod5 = "https://s3.amazonaws.com/foo/bar.pod5"
selected_read_id = "12345-67890"

with pf.Reader(example_pod5) as reader:
    read = next(reader.reads(selection=[selected_read_id]))
    sample_rate = read.run_info.sample_rate
    signal = read.signal
    time = np.arange(len(signal)) / sample_rate
    plt.plot(time, signal)
```

Fish the first ten reads:

```python
with pf.Reader(example_pod5) as reader:
    for count, read in enumerate(reader.reads(limit=10), start=1):
        signal = read.signal
        time = np.arange(len(signal)) / read.run_info.sample_rate

        print(count, read.read_id)
        plt.figure(figsize=(4, 2))
        plt.plot(time, signal)
        plt.show()
        plt.close()
```

## Acknowledgement

- Brandon Saint-John's [pod5-rs](https://github.com/bsaintjo/pod5-rs)

