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b!_n@
z3b~(wGIDKhiS&zzy5Bn9+rwp~3rsC>-CFr6nkTFZ_D$bghch)UaowaFFM^_cGA$*G
z)2ph;(uaR1vfTv-`-l6tkEE7#D%}<*3dQKY4eYDN@TF*Jjtl6jM6`d`?^6Qid_SI!
zDrGL=5xhOIC<@4U3;4mXpr9zTeU?~Z%@yj`%;3IL#{qF69dHVbdl++!Byr)3rvW<|
zs46R0;h-%w2aXzQjxS3w&ZeXs4xi%L)sk8ZbWX1;Rz>9)9;PR5DI7YmWXS>Oc^
zZqI#IyAM@NH|?Sh<&OkNm-qIK9
z$b%UPf1#V_Xv%D2OR+IqW@hZUuuW&gv4^YkWO_^a_bmFl2hn3HMg{-EnRWRTs2Cj|
z9QLar>G=|J#6{I|dlN=W0_^#W+?gdPbK2D0NFF}NopdSuuZmpM_3Xu-PE*woWAJ_;
zmg;kJ?-uNCxiWItB7!kTTjNVhBE^%m5?1Dut&NzVZZ4Ov&&(cwExg?rC=62IGH
PK-DB: pharmacokinetics database for individualized and stratified computational modeling
- Grzegorzewski J, Brandhorst J, Green K, Eleftheriadou D, Duport Y, Barthorscht F, Köller A, Ke DYJ, De Angelis S, König M.
+ Grzegorzewski J, Brandhorst J, Green K, Eleftheriadou D, Duport Y, Bartsch F, Köller A, Ke DYJ, De Angelis S, König M.
Nucleic Acids Res. 2020 Nov 5:gkaa990. doi: 10.1093/nar/gkaa990. Epub ahead of print. PMID: 33151297
diff --git a/frontend/src/components/detail/CharacteristicaCard.vue b/frontend/src/components/detail/CharacteristicaCard.vue
index efb3e97f..33fc3df0 100644
--- a/frontend/src/components/detail/CharacteristicaCard.vue
+++ b/frontend/src/components/detail/CharacteristicaCard.vue
@@ -89,7 +89,7 @@
if (!this.data.count){
return 1; // individual has no count ? FIXME bug
} else {
- return this.data.count
+ return this.data.countO
}
},
subject_count(){
diff --git a/frontend/src/components/home/About.vue b/frontend/src/components/home/About.vue
index 676b4a8b..1726d727 100644
--- a/frontend/src/components/home/About.vue
+++ b/frontend/src/components/home/About.vue
@@ -17,6 +17,7 @@
+
If you have questions or feedback please contact
@@ -34,10 +35,11 @@
How to cite
- PK-DB: pharmacokinetics database for individualized and stratified computational modeling
- Grzegorzewski J, Brandhorst J, Green K, Eleftheriadou D, Duport Y, Barthorscht F, Köller A, Ke DYJ, De Angelis S, König M.
- bioRxiv 760884; doi: https://doi.org/10.1101/760884
+
+ PK-DB: pharmacokinetics database for individualized and stratified computational modeling
+ Grzegorzewski J, Brandhorst J, Green K, Eleftheriadou D, Duport Y, Bartsch F, Köller A, Ke DYJ, De Angelis S, König M.
Nucleic Acids Res. 2020 Nov 5:gkaa990. doi: 10.1093/nar/gkaa990. Epub ahead of print. PMID: 33151297
+
Licensing
diff --git a/frontend/src/components/lib/UserAvatar.vue b/frontend/src/components/lib/UserAvatar.vue
index 9dc63d2b..304bc025 100644
--- a/frontend/src/components/lib/UserAvatar.vue
+++ b/frontend/src/components/lib/UserAvatar.vue
@@ -62,6 +62,8 @@
image = 'danny_128.png';
} else if (this.initials === 'SD'){
image = 'sara_128.png';
+ } else if (this.initials === 'SB'){
+ image = 'balcisue_128.png';
}
} else if (this.username) {
image = 'user_128.png';
@@ -87,6 +89,8 @@
image = 'danny_128.png';
} else if (this.username === 'SaraD-hub'){
image = 'sara_128.png';
+ } else if (this.username === 'balcisue'){
+ image = 'balcisue_128.png';
}
}
return img_dir + image
From 88fbf55157f0ac502bc625513c08d00036b521ca Mon Sep 17 00:00:00 2001
From: Matthias Koenig
Date: Tue, 1 Dec 2020 20:39:58 +0100
Subject: [PATCH 10/26] bugfix regression
---
frontend/src/components/detail/CharacteristicaCard.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/components/detail/CharacteristicaCard.vue b/frontend/src/components/detail/CharacteristicaCard.vue
index 33fc3df0..c4ec1d9b 100644
--- a/frontend/src/components/detail/CharacteristicaCard.vue
+++ b/frontend/src/components/detail/CharacteristicaCard.vue
@@ -89,7 +89,7 @@
if (!this.data.count){
return 1; // individual has no count ? FIXME bug
} else {
- return this.data.countO
+ return this.data.count;
}
},
subject_count(){
From 878940bac70e1f70deeaf8077e9e4659dc3737ea Mon Sep 17 00:00:00 2001
From: Matthias Koenig
Date: Tue, 1 Dec 2020 22:47:51 +0100
Subject: [PATCH 11/26] bugfix user search
---
frontend/src/components/search/UserSearch.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/frontend/src/components/search/UserSearch.vue b/frontend/src/components/search/UserSearch.vue
index 82ed8cfe..26726b13 100644
--- a/frontend/src/components/search/UserSearch.vue
+++ b/frontend/src/components/search/UserSearch.vue
@@ -61,6 +61,7 @@ export default {
{"username": "adriankl", "first_name": "Adrian", "last_name": "Koeller",},
{"username": "dannythekey", "first_name": "Danny", "last_name": "Ke",},
{"username": "SaraD-hub", "first_name": "Sara", "last_name": "De Angelis",},
+ {"username": "balcisue", "first_name": "Sükrü", "last_name": "Balci",},
],
}
},
From ff52774b4bec2826fa7dd5ddbd1190c498703d18 Mon Sep 17 00:00:00 2001
From: Matthias Koenig
Date: Wed, 2 Dec 2020 01:17:40 +0100
Subject: [PATCH 12/26] Fix #689, bump django version
---
backend/requirements.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/requirements.txt b/backend/requirements.txt
index 71c0caaa..0fe2054a 100644
--- a/backend/requirements.txt
+++ b/backend/requirements.txt
@@ -5,7 +5,7 @@ json-logging>=1.2.6
psycopg2-binary>=2.8.5
# django
-Django == 3.1.3
+Django == 3.1.4
django-model-utils>=4.0.0
django-extra-fields>=3.0.0
django-storages>=1.9.1
From 5593f59dc0ff7db6dc2176fc14a970637f16219c Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Fri, 4 Dec 2020 15:54:04 +0100
Subject: [PATCH 13/26] closes 691, closes #192
---
backend/pkdb_app/data/serializers.py | 7 ++++++-
backend/pkdb_app/error_measures.py | 28 ++++++++++++-------------
backend/pkdb_app/outputs/serializers.py | 2 +-
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/backend/pkdb_app/data/serializers.py b/backend/pkdb_app/data/serializers.py
index 345ad3a7..f95a8745 100644
--- a/backend/pkdb_app/data/serializers.py
+++ b/backend/pkdb_app/data/serializers.py
@@ -70,9 +70,14 @@ def create(self, validated_data):
# subset_instance.save()
return subset_instance
+ def validate_shared(self, shared):
+ if isinstance(shared,str):
+ raise serializers.ValidationError({"shared": "Shared field has to be a list not a string.", "detail": shared})
+
+
def _validate_time(self, time):
if any(np.isnan(np.array(time))):
- raise serializers.ValidationError({"time": "no time points are allowed to be nan", "detail": time})
+ raise serializers.ValidationError({"time": "No time points are allowed to be nan", "detail": time})
def calculate_pks_from_timecourses(self, subset):
# calculate pharmacokinetics outputs
diff --git a/backend/pkdb_app/error_measures.py b/backend/pkdb_app/error_measures.py
index b24cbbe9..77b73bf9 100644
--- a/backend/pkdb_app/error_measures.py
+++ b/backend/pkdb_app/error_measures.py
@@ -6,16 +6,16 @@
cv is coefficient of variation. sd/mean
"""
import numpy as np
-import warnings
-
+def _is(value):
+ return value is not None and value is not np.nan
def calculate_sd(se, count, cv, mean):
"""Calculates standard deviation from other error measurements."""
sd = None
- is_se = sd is not None
- is_count = count is not None
- is_mean = mean is not None
- is_cv = cv is not None
+ is_se = _is(se)
+ is_count = _is(count)
+ is_mean = _is(mean)
+ is_cv = _is(cv)
if is_se and is_count:
sd = np.multiply(se, np.sqrt(count))
@@ -28,10 +28,10 @@ def calculate_se(sd, count, cv, mean):
"""Calculates SE from given fields."""
se = None
- is_sd = sd is not None
- is_count = count is not None
- is_mean = mean is not None
- is_cv = cv is not None
+ is_sd = _is(sd)
+ is_count = _is(count)
+ is_mean = _is(mean)
+ is_cv = _is(cv)
if is_sd and is_count:
se = np.true_divide(sd, np.sqrt(count))
@@ -44,10 +44,10 @@ def calculate_cv(sd, count, se, mean):
"""Calculates CV from given fields"""
cv = None
- is_sd = sd is not None
- is_count = count is not None
- is_mean = mean is not None
- is_se = se is not None
+ is_sd = _is(sd)
+ is_count = _is(count)
+ is_mean = _is(mean)
+ is_se = _is(se)
# mean can be zero, CV not calculatable, resulting in -inf/inf
# mean data must be cleaned before calculation
diff --git a/backend/pkdb_app/outputs/serializers.py b/backend/pkdb_app/outputs/serializers.py
index f1c0dbdc..7f4f8128 100644
--- a/backend/pkdb_app/outputs/serializers.py
+++ b/backend/pkdb_app/outputs/serializers.py
@@ -94,7 +94,7 @@ def to_internal_value(self, data):
data = self.retransform_map_fields(data)
data = self.to_internal_related_fields(data)
- self.validate_wrong_keys(data, additional_fields=OutputExSerializer.Meta.fields)
+ self.validate_wrong_keys(data, additional_fields=OutputSerializer.Meta.fields)
return super(serializers.ModelSerializer, self).to_internal_value(data)
def validate(self, attrs):
From e0bb6545218bebee1c4bc9f4981d39fe2a0bc02a Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Sun, 6 Dec 2020 17:01:17 +0100
Subject: [PATCH 14/26] error measures removed bug
---
backend/pkdb_app/error_measures.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backend/pkdb_app/error_measures.py b/backend/pkdb_app/error_measures.py
index 77b73bf9..7d998478 100644
--- a/backend/pkdb_app/error_measures.py
+++ b/backend/pkdb_app/error_measures.py
@@ -7,8 +7,11 @@
"""
import numpy as np
+
def _is(value):
return value is not None and value is not np.nan
+
+
def calculate_sd(se, count, cv, mean):
"""Calculates standard deviation from other error measurements."""
sd = None
From 18f3a818cce05b04f250893923d6f338519b6aff Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Mon, 7 Dec 2020 12:23:51 +0100
Subject: [PATCH 15/26] introduced a bug
---
backend/pkdb_app/outputs/serializers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/pkdb_app/outputs/serializers.py b/backend/pkdb_app/outputs/serializers.py
index 7f4f8128..f1c0dbdc 100644
--- a/backend/pkdb_app/outputs/serializers.py
+++ b/backend/pkdb_app/outputs/serializers.py
@@ -94,7 +94,7 @@ def to_internal_value(self, data):
data = self.retransform_map_fields(data)
data = self.to_internal_related_fields(data)
- self.validate_wrong_keys(data, additional_fields=OutputSerializer.Meta.fields)
+ self.validate_wrong_keys(data, additional_fields=OutputExSerializer.Meta.fields)
return super(serializers.ModelSerializer, self).to_internal_value(data)
def validate(self, attrs):
From 19b830a42535a6914a7c6cb77ad9731025914f34 Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Mon, 7 Dec 2020 13:45:40 +0100
Subject: [PATCH 16/26] closes #695
---
frontend/src/components/Data.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/src/components/Data.vue b/frontend/src/components/Data.vue
index bfa4284d..0abd4450 100644
--- a/frontend/src/components/Data.vue
+++ b/frontend/src/components/Data.vue
@@ -29,7 +29,7 @@ export default {
created() {
if(this.sid){
this.getStudy(this.sid, true)
- this.hide_search=false
+ this.hide_search=true
}else{
this.loading = false
}
From 47164fb6cd597473a41a4ff2eae32a6c0d0f99f9 Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Wed, 9 Dec 2020 23:23:36 +0100
Subject: [PATCH 17/26] better message on wrong field in outputs
---
backend/pkdb_app/outputs/serializers.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/pkdb_app/outputs/serializers.py b/backend/pkdb_app/outputs/serializers.py
index f1c0dbdc..1866add7 100644
--- a/backend/pkdb_app/outputs/serializers.py
+++ b/backend/pkdb_app/outputs/serializers.py
@@ -195,7 +195,7 @@ def to_internal_value(self, data):
[data.pop(field, None) for field in drop_fields]
data["outputs"] = outputs
data = self.transform_map_fields(data)
- self.validate_wrong_keys(data)
+ self.validate_wrong_keys(data, OutputSerializer.Meta.fields)
return super(serializers.ModelSerializer, self).to_internal_value(data)
def validate_label_map(self, value) -> None:
From 79e8ca26d62205d02c9938e7098298bb56c09af1 Mon Sep 17 00:00:00 2001
From: Matthias Koenig
Date: Sun, 13 Dec 2020 01:02:11 +0100
Subject: [PATCH 18/26] sorted options
---
backend/pkdb_app/info_nodes/documents.py | 20 +++++++-------------
backend/pkdb_app/info_nodes/models.py | 4 ++--
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/backend/pkdb_app/info_nodes/documents.py b/backend/pkdb_app/info_nodes/documents.py
index 61c8b3c0..8a782bec 100644
--- a/backend/pkdb_app/info_nodes/documents.py
+++ b/backend/pkdb_app/info_nodes/documents.py
@@ -41,16 +41,13 @@ class InfoNodeDocument(Document):
ntype = string_field('ntype')
dtype = string_field('dtype')
xrefs = ObjectField(
- properties=
- {
- "name": string_field("name"),
- "accession":string_field("accession"),
- "url":string_field("url")
-
- }, multi=True)
-
-
- # measurement type
+ properties={
+ "name": string_field("name"),
+ "accession": string_field("accession"),
+ "url": string_field("url")
+ },
+ multi=True
+ )
measurement_type = ObjectField(
properties={
"choices": ObjectField(
@@ -61,15 +58,12 @@ class InfoNodeDocument(Document):
"units": basic_object("units", multi=True)
}
)
- # substance
substance = ObjectField(
properties={
-
"chebi": string_field('chebi'),
"mass": string_field('mass'),
"charge": string_field('charge'),
"formula": string_field('formula'),
-
})
class Django:
diff --git a/backend/pkdb_app/info_nodes/models.py b/backend/pkdb_app/info_nodes/models.py
index 6f825bc9..5e9fb210 100644
--- a/backend/pkdb_app/info_nodes/models.py
+++ b/backend/pkdb_app/info_nodes/models.py
@@ -315,7 +315,7 @@ def validate_choice(self, choice):
self.info_node.DTypes.NumericCategorical]:
if not self.is_valid_choice(choice):
msg = f"The choice `{choice}` is not a valid choice for measurement type `{self.info_node.name}`. " \
- f"Allowed choices are: `{list(self.choices_list())}`."
+ f"Allowed choices are: `{sorted(self.choices_list())}`."
raise ValueError({"choice": msg})
return self.choices.get(info_node__name=choice)
else:
@@ -325,7 +325,7 @@ def validate_choice(self, choice):
raise ValueError({"choice": msg})
elif self.choices.exists():
msg = f"{choice}. A choice is required for `{self.info_node.name}`." \
- f" Allowed choices are: `{list(self.choices_list())}`."
+ f" Allowed choices are: `{sorted(self.choices_list())}`."
raise ValueError({"choice": msg})
@property
From e22acb0d253f3086ba8c1ea0e210ba5f331bb8cf Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Mon, 14 Dec 2020 15:54:57 +0100
Subject: [PATCH 19/26] closes #698
---
backend/pkdb_app/info_nodes/models.py | 2 +-
backend/pkdb_app/outputs/serializers.py | 2 +-
backend/pkdb_app/studies/models.py | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/backend/pkdb_app/info_nodes/models.py b/backend/pkdb_app/info_nodes/models.py
index 6f825bc9..6dd806e7 100644
--- a/backend/pkdb_app/info_nodes/models.py
+++ b/backend/pkdb_app/info_nodes/models.py
@@ -154,7 +154,7 @@ class MeasurementType(AbstractInfoNode):
NO_UNIT = 'NO_UNIT' # todo: remove NO_UNIT and add extra keyword or add an extra measurement_type with optional no units.
TIME_REQUIRED_MEASUREMENT_TYPES = ["cumulative amount", "cumulative metabolic ratio", "recovery",
- "auc_end"] # todo: remove and add extra keyword.
+ "auc_end", "ptf"] # todo: remove and add extra keyword.
CAN_NEGATIVE = [
"tmax" # tmax can be negative due to time offsets, i.e. pre-simulation with subsequent fall after intervention
# this often happens in placebo simulations
diff --git a/backend/pkdb_app/outputs/serializers.py b/backend/pkdb_app/outputs/serializers.py
index 1866add7..1b3118f7 100644
--- a/backend/pkdb_app/outputs/serializers.py
+++ b/backend/pkdb_app/outputs/serializers.py
@@ -29,7 +29,7 @@
from ..utils import list_of_pk, _validate_required_key, create_multiple, _create, create_multiple_bulk_normalized, \
create_multiple_bulk
-EXTRA_FIELDS = ["tissue", "method", "label","output_type"]
+EXTRA_FIELDS = ["tissue", "method", "label", "output_type"]
TIME_FIELDS = ["time", "time_unit"]
OUTPUT_FIELDS = EXTRA_FIELDS + TIME_FIELDS
diff --git a/backend/pkdb_app/studies/models.py b/backend/pkdb_app/studies/models.py
index 7c8fa792..5eccb424 100644
--- a/backend/pkdb_app/studies/models.py
+++ b/backend/pkdb_app/studies/models.py
@@ -78,6 +78,7 @@ def study_name(self):
return self.study.name
return ""
+
class Author(models.Model):
""" Author in reference. """
first_name = models.CharField(max_length=CHAR_MAX_LENGTH, blank=True)
From 09e6a2289ad8e35453d988662baed1bfde2a7cfe Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski
Date: Tue, 15 Dec 2020 11:34:01 +0100
Subject: [PATCH 20/26] closes #690
---
backend/pkdb_app/info_nodes/models.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/backend/pkdb_app/info_nodes/models.py b/backend/pkdb_app/info_nodes/models.py
index 5253b229..fe1dd44c 100644
--- a/backend/pkdb_app/info_nodes/models.py
+++ b/backend/pkdb_app/info_nodes/models.py
@@ -153,8 +153,15 @@ class MeasurementType(AbstractInfoNode):
)
NO_UNIT = 'NO_UNIT' # todo: remove NO_UNIT and add extra keyword or add an extra measurement_type with optional no units.
- TIME_REQUIRED_MEASUREMENT_TYPES = ["cumulative amount", "cumulative metabolic ratio", "recovery",
- "auc_end", "ptf"] # todo: remove and add extra keyword.
+ TIME_REQUIRED_MEASUREMENT_TYPES = [
+ "concentration",
+ "cumulative amount",
+ "metabolic_ratio",
+ "cumulative metabolic ratio",
+ "recovery",
+ "auc_end",
+ "ptf",
+ ] # todo: remove and add extra keyword.
CAN_NEGATIVE = [
"tmax" # tmax can be negative due to time offsets, i.e. pre-simulation with subsequent fall after intervention
# this often happens in placebo simulations
From 3d92ea449679c37a1051d0e67b9c2e8c113e8bd5 Mon Sep 17 00:00:00 2001
From: Jan Grzegorzewski |