Skip to content
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

API query usability questions and issues #87

Open
kairstenfay opened this issue Jul 11, 2019 · 4 comments
Open

API query usability questions and issues #87

kairstenfay opened this issue Jul 11, 2019 · 4 comments
Assignees
Labels
implementation strategy Long-term implementation strategy science Issues related to science behind the software

Comments

@kairstenfay
Copy link

kairstenfay commented Jul 11, 2019

Hey all,

Thanks for the work you've done so far in creating/hosting the modelling results API + the swagger interface for us to use.

Now that we're finally coming around to using it, I have a few questions/ideas I thought you may be able to help with.

  1. CORS issue (mentioned in Add a Cross-Origin Policy to the modelling API #86)
  2. Language of pathogens. These do not currently align with our target/organism definitions. Where can I see a list of all possible pathogens?
    Examples
  • I can match your Flu_A_H1 with our target name pretty easily, but other names are harder to interpret/match with your dataset. For example, I don't see any organism-level pathogen for Flu B/Vic or Flu B/Yam, just Flu_B_pan.

  • Does the all pathogen refer to any pathogen? Or does it refer to all samples including negative, untested, and unknown?

  1. modeled_intensity_mean is not a result in every model I found. Ideally we would be able to have mean, mode, sd, and 95% CI for every query.
  2. Can we get results for age outside of inla_observed models?
  3. Can we get results for sex?
  4. Can we get results for vaccination status?

For reference, I am currently formatting my queries as:

    {
      model_type: "inla_latent",
      observed: ["encountered_week", "residence_neighborhood_district_name"],
      pathogen: [pathogen],
      spatial_domain: "seattle_geojson_neighborhood_district_name"
    };

where pathogen is an interchangeable variable I set up on our own, local GET endpoint.

kairstenfay added a commit to seattleflu/genomic-incidence-tracker that referenced this issue Jul 11, 2019
This commit partially connects the viz prototype
with the IDM API through a proxy GET endpoint that
we host as part of our API. 

The IDM API cannot be fully integrated with this viz
until further design questions are considered. There
is a lot of data standardization that needs to be done
between IDM and ID3C to avoid lots of if/else or
branching logic as part of this app. 

Currently, the prototype is able to get modeled
results for `all` pathogens as well as Flu A H1 & H3. 
We are getting results for Seattle neighborhoods
only. We are not able to query or filter by age, sex, or
vaccination status. The time (Week) filter does not 
currently work in the app, but it should be able to be
integrated with React with the current data. 'Mean' is
not an available result for every pathogen model.

NOTE:
The bar chart and the map are not rendering the
information correctly. This is still a work in
progress that is being put aside until we 
collaborate further on the future of the
modeling results API. 

Please see [this GitHub 
issue](seattleflu/incidence-mapper#87)
for more context.
kairstenfay added a commit to seattleflu/genomic-incidence-tracker that referenced this issue Jul 11, 2019
This commit partially connects the viz prototype with the IDM API
through a proxy GET endpoint that we host as part of our API.

The IDM API cannot be fully integrated with this viz until further
design questions are considered. There is a lot of data standardization
that needs to be done between IDM and ID3C to avoid lots of if/else or
branching logic as part of this app.

Currently, the prototype is able to get modeled results for `all`
pathogens as well as Flu A H1 & H3. We are getting results for Seattle
neighborhoods only. We are not able to query or filter by age, sex, or
vaccination status. The time (Week) filter does not currently work in
the app, but it should be able to be integrated with React with the
current data. 'Mean' is not an available result for every pathogen
model.

NOTE:
The bar chart and the map are not rendering the information correctly.
This is still a work in progress that is being put aside until we
collaborate further on the future of the IDM modeling results API.

Please see [this GitHub
issue](seattleflu/incidence-mapper#87) for
more context.
@kairstenfay
Copy link
Author

@famulare
Copy link
Member

Thanks for useful questions. Some I can answer now, some need more attention.

  1. The targets are coming directly from this database view shipping.presence_absence_result_v1, which reflects the taqman array. That only has Flu_B_pan for example. If/when you derive more specific strains from sequencing, I'll need a database view with that info to merge with the encounter database. Also, all refers to all samples, including negatives.

  2. I can provide standardized list. In prototyping, mode is better behaved mathematically with smaller samples, and so please build around mode for the time being.

4-6) Yes, eventually, depending on how many layers deep we want to go. Right now, I'm just building some subsets because of memory limitations. Addressing this fits "before end of September" timeline for us, but I'll be able to think about it more next week in prep for Ad Board meeting, and so will get back to you with more useful comments then.

kairstenfay added a commit to seattleflu/genomic-incidence-tracker that referenced this issue Jul 11, 2019
This commit partially connects the viz prototype with the IDM API
through a proxy GET endpoint that we host as part of our API.

The IDM API cannot be fully integrated with this viz until further
design questions are considered. There is a lot of data standardization
that needs to be done between IDM and ID3C to avoid lots of if/else or
branching logic as part of this app.

Currently, the prototype is able to get modeled results for `all`
pathogens as well as Flu A H1 & H3. We are getting results for Seattle
neighborhoods only. We are not able to query or filter by age, sex, or
vaccination status. The time (Week) filter does not currently work in
the app, but it should be able to be integrated with React with the
current data. 'Mean' is not an available result for every pathogen
model.

NOTE:
The bar chart and the map are not rendering the information correctly.
This is still a work in progress that is being put aside until we
collaborate further on the future of the IDM modeling results API.

Please see [this GitHub
issue](seattleflu/incidence-mapper#87) for
more context.
@famulare famulare self-assigned this Jul 11, 2019
@kairstenfay
Copy link
Author

Thanks for the quick response, Mike. I did not realize that the targets are coming directly from shipping.presence_absence_result_v1. That is useful to know. I look forward to future discussions to elucidate how the moving pieces work together between ID3C (the Bedford lab) & IDM.

I don't think there's any rush in expanding the API. Brainstorming API design some time between the Ad Board meeting and the end of September should work for our timeline. I'll reach out if anything changes.

@tsibley
Copy link
Member

tsibley commented Jul 12, 2019

Re: target vs. organism: we only relatively recently mapped targets to organisms in ID3C. This is important as targets change and vary but detect the same pathogen. It also helps us roll up targets by a less-specific organism classification. So, at some point we should be shipping organism lineage in the modeling observation views instead of targets, and then the models can use them. List of those lineages is here: https://backoffice.seattleflu.org/metabase/question/292

@devclinton devclinton added implementation strategy Long-term implementation strategy science Issues related to science behind the software labels Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation strategy Long-term implementation strategy science Issues related to science behind the software
Projects
None yet
Development

No branches or pull requests

4 participants