Encouraging code sharing in neuroscience

Stephen J Eglen

Encouraging code sharing in neuroscience


Stephen J Eglen                  Cambridge Computational Biology Institute
https://sje30.github.io          University of Cambridge
sje30@cam.ac.uk                  @StephenEglen

Slides: http://bit.ly/fens-eglen


Acknowledgements

INCF, co-authors, Freeman lab.

These slides are available under a creative common CC-BY license.

Inverse problems are hard

Score (%) grade
70-100 A
60-69 B
50-59 C
40-49 D
0-39 F

Forward problem

I scored 68, what was my grade?

Inverse problem

I got a B, what was my score?

Research sharing: the inverse problem


Moral or selfish approach?


Paper

Selfish reasons to share

Why not align what is good for science with what is good for scientists?

  1. Funding mandates (REF + enforcement from Wellcome Trust)
  2. Credit through data papers
  3. Leads to further collaborations (e.g. “EPAmeadev”)
  4. Fixes data bugs / errors in analysis
  5. Prevent data loss (Vines et al 2014). e.g. students have a habit of leaving…
  6. Your future self is probably one of the main beneficiaries of sharing.

Code sharing: a way forward



Paper

Specific recommendations

  1. Include enough code to reproduce key figure/result from your paper (“modeldb”).
  2. Provide toy examples if your project is too intensive to expect others to run in a few hours.
  3. Version control
  4. Licence
  5. Provide data
  6. Provide tests
  7. Use standards
  8. Use permanent URLs

Simple example

Paper Info

New tools

Docker

Can bundle entire open-source evironment for others to share:

(start docker)
docker run -d -p 8787:8787 sje30/eglen2015
open http://192.168.99.100:8787/

This should launch a web page …

Jupyter notebooks

https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

binder = Docker + jupyter + cloud compute

https://github.com/sofroniewn/2pRAM-paper