LooseLab / readfish

CLI tool for flexible and fast adaptive sampling on ONT sequencers
https://looselab.github.io/readfish/
GNU General Public License v3.0
163 stars 31 forks source link

Having only one region in toml caused issue #353

Closed jennieli421 closed 3 weeks ago

jennieli421 commented 2 months ago

I wanted to perform a run with only enrichment, so I had one region specified in TOML like the following. But I did not see any unblock actions from the live state panel. The purple peak indicating voltage reversals did not appear at all in the histogram. However, everything works fine as long as I add a region with control=true. I also tried with two regions with control=false and that also didn't have any rejection.

[caller_settings.guppy]
config = "dna_r10.4.1_e8.2_400bps_5khz_fast_prom.cfg" # PromethION
address = "ipc:///tmp/.guppy/5555"

[mapper_settings.mappy_rs]
fn_idx_in = "comparison.mmi"
n_threads = 8

[[regions]]
name = "analysis"
control = false
min_chunks = 1 # minimum number of chunks before a decision can be made
max_chunks = 1 # maximum number of chunks to use in decision making - after this perform the above_max_chunks action
targets = []  # Genomic targets for this region
single_on = "unblock"
multi_on = "unblock"
single_off = "stop_receiving"
multi_off = "stop_receiving"
no_map = "proceed"
no_seq = "proceed"
above_max_chunks = "unblock"  # Action to take if the number of chunks received is above max_chunks
below_min_chunks = "proceed"  # Action to take if the number of chunks received is below min_chunks
github-actions[bot] commented 2 months ago

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

Adoni5 commented 2 months ago

max_chunks has to be greater than min_chunks, and should not be set to 1. You also don't seem to have set any targets?

jennieli421 commented 2 months ago

We have been using max_chunks=1 for a very long time and the results were fine. Here I am only providing targeted region's reference, so I don't need to specify targets

mattloose commented 2 months ago

Here I am only providing targeted region's reference, so I don't need to specify targets

I'm not quite sure what you are trying to do here. If you do not give any targets then you will not get any unblocking activity. An empty

targets = [] will mean that no targets are checked and so the later logic of on or off target will not be evaluated.

An example toml enriching for two chromosomes from a reference is available here: https://github.com/LooseLab/readfish/blob/main/docs/_static/example_tomls/human_chr_selection.toml

In short, you must have something in the targets = [] for any unblocking activity to occur.

jennieli421 commented 2 months ago

I have been using this setting (with split region) for a long time and it is working as expected. The design for not having targets can be traced back to this conversation: https://github.com/LooseLab/readfish/issues/242#issuecomment-1610971660

Basically I have provided references of only the desired sequences, so everything mapped to the reference is accepted. Thus, the problem I want to fix is why this setting does not work when I only have one region.

mattloose commented 2 months ago

Hmmm

I indeed stand corrected.

Let me check this further and come back to you.

mattloose commented 2 months ago

Hi, Could you pleaase confrim your readfish version and also share your readfish log with us - the log should be called the .tsv

Thanks

Matt

jennieli421 commented 2 months ago

tested_one_or_more_regions_ef170d0f.zip

Unfortunately, I was testing different region settings during the run, so this run had multiple settings. I hope this is fine.

Adoni5 commented 2 months ago

Hi @jennieli421 - do these logs contain an example of it working, with a region of control=true, where you see unblocking?

And can I just check the version of readfish you were using?

readfish --version

Final question, what is the mean read length of the library you are testing?

jennieli421 commented 1 month ago
readfish --version
readfish 2023.1.1

Both should contain multiple trials where I see unblocking, as long as there is a region of control=True.

Screenshot 2024-05-12 at 1 03 25 AM Screenshot 2024-05-12 at 1 03 42 AM

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 weeks ago

This issue was closed because there has been no response for 5 days after becoming stale.