diff options
| author | pi coding agent <pi@localhost> | 2026-11-04 18:17:28 +0000 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-11-04 15:02:05 -0600 |
| commit | 733ec34ad34c1b97268a94e708db6acca8ef8de0 (patch) | |
| tree | 829798a69fbb59ea3b2ff22ab174ed5c6f930dae /docs | |
| parent | f5fd6d3eae46d138a8901b87711b6fd60a36d0a5 (diff) | |
| download | gn-uploader-733ec34ad34c1b97268a94e708db6acca8ef8de0.tar.gz | |
docs: Update progress TODOs
- Stage 01 tasks and the job-chain task - comment-collection and idempotency tasks - Stage 02 task statuses - sample/marker ordering QC tasks
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/WIP/geno-uploads-tasks-and-todos.md | 61 |
1 files changed, 40 insertions, 21 deletions
diff --git a/docs/WIP/geno-uploads-tasks-and-todos.md b/docs/WIP/geno-uploads-tasks-and-todos.md index cf52c44..f23125a 100644 --- a/docs/WIP/geno-uploads-tasks-and-todos.md +++ b/docs/WIP/geno-uploads-tasks-and-todos.md @@ -1,7 +1,7 @@ # Genotype uploads — tasks, todos & progress - **Feature:** genotypes upload -- **Last updated:** 2026-10-22 +- **Last updated:** 2026-11-04 - **Related:** [design notes](geno-uploads-design-notes.md) · [implementation notes](geno-uploads-implementation-notes.md) · background jobs (in `gn-libs/WIP/`: `background-jobs-design-notes.md`) @@ -18,46 +18,57 @@ implementation notes. - ✅ Single- and multi-processed paths produce identical `FileStats`. - ✅ Unit tests for accumulation, merge and equivalence (`tests/genotypes/`). - ✅ Fix threshold / header-skip / `blank_lines` defects. -- ⬜ **Collect comment lines into a multiline description string** (currently - only counted, text discarded). Format decided: strip the leading `#`, trim - surrounding whitespace, keep one line per comment, present in an editable - textbox for the user; the result feeds the R/qtl2 control file (see design - notes). Still to do: implement it and settle the textbox styling. +- ✅ **Collect comment lines into a multiline description string**: strip the + configured comment character, trim surrounding whitespace, keep one line per + comment and join with newlines into `FileStats.description`. Still to do: + settle the Stage 02 textbox styling. - 💭 Decide whether the final description is also persisted to the database, or only written into the R/qtl2 control file. - 🚧 **Wire the collector into the upload view** (`add_genotype_records`): - ✅ Resolve the uploaded file for both the resumable and direct upload paths, via `uploader.files.resolve_uploaded_file`. - - ⬜ Read the form's metadata (`markers_field`, `chromosomes_field`, + - ✅ Read the form's metadata (`markers_field`, `chromosomes_field`, `centimorgans_field`, `megabases_field`, `transposed`, `file-separator`, `file-comment-char`, `file-na`) and map it to the collector's config keys (`markers`, `chromosome`, `cm`, `mb`, `transposed`, `separator`, - `comment.char`, `na_strings`). The inputs already exist in the form. - - ⬜ Run the collector (or schedule it) instead of returning the stub - `_collect_geno_csv_stats_` dict. + `comment.char`, `na_strings`) via `uploader.genotypes.collector_config`. + - ✅ Run the collector as a `gn_libs.jobs` background job (job type + `genotype-file-stats`); the job status/summary pages show its output and + errors. - ⬜ Persist/return the resulting `FileStats` for the next stage. ## Stage 02 — Study design & genotype encoding -- ⬜ Present the genotype symbols discovered in Stage 01 for encoding. - - ⬜ Only symbols that actually occur in the file should be offered. -- ⬜ Seed labels from `@` lines when present (`mat`, `pat`, `het`, `unk`). - - ⬜ Missing `@` lines (all or some) must **not** fail the stage. - - ⬜ Treat `@`-derived labels as a starting point only; allow the user to - change them. Presence is not validation. +- ✅ Present the collected comment lines (comment character stripped) as the + study/dataset description for review and editing. +- ✅ Present the genotype symbols discovered in Stage 01 for encoding. + - ✅ Only symbols that actually occur in the file are offered. +- ✅ Seed labels from `@` lines when present (`mat`, `pat`, `het`, `unk`). + - ✅ Missing `@` lines (all or some) do **not** fail the stage (empty + defaults). + - ✅ `@`-derived labels are a starting point only; the user can change them. + Presence is not validation. - ⬜ Allow the user to specify missing-value symbol(s). -- ⬜ Capture the confirmed encoding/study design for downstream stages. +- ✅ Capture the confirmed encoding/study design for downstream stages (stored + in the collector job metadata, key `stage02`). ## Stage 03 — Final QC - ⬜ Perform value-level QC parameterised by Stage 01/02 results. - ⬜ Restrict checks to the symbols present in the file. +- ⬜ Verify/handle the ordering of samples/individuals/cases (their order + matters in the generated `.geno` file). +- ⬜ Verify markers/records are ordered by chromosome (ascending) and then by + position (ascending) within each chromosome; decide how to handle overlapping + positions (detection/handling TBD). ## Stages 04–07 — Conversion & ingest - ⬜ Stage 04: convert to R/qtl2 bundle. - ⬜ Stage 05: ingest the R/qtl2 bundle. -- ⬜ Stage 06: generate `.geno` (and other artefacts). +- ⬜ Stage 06: generate `.geno` (and other artefacts), preserving sample order + and ordering records by chromosome then position, both ascending (see + Stage 03). - ⬜ Stage 07: pre-compute mapping(s). ## Refactoring / technical debt @@ -70,6 +81,15 @@ implementation notes. ## Background jobs +- ⬜ Implement the stage-job chain using each job's `success_handler` (as in + the phenotypes `load_data_to_database`/`load_phenotypes_success_handler` + pattern): proceed on success, and stop/report diagnostics on failure (see + design notes). +- ⬜ Make stage transitions idempotent: revisiting a completed job's status URL + must not re-run a non-idempotent stage; present the previously entered + information instead (see design notes). +- 💭 Consider preventing a return to / resumption of earlier jobs once a later + stage has started (see design notes). - 💭 Decide whether genotype upload stays "one script == one job" or becomes one job with multiple, gated tasks. **Not decided; treat as a separate feature.** See `gn-libs/WIP/background-jobs-design-notes.md` and the @@ -79,6 +99,5 @@ implementation notes. ## Housekeeping -- ⬜ Track the new templates `genotype-encoding-elements.html` and - `study-design-elements.html` (currently untracked) once they are wired into - Stage 02. +- ✅ Track the new templates `genotype-encoding-elements.html` and + `study-design-elements.html`; they are wired into Stage 02. |
