Presentation is loading. Please wait.

Presentation is loading. Please wait.

PyPedia The free programming environment that anyone can edit! Alexandros Kanterakis Genomics Coordination Center, Department of Genetics, University Medical.

Similar presentations


Presentation on theme: "PyPedia The free programming environment that anyone can edit! Alexandros Kanterakis Genomics Coordination Center, Department of Genetics, University Medical."— Presentation transcript:

1 PyPedia The free programming environment that anyone can edit! Alexandros Kanterakis Genomics Coordination Center, Department of Genetics, University Medical Center, Groningen, The Netherlands

2 Introduction

3 Stay low level at every level Be open source without being open Make tools that make no sense to scientists Do not ever share your results and do not reuse Never maintain your databases and web services Be unreachable and isolated How not to be a bioinformatician

4 So, you think you can be a bioinformatician… Imagine you only have: A personal computer with a browser and an Internet connection Answer the following question: - Who is the current prime minister of Latvia?

5 SYTYCBAB Imagine you only have: A personal computer with a browser and an Internet connection Answer the following question: Compute the Hardy-Weinberg equilibriums of a set of genotypes Execute Source Documentation Execute Source Documentation Execute Source Documentation

6 ? Web environment, online execution ? Open Source ? Integrate with other tools ? Edit a method and share it ? Examples and Unit tests ? Deploy in the cloud ? Frequency of new releases Execute Source Documentation But what about… wiki

7 A python sandbox to the rescue From: So: Google App Engine + MediaWiki = PyPedia

8

9

10 Code as wiki

11 HTML input as wiki

12 Executing a method in a remote computer Edit your user page and add an ssh section: This content is NOT shown to anyone Install the PyPedia client on remote computer(details on pypedia.com) ==ssh== host=ec compute-1.amazonaws.com username=JohnDoe path=/home/JohnDoe/runPyPedia

13 Execute on remote computer Example: Fixed_point_user_JohnDoe The cloud instance contains: numpy, scipy, matplotlib Like SAGE but with custom execution environments (i.e BioPython, PyCogent, …)

14 Cool, but I want to call the function from my local computer.. Install the PyPedia python library: git clone git://github.com/kantale/pypedia.git Load the function in python: >>> import pypedia >>> from pypedia import Pairwise_linkage_disequilibrium >>> Pairwise_linkage_disequilibrium([("A","A"), ("A","G"), ("G","G"), ("G","A")], [("A","A"), ("A","G"), ("G","G"), ("A","A")]) {'haplotypes': [('AA', , ), ('AG', e-11, ), ('GA', , ), ('GG', , )], 'R_sq': , 'Dprime': } >>> You can call the method of any user and your method can be called by anyone. Edit locally, push changes.

15 On the top of each article there is a button: Creates a personalized version of the article that only you can edit. This is similar to the Githubs fork feature.

16 Using PyPedia for open science A complete analysis can be hosted in PyPedia Any finding generated or published should be easily shared and reproduced. The reproduction of a finding takes time even when the source code is released.

17 Reproducible science PyPedia offers a REST interface: b_timestamp= &get_code= Get the most recent version of the that is edited before the timestamp. Reproduce the analysis by sharing a single URL: Pairwise_linkage_disequilibrium([("A","A"), ("A","G"), ("G","G"), ("G","A")], [("A","A"), ("A","G"), ("G","G"), ("A","A")])

18 Reproducing an experiment #> curl \ --data-urlencode 'b_timestamp= ' \ --data-urlencode 'get_code=print Pairwise_linkage_disequilibrium([("A","A"), ("A","G"), ("G","G"), ("G","A")], [("A","A"), ("A","G"), ("G","G"), ("A","A")])' \ \ --output code.py #> python code.py {'haplotypes': [('AA', , ), ('AG', e-11, ), ('GA', , ), ('GG', , )], 'R_sq': , 'Dprime': }

19 Meta-webserver HTML injection is allowed and encouraged! Example run an HTML code posted on gist: run_code= import urllib2 print urllib2.urlopen( https://raw.github.com/gist/ /bbea0c43b278d7c4c04 b3f7a23ba43f558fba98b/index_full.html).read() Click me!

20 All content is under the Simplified BSD License Two namespaces: – Validated articles. i.e: Minor_allele_frequency Safe, only admins can edit – User articles. i.e: Minor_allele_frequency_user_John Unsafe, edited by individual user – Qualitative articles from User namespace is promoted to the Validated namespace – Validated articles cannot call User articles (duh..)

21

22 Some thoughts (in the embarrassing occasion I have some minutes left) Code as wiki, program as wiki concept Multidimensional expansion As Mao said: Let a thousand flowers scripts bloom (and some of them rot in hell) Minimize the distance: D sanity (SCRIPT made_by_IT_guy, SCRIPT useful_to_biologists ) Encyclopedialize your scripts because open source isnt enough! Future steps: Attract editors, make communities! If it can be done in python, why not Ruby, …?

23 Contact: Source code license: GPL v3 Content license: Simplified BSD license Join us in google groups: PyPedias source code: – Mediawiki extension: https://github.com/kantale/PyPedia_server – Python library: https://github.com/kantale/pypedia Acknowledgements: – Despoina Antonakaki – Kostas Tselios – Morris A. Swertz


Download ppt "PyPedia The free programming environment that anyone can edit! Alexandros Kanterakis Genomics Coordination Center, Department of Genetics, University Medical."

Similar presentations


Ads by Google