Improve identifying run dirs#460
Improve identifying run dirs#460kedhammar merged 6 commits intoNationalGenomicsInfrastructure:masterfrom
Conversation
… remove superfluous .abspath method
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #460 +/- ##
=======================================
Coverage 27.90% 27.90%
=======================================
Files 37 37
Lines 5487 5487
=======================================
Hits 1531 1531
Misses 3956 3956 ☔ View full report in Codecov by Sentry. |
|
Running interactively on preproc yields: I.e. looks like it's behaving as expected. |
|
Ruff CI failure is due to Ruff update, addressed in #461 |
| lane_pattern = re.compile("^([1-8]{1,2})$") | ||
| sample_proj_pattern = re.compile("^((P[0-9]{3,5})_[0-9]{3,5})") | ||
| run_name = os.path.basename(os.path.abspath(run_dir)) | ||
| run_name = os.path.basename(run_dir) |
There was a problem hiding this comment.
Not sure why this change is needed, is it just to clean up? I asked chatgpt and the old one has an advantage if there are trailing slashes in the run_dir path?
There was a problem hiding this comment.
It was mostly to clean up yeah. When I tested the code interactively, I found that removing the method made no difference to how it behaved. The input of the method should always be from a glob search, so I figured it would be fairly consistent as well. I can revoke this particular change if you prefer to keep it?
There was a problem hiding this comment.
Yes normally, but I believe you can also run it manually and give a run_dir manually?
| inst_brand == "illumina" | ||
| and illumina_rundir_re.match(os.path.basename(run_dir)) | ||
| ) | ||
| ) or (inst_brand == "element" or inst_brand == "ont"): |
There was a problem hiding this comment.
The bug is in this block, it only skips processing for "archived", causing it to encounter an error when trying to instantiate an ONT run from the "no_backup" dir
There was a problem hiding this comment.
Right, and it's fixed by always checking against the ONT_RUN_PATTERN before updating statusdb? 👍
There was a problem hiding this comment.
Yes, now it will only act on run dirs whose name matches the pattern of the instrument type, we've essentially moved from a blacklist to a whitelist approach.
e60b055
into
NationalGenomicsInfrastructure:master
No description provided.