aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorLei Yan2013-06-25 21:50:53 +0000
committerLei Yan2013-06-25 21:50:53 +0000
commit54ce9aec126d8d642755c709e0d6b3dc50a91d29 (patch)
treeb3df8f299215e26fd95137367955d5dbe5d8868c /wqflask/base
parent615b861dfd05c04df2e1a753dd135b07c1d88a94 (diff)
parenta0a1d8b70e02871328fb044c7ae190f805b0a04e (diff)
downloadgenenetwork2-54ce9aec126d8d642755c709e0d6b3dc50a91d29.tar.gz
Merge git://github.com/zsloan/genenetwork into flask
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py12
-rwxr-xr-xwqflask/base/trait.py2
-rwxr-xr-xwqflask/base/webqtlConfig.py2
3 files changed, 8 insertions, 8 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 07fe9cd9..1668940c 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -779,14 +779,14 @@ class MrnaAssayDataSet(DataSet):
#Max LRS and its Locus location
if this_trait.lrs and this_trait.locus:
- self.cursor.execute("""
+ query = """
select Geno.Chr, Geno.Mb from Geno, Species
- where Species.Name = '%s' and
- Geno.Name = '%s' and
+ where Species.Name = '{}' and
+ Geno.Name = '{}' and
Geno.SpeciesId = Species.Id
- """ % (species, this_trait.locus))
- result = self.cursor.fetchone()
-
+ """.format(species, this_trait.locus)
+ result = g.db.execute(query).fetchone()
+
if result:
#if result[0] and result[1]:
# lrs_chr = result[0]
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 3429d9c1..401b729c 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -30,7 +30,7 @@ class GeneralTrait(object):
def __init__(self, get_qtl_info=False, **kw):
# xor assertion
- assert bool(kw.get('dataset')) != bool(kw.get('dataset_name')), "Needs dataset ob. xor name";
+ assert bool(kw.get('dataset')) != bool(kw.get('dataset_name')), "Needs dataset ob. or name";
if kw.get('dataset_name'):
self.dataset = create_dataset(kw.get('dataset_name'))
else:
diff --git a/wqflask/base/webqtlConfig.py b/wqflask/base/webqtlConfig.py
index 49afb631..a811c3cd 100755
--- a/wqflask/base/webqtlConfig.py
+++ b/wqflask/base/webqtlConfig.py
@@ -52,7 +52,7 @@ ENSEMBLETRANSCRIPT_URL="http://useast.ensembl.org/Mus_musculus/Lucene/Details?sp
SECUREDIR = GNROOT + 'secure/'
COMMON_LIB = GNROOT + 'support/admin'
HTMLPATH = GNROOT + 'web/'
-PYLMM_PATH = HTMLPATH + 'plink/'
+PYLMM_PATH = '/home/zas1024/'
SNP_PATH = '/mnt/xvdf1/snps/'
IMGDIR = HTMLPATH +'image/'
IMAGESPATH = HTMLPATH + 'images/'