aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/data_set.py
diff options
context:
space:
mode:
authorzsloan2020-03-27 16:32:08 -0500
committerzsloan2020-03-27 16:32:08 -0500
commit0e240cbfc6034b65b42c2d21f59ae2663dd2f6ec (patch)
treeb7b8930b379440033893e77acfbe371f23994d25 /wqflask/base/data_set.py
parent2511934d7259bd9f377ec9585bcf285a46c4de17 (diff)
downloadgenenetwork2-0e240cbfc6034b65b42c2d21f59ae2663dd2f6ec.tar.gz
Added integration for using RData files with R/qtl, plus some other changes to how it decides which mapping methods to display on the trait page
Diffstat (limited to 'wqflask/base/data_set.py')
-rw-r--r--wqflask/base/data_set.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 7fe9a8ac..abfdd277 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -307,9 +307,11 @@ class DatasetGroup(object):
mapping_id = g.db.execute("select MappingMethodId from InbredSet where Name= '%s'" % self.name).fetchone()[0]
if mapping_id == "1":
- mapping_names = ["QTLReaper", "R/qtl"]
+ mapping_names = ["GEMMA", "QTLReaper", "R/qtl"]
elif mapping_id == "2":
- mapping_names = ["GEMMA"]
+ mapping_names = []
+ elif mapping_id == "3":
+ mapping_names = ["R/qtl"]
elif mapping_id == "4":
mapping_names = ["GEMMA", "PLINK"]
else:
@@ -392,7 +394,10 @@ class DatasetGroup(object):
# reaper barfs on unicode filenames, so here we ensure it's a string
if self.genofile:
- full_filename = str(locate(self.genofile, 'genotype'))
+ if "RData" in self.genofile: #ZS: This is a temporary fix; I need to change the way the JSON files that point to multiple genotype files are structured to point to other file types like RData
+ full_filename = str(locate(self.genofile.split(".")[0] + ".geno", 'genotype'))
+ else:
+ full_filename = str(locate(self.genofile, 'genotype'))
else:
full_filename = str(locate(self.name + '.geno', 'genotype'))