aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorZachary Sloan2013-08-13 18:23:05 -0500
committerZachary Sloan2013-08-13 18:23:05 -0500
commit6379959af53b2ec595b85ccdc099c6f14adf0381 (patch)
tree93b73985117dfb58d41ef059834582e120dbcf59 /wqflask/base
parentf155e26112f088c908c0654a57a40ff1f8fe23cc (diff)
downloadgenenetwork2-6379959af53b2ec595b85ccdc099c6f14adf0381.tar.gz
Added several test files and the file with the class that
they import (browser_test.py)
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 017c6052..091433a6 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -168,7 +168,8 @@ class Markers(object):
for marker, p_value in itertools.izip(self.markers, p_values):
marker['p_value'] = p_value
- print("p_value is:", marker['p_value'])
+ if math.isnan(marker['p_value']):
+ print("p_value is:", marker['p_value'])
marker['lod_score'] = -math.log10(marker['p_value'])
#Using -log(p) for the LRS; need to ask Rob how he wants to get LRS from p-values
marker['lrs_value'] = -math.log10(marker['p_value']) * 4.61
@@ -436,7 +437,7 @@ class DataSet(object):
except TypeError:
print("Dataset {} is not yet available in GeneNetwork.".format(self.name))
pass
-
+
def get_trait_data(self):
self.samplelist = self.group.samplelist + self.group.parlist + self.group.f1list
query = """
@@ -493,12 +494,12 @@ class DataSet(object):
if self.type == "Publish":
query += """
- WHERE {}XRef.InbredSetId = {}Freeze.InbredSetId
+ WHERE {}XRef.PublicationId = {}Freeze.Id
and {}Freeze.Name = '{}'
- and {}.Id = {}XRef.PhenotypeId
+ and {}.Id = {}XRef.{}Id
order by {}.Id
- """.format(*mescape(self.type, self.type, self.type, self.name,
- dataset_type, self.type, dataset_type ))
+ """.format(*mescape(self.type, self.type, self.type, self.type,
+ self.name, dataset_type, self.type, self.type, dataset_type))
else:
query += """
WHERE {}XRef.{}FreezeId = {}Freeze.Id