diff options
author | Alexander Kabui | 2024-08-30 16:47:55 +0300 |
---|---|---|
committer | GitHub | 2024-08-30 16:47:55 +0300 |
commit | ed20621c23a9a41152f3d6a48334f2a31c018033 (patch) | |
tree | 5e2182b99f5f05e2f667dfce1b762921c4ec62dc /gn2/wqflask/show_trait | |
parent | 9a345d8abf2f0045b2c47bfcf1ae5860273452be (diff) | |
parent | 6db49002d4d2e69fcf4fdd6be6aceeea7b95664f (diff) | |
download | genenetwork2-ed20621c23a9a41152f3d6a48334f2a31c018033.tar.gz |
Merge pull request #861 from genenetwork/feature/gnqa-search-2
Feature/gnqa search 2
Diffstat (limited to 'gn2/wqflask/show_trait')
-rw-r--r-- | gn2/wqflask/show_trait/SampleList.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gn2/wqflask/show_trait/SampleList.py b/gn2/wqflask/show_trait/SampleList.py index 64fc8fe6..200ff793 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] @@ -131,7 +132,8 @@ class SampleList: "CaseAttribute, CaseAttributeXRefNew WHERE " "CaseAttributeXRefNew.CaseAttributeId = CaseAttribute.CaseAttributeId " "AND CaseAttributeXRefNew.InbredSetId = %s " - "ORDER BY CaseAttribute.CaseAttributeId", (str(self.dataset.group.id),) + "AND CaseAttribute.InbredSetId = %s " + "ORDER BY CaseAttribute.CaseAttributeId", (str(self.dataset.group.id),str(self.dataset.group.id)) ) self.attributes = {} |