Skip to content

Fix how minknow dir is determined#80

Merged
berndbohmeier merged 4 commits intomainfrom
fix-minknow-folder-detection
Mar 24, 2026
Merged

Fix how minknow dir is determined#80
berndbohmeier merged 4 commits intomainfrom
fix-minknow-folder-detection

Conversation

@berndbohmeier
Copy link
Copy Markdown
Collaborator

Before we were checkking if the parent folder is a base minknow data directory by checking if certain folders exist. This created problems when people copied out the folder to a different place. Now we check if the folder is a minknow experiment or if it contains minknow experiments, which should be more reliable

Before we were checkking if the parent folder is a base minknow data
directory by checking if certain folders exist. This created problems
when people copied out the folder to a different place.
Now we check if the folder is a minknow experiment or if it contains
minknow experiments, which should be more reliable
Copy link
Copy Markdown
Owner

@JasonAHendry JasonAHendry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good idea and am approving, but had some superficial comments you might look at. In general, I was wondering if we should just be carefully looking for what we need to run Nomadic rather than checking for additional folders that are not used? But could be convinced otherwise.



def is_minknow_experiment_dir(path: Path) -> bool:
expected_folders = {"pod5", "fastq_pass", "fastq_fail"}
Copy link
Copy Markdown
Owner

@JasonAHendry JasonAHendry Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about this a bit more, I wonder if for the purposes of Nomadic we really should just be checking for fastq_pass, because that is necessary and sufficient for Nomadic to run?

But I haven't thought carefully enough about it, also e.g. with respect to the waiting period after the run starts and before the folder is generated by MinKNOW.

I think this is also fine, but I guess it introduces unnecessary checks (e.g. pod5, fastq_fail) and also allows proceeding in the absence of fastq_pass.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my idea was that we rather want the checks less strict, as this is just a help for the user if they select the wrong folder we can show them this is not a minknow folder, but we rather want to too lose than too strict. I had the checks to strict in the past which was annoying when you actually gave it the right folder, but the check would fail.
So yeah here we are checking for any of those folders just in case for whatever reason fastq_pass was maybe not created yet. Could be that just checking for fastq_pass would be better.

Comment thread src/nomadic/util/minknow.py Outdated
Comment thread src/nomadic/util/minknow.py Outdated
@berndbohmeier berndbohmeier merged commit b196d87 into main Mar 24, 2026
3 checks passed
@berndbohmeier berndbohmeier deleted the fix-minknow-folder-detection branch March 24, 2026 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants