Group auto-launch: a specimen/patient analysis suppresses later per-sample launches, and a failure on the last file logs no event
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with analysis/tasks/auto_analysis_tasks.py:auto_run_analyses_for_vcf, analysis/auto_launch.py:auto_launch_analysis_templates_for_sample, and the import handlers in analysis/signals/signal_handlers.py. Trace template run records and group completeness for both successful and failed imports, including failures before BackendVCF creation. Add or run focused tests for the re-sent sample and last-file failure cases; done means launches are checked per template and blocked group launches log a warning.
Written by the indexing model from the issue text.
Description
🤖 Written by Claude
Two bugs in the group-level (Extraction / Specimen / Patient) auto-launch added in #2898, found in agent testing (https://github.com/SACGF/variantgrid/issues/2898#issuecomment-7187938517).
1. A group analysis stops later per-sample launches in that group
analysis/tasks/auto_analysis_tasks.py:auto_run_analyses_for_vcf passes skip_already_analysed=True, and analysis/auto_launch.py:auto_launch_analysis_templates_for_sample returns early if get_related_analysis_details_for_samples finds any analysis covering the sample. A Specimen-level sample node covers every sample in the specimen. So once the group analysis exists, a VCF for that specimen gets no per-sample analysis from a Sample-level rule, whether it's a re-sent file or a second sequencing run on the same specimen.
Repro: a Specimen-level rule and a Sample-level rule on the same kit. Import every file for a specimen (one group analysis, one analysis per sample), then re-send one file. The re-sent sample gets no per-sample analysis.
Proposed: decide "already analysed" per template, i.e. whether this template already ran for this sample (SampleAnalysisTemplateRun), rather than whether any analysis covers the sample.
2. No event when the file that blocks a launch is the last to arrive
The group completeness check (and its "Not launching … failed imports: …" warning event) only runs on import success and on a late link (analysis/signals/signal_handlers.py:handle_vcf_import_success, handle_sample_saved). When the last file to arrive for a group fails, nothing runs the check, so no event is logged and the missing analysis is silent. #2898 says a blocked launch should always be visible.
Repro: register four files for a specimen and import three successfully, then make the fourth fail (e.g. REF mismatch). No analysis appears (correct), but there's no warning event.
Proposed: also run the group check when a VCF import fails. Related, from reading the code only: a file that fails before the header step creates no BackendVCF, so the group check counts it as "waiting" rather than failed. Check that case too.
A minor one: when an earlier file failed, the warning is logged once for each later successful import (twice in the test). Logging it once per (template, group, run) would be enough.
- Dominant language
- Python
- Stars
- 31
- Forks
- 4
- Avg merge
- 4h 52m
- Merged PRs (30d)
- 183
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SACGF/variantgrid
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
SACGF/variantgrid#2964 · 1 comment ·
Maintainers usually reply within 1 day
-
Genome build now duplicated in "imported as" on allele pagePossibly taken @TheMadBug claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
SACGF/variantgrid#2950 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
SACGF/variantgrid#2865 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SACGF/variantgrid#2647 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
SACGF/variantgrid#2341 · 3 comments ·
Maintainers usually reply within 1 day
All issues in SACGF/variantgrid
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day