From 840f43e35cc4493daa071fcc1aae328df50c53f2 Mon Sep 17 00:00:00 2001 From: Andrew Landau Date: Thu, 26 Oct 2023 11:39:07 +0100 Subject: [PATCH 1/2] Extend zygosity filters --- alyx/subjects/admin.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/alyx/subjects/admin.py b/alyx/subjects/admin.py index 6febd8192..40b7125ba 100755 --- a/alyx/subjects/admin.py +++ b/alyx/subjects/admin.py @@ -126,16 +126,26 @@ def lookups(self, request, model_admin): (None, 'All'), ('p', 'All positive'), ('h', 'All homo'), + ('n', 'All negative'), + ('e', 'All het') ) def queryset(self, request, queryset): if self.value() is None: return queryset.all() - elif self.value() in ('p', 'h'): + elif self.value() in ('p', 'h', 'n', 'e'): # Only keep subjects with a non-null geontype. queryset = queryset.filter(genotype__isnull=False).distinct() - # Exclude subjects that have a specific zygosity/ - d = dict(zygosity=0) if self.value() == 'p' else dict(zygosity__in=(0, 1, 3)) + # Exclude subjects that have a specific zygosity + # See alyx/alyx/subjects/models.py - ZYGOSITY_TYPES for explanation + if self.value() == 'p': + d = dict(zygosity=0) + elif self.value() == 'h': + d = dict(zygosity__in=(0, 1, 3)) + elif self.value() == 'n': + d = dict(zygosity__in=(1, 2, 3)) + else: + d = dict(zygosity__in=(0, 2, 3)) nids = set([z.subject.id.hex for z in Zygosity.objects.filter(**d)]) return queryset.exclude(pk__in=nids) From a00c097bc9e58fe94689006a0c43b12a98ccf477 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 6 Dec 2023 14:22:52 +0000 Subject: [PATCH 2/2] GitHub Actions generated requirements_frozen.txt --- requirements_frozen.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/requirements_frozen.txt b/requirements_frozen.txt index c71549918..dc28731a0 100644 --- a/requirements_frozen.txt +++ b/requirements_frozen.txt @@ -1,12 +1,12 @@ asgiref==3.7.2 backports.zoneinfo==0.2.1 -boto3==1.33.4 -botocore==1.33.4 +boto3==1.33.8 +botocore==1.33.8 certifi==2023.11.17 cffi==1.16.0 charset-normalizer==3.3.2 click==8.1.7 -colorlog==6.7.0 +colorlog==6.8.0 contourpy==1.1.1 coreapi==2.3.3 coreschema==0.0.4 @@ -14,7 +14,7 @@ coverage==6.5.0 coveralls==3.3.1 cryptography==41.0.7 cycler==0.12.1 -Django==4.2.7 +Django==4.2.8 django-admin-list-filter-dropdown==1.0.3 django-admin-rangefilter==0.11.2 django-autocomplete-light==3.9.7 @@ -33,12 +33,12 @@ docopt==0.6.2 docutils==0.20.1 drfdocs==0.0.11 flake8==6.1.0 -fonttools==4.45.1 +fonttools==4.46.0 globus-cli==3.19.0 globus-sdk==3.30.0 iblutil==1.7.1 idna==3.6 -importlib-metadata==6.8.0 +importlib-metadata==7.0.0 importlib-resources==6.1.1 itypes==1.2.0 Jinja2==3.1.2