From f1dc3ee4dc97898b7c08eed451c6f1ce5226f0af Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 17 May 2024 16:31:04 +0930 Subject: [PATCH] temp fix for #1053 - will work out data fix later --- snpdb/variant_sample_information.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/snpdb/variant_sample_information.py b/snpdb/variant_sample_information.py index 695e14250..0a886bed5 100644 --- a/snpdb/variant_sample_information.py +++ b/snpdb/variant_sample_information.py @@ -114,8 +114,13 @@ def _cohort_genotype_to_sample_genotypes(values_qs): cgc = CohortGenotypeCollection.objects.get(pk=cgc_id) if cgc.cohort_version != cgc.cohort.version: - logging.warning("CohortGenotypeCollection %s out of date with Cohort.version", cgc.pk) - continue + logging.warning("CohortGenotypeCollection (without VCF) %s v.%d out of date with Cohort v.%d", + cgc.pk, cgc.cohort_version, cgc.cohort.version) + + cohort_can_change = cgc.cohort.vcf is None + if cohort_can_change: + continue # Otherwise not really out of date, just a bug - see issue #1053 + samples_qs = cgc.cohort.get_samples() ontology_path = f"patient__{PATIENT_ONTOLOGY_TERM_PATH}__name"