-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Create JSON files for frontend consumption #29
base: master
Are you sure you want to change the base?
Conversation
This pull request creates a mapping from gene (as Entrez GeneIDs) to the list of mutated samples (as TCGA sample IDs). This dictionary/JSON obejct is called This pull request also creates The goal of The frontend would do the equivalent of this python in javascript: mutated_samples = set()
for mutation in mutations:
mutated_samples |= gene_to_mutated_samples[mutation]
selected_samples = set()
for disease in diseases:
selected_samples |= disease_to_samples[disease]
# counts
n_samples = len(selected_samples)
n_positives = len(selected_samples & mutated_samples)
n_negatives = n_samples - n_positives Alerting @bdolly, @awm33, @cgreene for discussion on how to proceed. My questions are:
|
Depends, I assume most people will be using this from a desktop with Wifi or a wired connection. So, from a pure transmitting bytes standpoint alone, no.
We can / should set up gzip compression on the server
If the correct headers are set by the server, yes. Other methods could be used as well, beyond HTTP caching, like localStorage.
Maybe. I'd be more worried about the access time. JavaScript is single threaded, if we were to calculate something like this client-side, I would use a web worker.
It's the access performance, which should be hashmaps in JS, I don't think that would buy you much, if anything.
I would lean towards this for performance and API reasons. If we are also thinking of others using our API, this would make it easier for them. We're already using the django filter plugin which allows for querying on related model fields. This would be added to the |
@awm33 so I like the idea of using the |
@bdolly Cool I created an issue/task for this cognoma/core-service#33 |
Work in progress (WIP).