openworm / OpenWorm

Repository for the main Dockerfile with the OpenWorm software stack and project-wide issues
http://openworm.org
MIT License
2.65k stars 206 forks source link

Create a quickstart guide to the NeuroML connectome with neuroConstruct #93

Closed slarson closed 10 years ago

slarson commented 11 years ago

We have a wiki page that explains how to get started with the NeuroML connectome:

https://github.com/openworm/OpenWorm/wiki/Running-the-C.-elegans-model-in-neuroConstruct

The instructions are still too complicated because they involve too many steps of installation. Ideally we would have a single zip file that contains:

after unzipping, the user could start at this step:

https://github.com/openworm/OpenWorm/wiki/Running-the-C.-elegans-model-in-neuroConstruct#open-the-project

and it would work. Non-programmers could probably reasonable do this if it were this simple.

We could add this zip file to the downloads page and then link to the revised quick start guide.

Steps to get there:

rayner commented 10 years ago

I could have a go at this.

I also noticed that there are a couple of software dependencies that the current installation instructions don't mention (e.g. the "ant run" step requires the JDK, which wasn't automatically installed as a dependency when I installed Ant from the Ubuntu package manager). It'd be good to figure out a way to deal with that, or at least mention it at the start of the instructions so people don't get stuck during the installation.

Neurophile commented 10 years ago

Forum thread with my Windows-specific software stack https://groups.google.com/forum/#!topic/openworm-discuss/yfDda6Ub1OA Should be easy to adapt to other platforms. I will be transitioning to OS X next week so I can provide feedback on any peculiarities with a mac install.

rayner commented 10 years ago

That's a useful resource, thanks!

I'm on Ubuntu 12.04 and Windows 7 here, so I'm grateful for any help and info regarding getting it working on OS X.

rayner commented 10 years ago

Okay, I've packaged neuroConstruct and the C. Elegans project together, written a README file and a fairly basic installation script, and put the resulting zipfile up on Dropbox here: https://www.dropbox.com/s/wzem2isez33966m/CElegansNeuroConstructBundle-snapshot-20131102.zip

The only prerequisite is the JDK. I also needed to set up my PATH environment variable on Windows to include the Java bin/ directory.

It seems to work okay on Ubuntu 12 and Windows 7. I guess the next step is to ask people to try it out on other platforms, and report any problems or platform-specific requirements they encounter.

slarson commented 10 years ago

Thanks for doing this! I will check this out. You've got access to update the wiki now -- if you could update information on there that would be excellent!

slarson commented 10 years ago

@pgleeson -- you might be interested to check out @rayner 's bundle here and see if it works for you -- I will be doing the same

rayner commented 10 years ago

Thanks for that! I've updated the wiki page with the revised installation instructions, and I've also created a pull request for the changes to the downloads page.

slarson commented 10 years ago

@rayner this is really great. I just downloaded and installed this on Mac -- neuroConstruct loaded up for me rapidly. It is excellent that the CElegans NeuroML is in the bundle to load up immediately! Great work!

One challenge I ran into after I had loaded up CElegans.ncx, I went to the generate tab and hit the "generate cells and positions" button. This worked fine. However when I went to the Visualization tab and hit the "view" button, I got an error on my device trying to find some graphics libraries.

I'm thinking maybe the version of neuroConstruct is too bleeding edge? @pgleeson does this bug look familiar?

rayner commented 10 years ago

@slarson Thank you for trying it out and reporting on what happened -- it's really useful to get feedback.

I'm trying to figure out the cause of the error you encountered, and there are a couple of pieces of information that would be helpful:

Under "Help -> Java & System Properties" in neuroConstruct, what version number does it report on the "java.version" line?

Do you have a fully-working installation of neuroConstruct on that machine? If so, could you let me know what version of neuroConstruct that one is, and what value that one gives for "java.version"?

Thanks!

slarson commented 10 years ago

Here's what I've got:

screen shot 2013-12-30 at 2 07 07 pm

I haven't run another version of neuroConstruct in a few months and my environment may have changed. Upgrading to Java 7 may have played a role in this. I will need to look into trying to load up a different one to ensure it works.

rayner commented 10 years ago

Thanks for that. The neuroConstruct code that's throwing the exception hasn't been changed for almost two years, so it doesn't look like a recent change there is to blame (although if you have a few minutes to try an older version just to make absolutely sure it's the environment and not neuroConstruct itself, that would certainly be helpful).

