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

Client side NeuroML-DB #115

Open
russelljjarvis opened this issue Apr 11, 2019 · 1 comment
Open

Client side NeuroML-DB #115

russelljjarvis opened this issue Apr 11, 2019 · 1 comment

Comments

@russelljjarvis
Copy link
Collaborator

russelljjarvis commented Apr 11, 2019

I want to use NeuroML-DB to download some waveforms from a model to do NeuronUnit testing.

I want to do something like querying the DB like in the following but without downloading, and installing the repository locally.

# Get the remaining cell properties
cells = list(Cells\
    .select(Cells,Model_Waveforms.Spikes,Models.Name)\
    .join(Model_Waveforms, on=(Cells.Model_ID == Model_Waveforms.Model_id))\
    .join(Models, on=(Cells.Model_ID == Models.Model_ID))\
    .where((Model_Waveforms.Protocol == "STEADY_STATE") & (Model_Waveforms.Variable_Name == "Voltage"))\
    .order_by(Cells.Model_ID)
    .objects()
)

If I open this web page and follow the json
https://neuroml-db.org/api/model?id=NMLCL001129

I can find the field ID after a lot of reading, although it's easy to get lost, as there are a lot of ID's, and finding the right ID requires searching for a landmark ID, like publication, and working your way forwards a bit. I found this waveform using that method: https://neuroml-db.org/api/waveform?id=398144

I wonder if there could be some kind of syntactic sugar for getting a list of all the appropriate waveform IDs, and making the proper json requests inside python?

@russelljjarvis russelljjarvis changed the title waveform ID? Client side NeuroML-DB Apr 11, 2019
@JustasB
Copy link
Collaborator

JustasB commented Apr 11, 2019

If you're using Chrome, this plugin makes it easier to read JSON responses. You might find similar plugins for other browsers.

Then, using the plugin, collapse all other child elements, and just leave the "waveform_list" open:

image

Let me know if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants