aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance
diff options
context:
space:
mode:
authorZachary Sloan2013-04-23 21:37:55 +0000
committerZachary Sloan2013-04-23 21:37:55 +0000
commit8810c7735ed8a1bfa225449f7b388438e2ace890 (patch)
tree4b35d24664c463d2f63a209e8abeeced67311919 /wqflask/maintenance
parent184c763c55e9399eefaa2fa2ad7e663e39acddaf (diff)
downloadgenenetwork2-8810c7735ed8a1bfa225449f7b388438e2ace890.tar.gz
Created file correlation_plot.py for the correlation scatterplot
Reverted temp_data.py to previous version that doesn't include the "part" input (for chunks) Made change to lmm related to splitting main iterator into chunks Deleted a bunch of unnecessary commented out code from show_trait.py
Diffstat (limited to 'wqflask/maintenance')
-rw-r--r--wqflask/maintenance/quick_search_table.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/wqflask/maintenance/quick_search_table.py b/wqflask/maintenance/quick_search_table.py
index d175e600..046a05c4 100644
--- a/wqflask/maintenance/quick_search_table.py
+++ b/wqflask/maintenance/quick_search_table.py
@@ -42,7 +42,7 @@ Metadata.bind = Engine
class PublishXRef(Base):
__tablename__ = 'PublishXRef'
-
+
Id = sa.Column(sa.Integer, primary_key=True)
InbredSetId = sa.Column(sa.Integer, primary_key=True)
PhenotypeId = sa.Column(sa.Integer)
@@ -53,7 +53,7 @@ class PublishXRef(Base):
additive = sa.Column(sa.Float)
Sequence = sa.Column(sa.Integer)
comments = sa.Column(sa.Text)
-
+
@classmethod
def run(cls):
conn = Engine.connect()
@@ -69,7 +69,7 @@ class PublishXRef(Base):
conn.execute(ins)
counter += 1
print("Done:", counter)
-
+
@staticmethod
def get_unique_terms(publishxref_id, inbredset_id):
results = Session.query(
@@ -114,7 +114,7 @@ class PublishXRef(Base):
continue
unique.add(token)
- print("\nUnique terms are: {}\n".format(unique))
+ #print("\nUnique terms are: {}\n".format(unique))
return " ".join(unique)
@staticmethod
@@ -155,12 +155,12 @@ class PublishXRef(Base):
#"Geno.SpeciesId = Species.Id and "
#"Geno.Name = PublishXRef.Locus ").params(publishxref_id=publishxref_id,
# inbredset_id=inbredset_id).all()
- for result in results:
- print("****", result)
+ #for result in results:
+ # print("****", result)
assert len(set(result for result in results)) == 1, "Different results or no results"
- print("results are:", results)
+ #print("results are:", results)
result = results[0]
result = row2dict(result)
try:
@@ -214,7 +214,7 @@ class GenoXRef(Base):
"FROM Geno "
"WHERE Geno.Id = :geno_id ").params(geno_id=geno_id).all()
- print("results: ", pf(results))
+ #print("results: ", pf(results))
unique = set()
if len(results):
@@ -234,7 +234,7 @@ class GenoXRef(Base):
continue
unique.add(token)
- print("\nUnique terms are: {}\n".format(unique))
+ #print("\nUnique terms are: {}\n".format(unique))
return " ".join(unique)
@@ -271,11 +271,11 @@ class GenoXRef(Base):
"InbredSet.Id = GenoFreeze.InbredSetId and "
"InbredSet.SpeciesId = Species.Id ").params(geno_id=geno_id,
dataset_id=dataset_id).all()
- for result in results:
- print(result)
+ #for result in results:
+ # print(result)
assert len(set(result for result in results)) == 1, "Different results"
- print("results are:", results)
+ #print("results are:", results)
result = results[0]
result = row2dict(result)
try:
@@ -366,7 +366,7 @@ class ProbeSetXRef(Base):
continue
unique.add(token)
- print("\nUnique terms are: {}\n".format(unique))
+ #print("\nUnique terms are: {}\n".format(unique))
return " ".join(unique)
@@ -420,14 +420,14 @@ class ProbeSetXRef(Base):
"ProbeFreeze.InbredSetId = InbredSet.Id and "
"InbredSet.SpeciesId = Species.Id ").params(probeset_id=probeset_id,
dataset_id=dataset_id).all()
- for result in results:
- print("-", result)
+ #for result in results:
+ # print("-", result)
if len(set(result for result in results)) != 1:
return None
#assert len(set(result for result in results)) == 1, "Different results"
- print("results are:", results)
+ #print("results are:", results)
result = results[0]
result = row2dict(result)
try: