aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask
diff options
context:
space:
mode:
authorzsloan2024-05-22 19:58:50 +0000
committerAlexander_Kabui2024-08-28 15:02:45 +0300
commit31c8f14df9f354ea3cef82c28ce3d9006d424b65 (patch)
tree2802edb1296ca8bfdabd68b011996db6d29e4b0a /gn2/wqflask
parent8734f97b1d2c6dd20ec42de513009252d214f38b (diff)
downloadgenenetwork2-31c8f14df9f354ea3cef82c28ce3d9006d424b65.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/wqflask')
-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]