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

Update OpenWormReader to use the latest version of PyOpenWorm (pt 1) #10

Open
mwatts15 opened this issue Jun 25, 2018 · 6 comments
Open

Comments

@mwatts15
Copy link
Contributor

As a first approximation, can just hard-code
<http://openworm.org/entities/bio#worm0>
as the context to query against (it's sort of the 'top-level' context
produced by insert_worm.py into the OpenWormData repo). Will be modified in
owupd1 to its final form.

@mwatts15 mwatts15 changed the title Update OpenWormReader to use the latest version of PyOpenWorm Update OpenWormReader to use the latest version of PyOpenWorm (pt 1) Jun 28, 2018
@pgleeson
Copy link
Member

pgleeson commented Feb 6, 2019

@mwatts15 I've updated https://github.com/openworm/c302/blob/master/c302/OpenWormReader.py to be runnable with:

python c302/OpenWormReader.py 

similarly to

 python c302/UpdatedSpreadsheetDataReader.py

which reads directly from the latest spreadsheet. This works with the version of PyOpenWorm we use in the Docker installation: https://github.com/openworm/OpenWorm/blob/development/Dockerfile#L105, but not the latest in the dev branch...

@mwatts15
Copy link
Contributor Author

mwatts15 commented Feb 7, 2019

There are a couple things to update:

  1. There's a reference to files in the CElegansNeuroML directory structure? I see the cell names coming from there are used to filter what OpenWormReader returns, but that's a misuse -- if there's a specific subset of cells c302 needs to use, then that subset should be written into the graph or the list should be filtered outside of the reader. I've just removed the filtering for now
  2. The database has to be explicitly cloned now. I've done it manually but it should be written in the c302 README somewhere.

@pgleeson
Copy link
Member

pgleeson commented Feb 7, 2019

@mwatts15 I've taken out all of those references to the files in the other CElegansNeuroML repo in the latest commit, which doesn't seem to have been merged into your branch: a804997#diff-4dca74f5e9f27a6180a8aa5606bf514cL25.

Not sure what you mean by "The database has to be explicitly cloned now". Can't this be a step integrated in an updated setup.py for PyOpenWorm?

@mwatts15
Copy link
Contributor Author

mwatts15 commented Feb 7, 2019

@mwatts15 I've taken out all of those references to the files in the other CElegansNeuroML repo in the latest commit, which doesn't seem to have been merged into your branch: a804997#diff-4dca74f5e9f27a6180a8aa5606bf514cL25.

Thanks. Why not use the logging module in the initializer? When I use OpenWormReader outside of that script, wouldn't I generally want the option to quiet its output?

Not sure what you mean by "The database has to be explicitly cloned now". Can't this be a step integrated in an updated setup.py for PyOpenWorm?

You run a command pow clone <github-repo> which creates a .pow directory under your current working directory. Not doing that as part of the PyOpenWorm setup.py script is a design decision that we can chat about, but I don't think comment thread is the place.

@pgleeson
Copy link
Member

pgleeson commented Feb 7, 2019

I've just used the simpler print_() statement to make it easier to follow logs across c302/pyNeuroML/libNeuroML etc. e.g.

...
c302      >>>  Generating plots for: Membrane potentials of 14 neuron(s) (Oscillator C0)
pyNeuroML >>> Generating plot: Membrane potentials of 14 neuron(s) (Oscillator C0)
c302      >>>  Plotting neuron activities ([Ca2+])
...

I know they could all be updated to use logger, but hope you can live with it for now...

Re the database, will try that. I assume pow is an executable created when PyOpenWorm is installed? Any issue with this overwriting a system command pow for calculating powers?

@mwatts15
Copy link
Contributor Author

mwatts15 commented Feb 8, 2019

Yes, pow is installed with PyOpenWorm. I don't know of any GNU or Unix utility called pow, but probably users can resolve any namespace conflicts themselves.

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