I suspect you're right about the upgrade to Java 7. I've found a few similar bug reports, most of them relating to Java 7 on Mac OS X. For example: https://bugs.openjdk.java.net/browse/JDK-7124426 https://groups.google.com/forum/#!topic/autoplot/ohOkQyoAuh0 http://s4462.socode.info/question/51501ad4e8432c04260daa95

Unfortunately the only suggested solution I can find is "use Java 6 instead". If this is the same bug, I'm not sure how to mitigate it, beyond adding it to a "known issues" section of the relevant README files. @pgleeson, what do you think?

pgleeson commented 10 years ago

This seems to be an issue with compatibility of the Java3D libraries I bundle with neuroConstruct and Mac OS X. See here for more: http://stackoverflow.com/questions/12738469/java3d-not-working-on-mac-mountain-lion. @borismarin (and I think @tarelli) have had problems too with nC on the latest versions of Mac.

Various parts of Java3D have been static for some time but now new versions of operating systems are catching up on it. As outlined in the link above, there's a port of Java3D being worked on using the latest JOGL libraries (see Java3D here: http://jogamp.org/jogl/www/). @borismarin and I will have a look this week to see if this could be used in nC, but there may be some issues with Java 7 still on Mac.

So in short, probably not an issue with @rayner's bundle, just issues with Java3D and latest Macs, which I'd definitely like to sort out.

borismarin commented 10 years ago

There's a new neuroconstruct branch which uses up-to-date j3d/jogl jars, and is supposed to work with java7 on macs. For the time being, it has been tested (and works) with

Testers are welcome!

rayner commented 10 years ago

Thanks, that's useful to know!

Unfortunately, I ran into some problems while testing the jogamp_j3d branch of neuroConstruct with Java 7 on Windows 7.

The steps to replicate the error are:

  1. Run neuroConstruct from the command line using nC.bat
  2. Open the CElegans.ncx project.
  3. Go to the "Generate" tab, and click the "Generate cells and connections" button.
  4. Go to the "Visualization" tab and click "View". This error appears in the terminal window: https://gist.github.com/rayner/8289619

If I follow the same steps using the master branch, it correctly generates the 3D visualization. Also, both the master branch and the jogamp_j3d branch work correctly for me on Linux with Java 6.

Please let me know if I can provide any further information that might be useful. I'm also happy to help with any future testing on Linux or Windows.

borismarin commented 10 years ago

@rayner thanks for the feedback! I have now updated nC.bat to cope with the new jars, but unfortunately (or fortunately for some) I don't have a windows box to test it. Could you fetch it from the jogamp_j3d branch and test again, please? I will also add a checkbox for windows tests to the post above =)

On 6 January 2014 21:14, Rayner Lucas notifications@github.com wrote:

Thanks, that's useful to know!

Unfortunately, I ran into some problems while testing the jogamp_j3d branch of neuroConstruct with Java 7 on Windows 7.

The steps to replicate the error are:

  1. Run neuroConstruct from the command line using nC.bat
  2. Open the CElegans.ncx project.
  3. Go to the "Generate" tab, and click the "Generate cells and connections" button.
  4. Go to the "Visualization" tab and click "View". This error appears in the terminal window: https://gist.github.com/rayner/8289619

If I follow the same steps using the master branch, it correctly generates the 3D visualization. Also, both the master branch and the jogamp_j3d branch work correctly for me on Linux with Java 6.

Please let me know if I can provide any further information that might be useful. I'm also happy to help with any future testing on Linux or Windows.

— Reply to this email directly or view it on GitHubhttps://github.com/openworm/OpenWorm/issues/93#issuecomment-31687650 .

rayner commented 10 years ago

Thanks for the fast response! I have tested again on Windows 7 with Java 7, and Linux with Java 6. The jogamp_j3d branch now correctly generates the 3D visualization on both platforms :)

If someone with a Mac can confirm that it also works on OS X with Java 7, then I can make a new version of the bundle that works for more people. @slarson, would you be willing to install it and check?

borismarin commented 10 years ago

I am currently working on it (osx/java7). I have managed to get it working (finally!), but with more recent jars for jogl stuff. I am performing some more tests, and will keep you up to date.

On 6 January 2014 22:15, Rayner Lucas notifications@github.com wrote:

