aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/anon_collection.py
diff options
context:
space:
mode:
authorzsloan2018-05-17 16:32:44 +0000
committerzsloan2018-05-17 16:32:44 +0000
commit67e8f12e103f48329d8b3e38125c0e84b9dc089d (patch)
tree067d4bcb5b6469b81cbd4c4f68d00f656a02a465 /wqflask/base/anon_collection.py
parent42df24ad10354f28215ff52ff045538fea566940 (diff)
downloadgenenetwork2-67e8f12e103f48329d8b3e38125c0e84b9dc089d.tar.gz
Added script to quantile normalize a data set and enter its normalized sample data into ElasticSearch
Added option to replace trait page sample/strain values with normalized ones Began editing Lei's scatterplot code Changed elasticsearch_tools' get_elasticsearch_connection so that it can also be used for purposes other than user authentication (by adding a "for_user" parameter)
Diffstat (limited to 'wqflask/base/anon_collection.py')
-rw-r--r--wqflask/base/anon_collection.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/wqflask/base/anon_collection.py b/wqflask/base/anon_collection.py
deleted file mode 100644
index dd1aa27f..00000000
--- a/wqflask/base/anon_collection.py
+++ /dev/null
@@ -1,22 +0,0 @@
-class AnonCollection(TraitCollection):
-
- def __init__(self, anon_id):
- self.anon_id = anon_id
- self.collection_members = Redis.smembers(self.anon_id)
- print("self.collection_members is:", self.collection_members)
- self.num_members = len(self.collection_members)
-
-
- @app.route("/collections/remove", methods=('POST',))
- def remove_traits(traits_to_remove):
- print("traits_to_remove:", traits_to_remove)
- for trait in traits_to_remove:
- Redis.srem(self.anon_id, trait)
-
- members_now = self.collection_members - traits_to_remove
- print("members_now:", members_now)
- print("Went from {} to {} members in set.".format(len(self.collection_members), len(members_now)))
-
- # We need to return something so we'll return this...maybe in the future
- # we can use it to check the results
- return str(len(members_now))