aboutsummaryrefslogtreecommitdiff
path: root/gn2
diff options
context:
space:
mode:
authorzsloan2024-05-22 19:58:50 +0000
committerzsloan2024-05-22 19:58:50 +0000
commiteb649f3e2671cb9a8a9b95d301d6ed4cc40c0656 (patch)
tree7720f8e38357a6f6f6c81a9a37eeb14928c30ba2 /gn2
parent1d720241036f4c0a44bf79e2b39f822a0f042a29 (diff)
downloadgenenetwork2-eb649f3e2671cb9a8a9b95d301d6ed4cc40c0656.tar.gz
Check if case attribute for RRID is a list, to prevent it being added twice in situations where a sample appears in both the parent/f1 file and the .geno file
Diffstat (limited to 'gn2')
-rw-r--r--gn2/wqflask/show_trait/SampleList.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gn2/wqflask/show_trait/SampleList.py b/gn2/wqflask/show_trait/SampleList.py
index 64fc8fe6..64909d6e 100644
--- a/gn2/wqflask/show_trait/SampleList.py
+++ b/gn2/wqflask/show_trait/SampleList.py
@@ -81,7 +81,8 @@ class SampleList:
sample.extra_attributes['36'].append(
webqtlConfig.RRID_MOUSE_URL % the_rrid)
elif self.dataset.group.species == "rat":
- if len(rrid_string):
+ # Check if it's a list just in case a parent/f1 strain also shows up in the .geno file, to avoid being added twice
+ if len(rrid_string) and not isinstance(sample.extra_attributes['36'], list):
the_rrid = rrid_string.split("_")[1]
sample.extra_attributes['36'] = [
rrid_string]