Rename the "genotype VCF" import classes: they mean a VCF imported with samples, not one with GT calls

Open
#2,721 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by reading upload/tasks/vcf/genotype_vcf_tasks.py and tracing the listed factory, task, and processor names to find their references. Check how UploadStep.script stores task paths and how deployment settings list finish-task classes; define done as the names clearly distinguishing sample imports from variants-only imports while existing and in-flight pipeline steps remain resolvable.

Written by the indexing model from the issue text.

Description

🤖 Written by Claude

In the upload code "genotype VCF" does not mean a VCF with GT calls. It means the import that builds the sample side of the model - a VCF, its Samples, a Cohort and a CohortGenotypeCollection with one CohortGenotype row per variant - as opposed to the variants-only imports (liftover, insert-variants-only, manual entry) that insert Variant rows and none of that.

A sites-only VCF (no FORMAT/sample columns) already runs down this path: genotype_vcf_processor_factory picks BulkNoGenotypeVCFProcessor, which writes the cohort genotype rows with unknown zygosity. The "create as sample" manual variant entry (#2719, PR #2720) subclasses ImportCreateVCFModelForGenotypeVCFTask for the same reason, and the name made reviewers ask why a sample with no genotypes uses a genotype task.

The family carrying the word:

  • upload/tasks/vcf/genotype_vcf_tasks.py
  • GenotypeVCFImportFactory
  • ImportCreateVCFModelForGenotypeVCFTask
  • ProcessGenotypeVCFDataTask
  • BulkGenotypeVCFProcessor / BulkNoGenotypeVCFProcessor
  • genotype_vcf_processor_factory

Something like "sample VCF" vs "variants-only VCF" would say what the split actually is.

Cost

UploadStep.script stores the task's dotted class path, so pipeline steps already in the database (retries, in-flight imports) would point at names that no longer exist. A rename needs either the old names kept as aliases, or a data migration over upload_uploadstep.script (and settings.FINISH_IMPORT_VCF_STEP_TASKS_CLASSES in deployment settings).

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SACGF/variantgrid

All issues in SACGF/variantgrid

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.