tag:blogger.com,1999:blog-196208042024-03-13T18:30:48.068+02:00PySCeS BlogMy very old, new blog.Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.comBlogger21125tag:blogger.com,1999:blog-19620804.post-57388699923532492412015-12-21T15:34:00.002+02:002015-12-21T15:35:16.380+02:00Book chapter now onlineLast year Maciej Swat, Martijn Mone and I contributed a chapter to a book on "Systems Medicine" in the Methods in Molecular Biology series. This is now available as an epub and should be in print soon, our chapter is titled "<a href="http://link.springer.com/protocol/10.1007/978-1-4939-3283-2_19">Modeling and Simulation Tools: From Systems Biology to Systems Medicine</a>".<br />
<br />Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-36522400906066855142014-08-28T12:00:00.005+02:002014-08-28T12:10:49.206+02:00Installing libSBML Python bindings on Ubuntu 14.04 LTSNow that <a href="http://www.ubuntu.com/" target="_blank">Ubuntu</a> 14.04 has been around a bit now and I have started upgrading my development machines.<br />
<br />
One of the first things that always gets installed is the <a href="http://sbml.org/Software/libSBML" target="_blank">libSBML</a> and its <a href="http://www.python.org/" target="_blank">Python</a> bindings which then gives me access to the best library for reading/writing/manipulating Systems Biology Markup Language <a href="http://sbml.org/Main_Page" target="_blank">(SBML</a>) files out there and is critical for my work.<br />
<br />
Thanks to the fantastic work done by the development team installation is this easy:<br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: inherit;"># Python development packages and Pip install system</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install python-dev python-pip
</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: inherit;"># libSBML dependencies and development libraries </span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install libxml2 libxml2-dev
</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install zlib1g zlib1g-dev
</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install bzip2 libbz2-dev
</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: inherit;"># libSBML</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo pip install python-libsbml</span><br />
<br />
<br />
That's it, happy modelling (please look up the above packages, before installing them, if you don't know what they are)!Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com3tag:blogger.com,1999:blog-19620804.post-22021966397583760412014-08-01T16:32:00.000+02:002014-08-01T16:32:16.682+02:00Modelling with PythonI rediscovered this paper the other day, as far as I know, one of the first published uses of Python/SciPy for modelling cellular metabolism (a.k.a systems biology). Today it looks trivial but considering the time it was written/published it's not too bad.<br />
<br />
<a class="cit-dark-link" href="http://scholar.google.nl/scholar?oi=bibs&hl=en&cluster=10510138954909914098&btnI=Lucky">Modelling cellular processes with Python and Scipy</a><br />BG Olivier, JM Rohwer, JHS Hofmeyr - Molecular biology reports, 2002<br />
<br />
Unfortunately, the PDF was published as a bitmap so the next step is to transcribe the code contained in the paper and see if it still works ... reproducible research in the life sciences with a paper over 10 years old? Watch this space ...Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-33051146084935238732014-07-31T15:28:00.002+02:002014-07-31T15:28:17.723+02:00Fun and games with Win 8.1 pro, VirtualBox and HyperVJust having bought a new machine that came pre-loaded with Windows 8.1pro I have been spending time getting to grips with Redmonds latest. Metro aside, one of the only major issues was running Virtualbox which turned into a saga that went something like this:<br />
<br />
<ol>
<li>Installed VirtualBox 4.3.14</li>
<li>Installed ok, virtual machine crashed on startup with some Vbox error</li>
<li>Web search ... found a single post on a forum that this was a known 8.1 issue with 4.3.14 and to use 4.3.12 instead.</li>
<li>Downgraded to 4.3.12 which installed ok, however, vt-x extensions not detected (only single CPU VM's! and bad performance)</li>
<li>Web search ... found a forum posting that explained how Virtualbox behaved like this when Hyper-V is installed, recommended action uninstall Hyper-V</li>
<li>Clicked over to windows components ... Hyper V not installed!</li>
<li>...</li>
<li>...</li>
<li>The next day a new strategy crystallised ... </li>
<li><b>Installed Hyper-V</b> via system components</li>
<li>Rebooted a few times to be sure</li>
<li><b>Uninstalled Hyper-V</b> and rebooted a few times</li>
<li><b>Installed VirtualBox 4.3.12</b> and voila ... vt-x is now available</li>
<li>!!!!! </li>
</ol>
Conclusion. For some or other reason Win 8.1 pro only enabled support for vt-x after installing Hyper-V even though it was enabled in the BIOS. The next chapter in this saga will be to compare VirtualBox and HyperV. Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-76347870051303317172014-06-30T19:31:00.000+02:002014-07-27T15:28:39.288+02:00Final work discussion for this seasonHad a great time presenting the design and implementation of <a href="http://cbmpy.sourceforge.net">CBMPy </a>and how it can be used for model driven media design. Python, object-oriented programming, biochemistry, microbiology and algorithms all unleashed on an amazingly awake audience. Especially considering <a href="http://www.bbc.com/sport/0/football/27961190">this</a> happened the night before :-)Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-2280092017792982222014-04-26T04:11:00.000+02:002014-07-27T15:28:39.053+02:00Small core SBML L3+FBC model published in Biotechnology JournalThe first SBML3+FBC model (a small core model) published in support of this paper:<br/><br/><a href="http://onlinelibrary.wiley.com/doi/10.1002/biot.201200291/full">Basic concepts and principles of stoichiometric modeling of metabolic networks</a><br/><br/>Timo R. Maarleveld, Ruchir A. Khandelwal et. al<br/><br/>Biotechnology Journal, Volume 8, Issue 9, pages 997–1008, September 2013<br/><br/> Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-14277628792626701162014-01-03T19:52:00.000+02:002014-07-27T15:28:39.272+02:00New SBML editors for 2014 :-)Awesome news to end 2013 is that after a community <a href="http://sbml.org/Forums/index.php?t=tree&goto=8376&rid=0">vote</a> I, together with Dagmar Waltemath, have been elected to serve as an <a href="http://sbml.org">SBML</a> editors. This is a great opportunity to contribute to the development of standards in the Life Science community and I'm really looking forward to it.Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-84324962707827341352013-12-22T03:31:00.000+02:002014-07-27T15:28:39.233+02:00Software and standards poster presented at NISB 2012This is a poster I presented at the NISB meeting in 2012: <a href="http://www.bgoli.net/blog/wp-content/uploads/2013/12/nisb_poster_2012.pdf">NISB 2012 Poster</a>Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-30100421925655766782013-11-07T17:00:00.000+02:002014-07-27T15:28:39.217+02:00Generic annotation in constraint based modelsDuring COMBINE 2013 Frank and myself tried to come up with a compromise proposal that would combine the best elements of the two current "generic annotation" proposals that are under discussion.<br/><br/>When we presented this at COMBINE 2013 it was well received by the members of the community that attended the FBC session. For background on this discussion please see this <a href="https://docs.google.com/document/d/1DkwCUPSEtL3VmixM2KL8J40ofBPqtDq4s3cN0fdtCVQ/edit?usp=sharing">document</a>.<br/><br/>We call this proposal AdditionalProperties and an initial specification can be found <a href="https://docs.google.com/document/d/1aj59bB-WykThMzLezofL6tJ1jrpTi13DsLVzC7e3PhQ/edit?usp=sharing">here</a>.Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-26445210337023351892013-11-07T16:43:00.000+02:002014-07-27T15:28:39.176+02:00COMBINE 2013 presentationsIt was really fantastic to leave a great meeting like <a href="http://co.mbine.org/events/COMBINE_2013">COMBINE</a> in Paris and fly straight to South Africa for a vacation. I'll post some vacation pictures elsewhere but for now here are links to my presentation and the slides I made while chairing the FBC session.<br/><br/>A short presentation: <a href="http://co.mbine.org/events/COMBINE_2013/agenda?q=system/files/brett_combine_2013_0.pdf">Modelling at genome scale: introducing the SBML3 FBC package</a><br/><br/>And some technical stuff on a new proposal for generic annotation and a formal UML description of the gene association extension discussed during HARMONY 2013.<br/><br/><iframe src="http://wl.figshare.com/articles/833296/embed?show_title=1" height="502" width="568" frameborder="0"></iframe>Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-74747595864908698112013-09-19T18:46:00.000+02:002014-07-27T15:28:39.162+02:00COMBINE 2013: standards ride again!Just finished having a very productive meeting at <a href="http://www.co.mbine.org/events/COMBINE_2013">COMBINE </a>2013, nice to see how standards are developing, especially, that rhere are a number of things that are finally stable enough to implement. Heading up the list: SBML Groups and COMBINE Archive.<br/><br/>Feeling all geeked out so perhaps this is a great time for a vacation ;-)Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-64220247200552602242013-09-06T22:18:00.000+02:002014-07-27T15:28:39.120+02:00ICSB 2013 SBML3FBC and PySCeS CBMPy<iframe src="http://wl.figshare.com/articles/790720/embed?show_title=1" height="376" width="572" frameborder="0"></iframe>Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-90559106713241794842013-08-24T04:59:00.000+02:002014-07-27T15:28:39.095+02:00The real advantage of a "human readable" model definition formatA colleague of mine wanted to submit a model along with a paper that they had published and had somehow converted from their native format into SBML, unfortunately this had not been entirely successful and I was asked to diagnose the problem after COPASI reported a serious error in the file.<br/><br/>Using <a href="http://pysces.sourceforge.net">PySCeS</a> I converted the file to the PySCeS model format where some translation errors were immediately apparent, could be compared to the original equation and fixed. Reloading the file, testing the steady-state solution and re-exporting it to SBML was a piece of cake.<br/><br/>Not bad going for a Friday afternoon ;-)Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com1tag:blogger.com,1999:blog-19620804.post-60623367031607608872013-07-25T04:13:00.000+02:002014-07-27T15:28:39.039+02:00Funky Amsterdam promotional videoThis is a new advertisement for Amsterdam as a cool tourist destination ... and why its nice to live there ;-)<br/><br/><iframe src="//www.youtube.com/embed/hqEh0iFWlgs" height="315" width="560" allowfullscreen="" frameborder="0"></iframe>Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-47196770808734867982013-07-15T14:45:00.000+02:002014-07-27T15:28:38.940+02:00Finally registered on GitHubAfter using Subversion since it replaced CVS I've decided to get going with Git (username: <a href="http://github.com/bgoli">bgoli)</a> and have committed the PySCeS 0.9.0 release to GitHub to <a href="http://github.com/bgoli/pysces">play</a> around with.Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com1tag:blogger.com,1999:blog-19620804.post-55973736600870006372013-06-16T16:29:00.000+02:002014-07-27T15:28:38.997+02:00Open source and free-to-useI've just returned from a trip to Latvia and after discussions there was reminded of the value of open source, freely available/usable software. Of course while working in South Africa I was acutely aware of this but after living in the Netherlands for a while one gets spoilt (and lazy). What do I mean? Unless your definition of Science is such that it is restricted to the "wealthier western world" e.g.<br/><ul><br/> <li><span style="line-height: 14px;">Windows is not free</span></li><br/> <li>MATLAB (and especially it's toolboxes) are not free</li><br/> <li>academic access to commercial software is not free</li><br/> <li>publishing in open access journals is not free</li><br/></ul><br/>Even though it is more difficult, takes more time and could even be career counter productive, I believe that development in Life Science software (a foundation/basic activity) should be as unrestricted (widely available) as possible.<br/><br/>The question of course is how does one try to convey this to funders, reviewers etc - who are embedded in a more affluent environment - that this is a valid consideration.<br/><br/>A more general question is whether it is worth the effort of developing a freely available tool when one can quickly whip up the code in something like MATLAB (or any other software based on a commercial platform)? In the end this starts to look like more like an ethical question e.g. "Science and Society" than a practical one. of course whether practicing research Scientists should be concerning themselves with this sort of dilemma is up to the individual.Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-54435495349669699352013-06-05T17:24:00.000+02:002014-07-27T15:28:38.982+02:00PySCeS 0.9.0 has been releasedFinally, after far too long, I'm happy to release a new version of <a href="http://pysces.sourceforge.net">PySCeS</a>. This release has many bug fixes and provides a diverse range of new features, including:<br/><blockquote><br/><ul><br/> <li>parallel parameter scanning</li><br/> <li>generalized supply demand analysis</li><br/> <li>exporting simulations as SED-ML (including COMBINE archives)</li><br/> <li>support for scanning moiety totals</li><br/> <li>compatbility support for the latest versions of scipy/numpy</li><br/> <li>enhanced plotting support e.g. users may now choose the Matplotlib backend</li><br/></ul><br/></blockquote><br/>This hopefully is the start of a whole new development/maintenance cycle, more news on the PySCeS website (<a href="http://pysces.sf.net">http://pysces.sf.net</a>) and thanks to Che for helping to debug an irritating Windows issue.<br/><br/> Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-26228634856810836452013-04-25T22:12:00.000+02:002014-07-27T15:28:38.824+02:00And now for a real keyboard ...My old keyboard died and its (long pondered over) replacement arrived today a "Zowie Celeritas" that makes use of mechanical Cherry MX Brown switches. So far so good, it has an awesome feel for typing - once you realize you don't have to push the key all the way down :-)<br/><br/>Other than a small compatibility issue with VirtualBox's USB ghosting I'm sold on mechanical switches. The only problem is that that at work I have a (comparatively) spongy, sticky rubber dome keyboard that is on its way to be replaced ... :-)<br/><br/>Update: a while ago I couldn't take the generic work keyboard anymore and bought a Das Professional model S (silent) also using Cherry MX Browns. This is another amazing keyboard, no more finger strain and I can now create typo's and other gibberish at high speed. I would say the Das is probably my preferred keyboard for typing with the Zowie good for more general use (e.g. Starcraft)Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-80146228981050811112013-03-25T18:25:00.000+02:002014-07-27T15:28:38.924+02:00Writing out arrays and linked lists with pysces.write.*<a href="http://pysces.sourceforge.net">PySCeS</a> array export facilities have been expanded with a new set of array export functions. This includes exporting arrays and linked lists (lists of lists) to various flavours of text file.<br/><br/>These methods are either fully customizable and generic or specifically tailored for writing CSV (comma) and Text (<tab> delimited) files that include the array data and optionally row/col labels. They are all available in the ''pysces.write.*'' module (see <a href="http://pysces.sourceforge.net/docs/index.html">documentation</a>/docstrings for details).<br/><pre class="brush:py">In [3]: pysces.write.<br/>pysces.write.exportArray2CSV<br/>pysces.write.exportArray2TXT<br/>pysces.write.exportLabelledArray<br/>pysces.write.exportLabelledArray2CSV<br/>pysces.write.exportLabelledArray2TXT<br/>pysces.write.exportLabelledArrayWithHeader<br/>pysces.write.exportLabelledArrayWithHeader2CSV<br/>pysces.write.exportLabelledArrayWithHeader2TXT<br/>pysces.write.exportLabelledLinkedList</pre><br/> Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-21351297276745025062013-03-22T16:30:00.000+02:002014-07-27T15:28:38.882+02:00SED-ML gets more interesting when you start using it: PySCeSLast year I started getting more active in the "<a href="http://http://sed-ml.org/">Simulation Experiment Description Markup Language</a>" (SED-ML) community. At its simplest SED-ML is a way of describing time-simulation plots in a standard way, of course it is way more than this, especially after the workshop hosted by Dagmar in Rostock last November year.<br/><br/>Just recently, using Frank Bergmann's.<a href="http://libsedml.sourceforge.net/libSedML/Welcome.html">SED-ML tools</a> for the conversion I've added SED-ML support into PySCeS. Its pretty simple to use as well, anything generated with <strong>mod.doSimPlot()</strong> can be exported.<br/><pre class="brush:py">import pysces<br/>mod = pysces.model('chain.psc','d:\\projects\\modeldir')<br/>mod.doSimPlot(50,100)<br/>mod.exportSimAsSedML(output='files,archive,combine')</pre><br/><strong>mod.exportSimAsSedML()</strong> does all the work and its arguments specify that output should be produced as raw <a href="http://sbml.org">SBML</a>/SED-ML files, a SEDML archive (the same files zipped together) and a <a href="http://co.mbine.org/documents/archive">COMBINE archive</a> (*.omex) a recently proposed archive format that includes the same files with all sorts of metadata.<br/><br/>While this is the simplest use-case, to do this I've wrapped most of the SED-ML 1.1 spec into a Python class that can be used to generate arbitrary SED-ML descriptions. This actually generates Frank's SED-ML script which then either uses libSEDML, installed locally, or the web services provided <a href="http://sysbioapps.dyndns.org/SED-ML Web Tools/">here</a> to generate the SED-ML.<br/><pre class="brush:py">sed = pysces.SED.SED(sed_id, sed_output_path)<br/><br/>In [11]: sed.<br/>sed.addTaskPlot sed.addModel<br/>sed.addDataGenerator sed.addTaskDataGenerators <br/>sed.addModelAlt sed.writeCOMBINEArchive<br/>sed.addPlot sed.writeSedScript<br/>sed.addSimulation sed.writeSedXArchive<br/>sed.addTask sed.writeSedXML<br/><br/>In [11]: sed.</pre><br/>This will all be available in the PySCeS 0.9 release (soon :-))Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0tag:blogger.com,1999:blog-19620804.post-34279003877718613312013-03-06T14:51:00.000+02:002014-07-27T15:28:38.867+02:00Recon 2 translated to SBML Level 3 with FBCYesterday I translated the newly released Human metabolic map <a title="Recon 2" href="http://humanmetabolism.org/">Recon 2</a> from its existing COBRA format into SBML 3 with <a title="FBC" href="http://co.mbine.org/specifications/sbml.level-3.version-1.fbc.version-1.release-1">FBC</a>. The model is now available from <a href="http://cbmpy.sourceforge.net">cbmpy.sourceforge.net</a><br/><br/>It turned out to be trivial, here's what I did:<br/><ol><br/> <li>Downloaded the model from <a href="http://www.ebi.ac.uk/biomodels-main/MODEL1109130000">biomodels</a></li><br/> <li>Loaded it into <a href="http://cbmpy.sourceforge.net/">CBMPy</a>, this translates the model into SBML3+FBC using <a href="http://sbml.org/Software/libSBML">libSBML</a> 5.8.0<a href="http://cbmpy.sourceforge.net/"><br/></a><br/><pre class="brush:py">cmod = cbm.CBRead.readCOBRASBML('MODEL1109130000.cobra.xml', os.getcwd())</pre><br/></li><br/> <li>At this point there is no objective function defined so I created one (R_biomass_reaction)<br/><pre class="brush:py">cmod.createObjectiveFunction('R_biomass_reaction')</pre><br/></li><br/> <li>All that's left is to solve it:<br/><pre class="brush:py">cbm.CBSolver.analyzeModel(cmod)<br/><br/>INFO: Model is optimal: 1<br/>Solution status = 1 : optimal<br/>Solution method = 2 : dual<br/>Objective value = 100.0<br/>Status: Model is optimal</pre><br/></li><br/> <li>As this is a rather large model I decided to try my multicore FVA and see what happens (I decided to use two processing threads on a quad core CPU). This took about and hour in the end which is slow, but this is a good excuse to look at some of the newer optimized FVA algorithms out there.<br/><pre class="brush:py">fvadat = cbm.CBMultiCore.runMultiCoreFVA(cmod, procs=2)</pre><br/></li><br/> <li>Finally I want to write the whole model, the FBA solution and FVA results to file. Excel 97 is actually quite a good format for this, next step is a COMBINE archive.<br/><pre class="brush:py">cbm.CBWrite.writeModelToExcel97(cmod, 'results.xls')</pre><br/></li><br/></ol><br/> Anonymoushttp://www.blogger.com/profile/18251340118272416779noreply@blogger.com0