Thanks for the fast response! I have tested again on Windows 7 with Java 7, and Linux with Java 6. The jogamp_j3d branch now correctly generates the 3D visualization on both platforms :)

If someone with a Mac can confirm that it also works on OS X with Java 7, then I can make a new version of the bundle that works for more people. @slarson https://github.com/slarson, would you be willing to install it and check?

— Reply to this email directly or view it on GitHubhttps://github.com/openworm/OpenWorm/issues/93#issuecomment-31693320 .

borismarin commented 10 years ago

@rayner @pgleeson ok, I've committed new jars which work with osx/java7. It would be good (sorry to abuse) to test it under windows again.

The only caveat with osx is that the (old, useless) apple pre bundled j3d libs need to be removed in order for the new ones to work. In my case, they were in /System/Library/Java/Extensions . It may be possible to use -Xbootclasspath in nC.sh|bat/build.xml to override these "system" extensions, without the need for deleting them. I will try it tomorrow.

There are also some annoying bugs with the gl canvas placement in osx, so whenever the window is resized/maximized you have to change tab or toggle "transparent mode" to get the canvas back in place… It would be nice to file a bug with the jogamp people (it seems to come from jogl, not j3d)

edit: working on ubuntu + oracle java 7 please tick boxes above upon successful tests

borismarin commented 10 years ago

Ok, I can confirm that the current version works with osx mavericks / java7u45. For this version -- which is the most up to date oracle jdk as of Jan 2014, there is no need to remove any system j3d jars, and the canvas placement bug discussed above is not present!

rayner commented 10 years ago

I can also confirm that the latest version works on Windows 7 with Java 7, and on Linux with Java 6. Excellent job, thanks!

As we now have a working version on all three platforms, I'll go ahead and make an updated version of the bundle now. I'll reply again when I've uploaded it.

borismarin commented 10 years ago

BTW, I've added a shell script to fetch precompiled jars from the current jogamp distribution, overwriting the ones that we are bundling. Noteworthy that our home-built versions are currently working better than their stable release in respect to the canvas placement bugs (at least for osx). In other words, I do not currently recommend running update_j3d.sh , but it is there for the future generations, as building the jars ourselves is tedious.

rayner commented 10 years ago

Great, that sounds potentially useful for the future.

I've created a new zip file and uploaded it, and updated the download links to point to it. The Dropbox URL is https://www.dropbox.com/s/xdu1bh5sq2x1nx6/CElegansNeuroConstructBundle-snapshot-20140107.zip

Inchinn commented 10 years ago

Hi, I am trying to get neuroconstruct to work on a mac running 10.7.5 with java 1.7.51 I get the same error described here https://gist.github.com/rayner/8289619. I have also tried the newer zipped version but have the same problem. Does anyone know if there is a solution to this problem. I would really like to get neuroConstruct working. Thanks

borismarin commented 10 years ago

Could you double check if you have (older) j3d jars at ~/Library/Java/Extensions/ or /System/Library/Java/Extensions ? Those must be removed (if you don't have anything else relying on them!) in order for the new ones to be used.

Inchinn commented 10 years ago

Awesome! that was my problem.

Thank you very much!

Inchinn commented 10 years ago

Hi, I am now having a problem with loading cell morphologies into neuroConstruct, I think it might be a related problem.

I have cell morphologies saved as SWC files, I have tried using the SWCMorphReader to import but get the attached error.

I am able to import the swc files into NEURON, I have also tried saving them as .hoc and importing these into neuroConstruct, but that doesn't work either....

Any help would be greatly appreciated.

screen shot 2014-02-11 at 16 54 11

pgleeson commented 10 years ago

@Inchinn, this issue is more appropriate on the neuroConstruct repository: https://github.com/NeuralEnsemble/neuroConstruct. Can you send me directly the SWC so I can test it locally?

slarson commented 10 years ago

I saw some good activity on the neuroConstruct issue -- where did it land @Inchinn?

On Tue, Feb 11, 2014 at 9:39 AM, Padraig Gleeson notifications@github.comwrote:

@Inchinn https://github.com/Inchinn, this issue is more appropriate on the neuroConstruct repository: https://github.com/NeuralEnsemble/neuroConstruct. Can you send me directly the SWC so I can test it locally?

Reply to this email directly or view it on GitHubhttps://github.com/openworm/OpenWorm/issues/93#issuecomment-34781398 .

Inchinn commented 10 years ago

Got it sorted. The SWC files I was using were a bit odd