Skip to content

Should RUClient.unblock_read_batch also update channel_read_latest_decision? #416

Closed

Description

@hiruna72

Hi, a quick question about filtering reads that already have a decision.

In read_until/base.py, stop_receiving_batch and unblock_read_batch both call self.channel_read_latest_decision.update(reads).
get_read_chunks then drops later chunks of those reads.

However, RUClient.unblock_read_batch in _read_until_client.py overrides the base method to log read ids, and it doesn't make that call.
So chunks of a stopped read are dropped, but chunks of an unblocked read that arrive before the unblock takes effect (at the MinKNOW end) are basecalled, mapped and acted on again.

In the debug TSVs from two P2 Solo runs (2024.3.0), we see this:

Run A Run B
Unblocked reads seen again 1–2 loops later 21.6% 21.3%
Share of all basecalled bases spent on those reads 22.3% 23.0%

Almost all of them (~99%) are unblocked a second time. That sends a second action to MinKNOW and adds a second line to unblocked_read_ids.txt.

This wasn't limited to part of the run: in every hour of both runs, 19–26% of unblocked reads were seen again, and 86–87% of readfish iterations (loops with ≥20 reads) included at least one unblocked read being processed again.

If it isn't intentional, adding self.channel_read_latest_decision.update(reads) to RUClient.unblock_read_batch would seem to fix it.

Thank you!

Activity

  1. github-actions commented on Oct 23, 2026

    @github-actions

    Thank you for your issue. Give us a little time to review it.

    PS. You might want to check the FAQ if you haven't done so already.

    This is an automated reply, generated by FAQtory

  2. mattloose commented on Oct 23, 2026

    @mattloose
    Contributor

    Good question. We will have a look at this.

    Out of interest, do you have the split of reads seen again at 2 loops later versus 1 loop later? And is 2 loops the maximum you have seen in the data?

    When you are running readfish and seeing this, how often do you see slow batches?

    Finally, what GPU are you using with the P2solo runs.

    Thanks

  3. hiruna72 commented on Oct 26, 2026

    @hiruna72
    Author

    Thanks for looking into this!

    Split of 1 loop vs 2 loops later, and is 2 the maximum?

    Run A Run B
    Seen again 1 loop later 89.5% 88.5%
    Seen again 2 loops later 10.5% 11.5%
    Seen again 3+ loops later 0 0

    Yes, 2 loops is the maximum in both runs.

    How often do you see slow batches?

    Run A: 783 / 157,509 batches (0.5%); run B: 528 / 76,154 (0.7%), using readfish's own Slow batches (>0.80s) count. Typical batches take ~0.42 s.

    GPU?

    One NVIDIA GeForce RTX 5070 Ti, shared by runs A and B through a single Dorado basecall server (the two were run in parallel on the same gpu).

    A third run on a different machine

    We also checked a run on another P2 Solo PC with an RTX 4070 SUPER (one run on one GPU, same readfish 2024.3.0, break_reads_after_seconds = 0.8). It had almost no slow batches (8 / 59,820), but more duplicates:

    Value
    Unblocked reads seen again 36.1%
    Share of basecalled bases spent on those reads 36.7%
    Seen again 1 / 2 loops later 83.9% / 16.1% (none later)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions