<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[ecological engineering to harness evolution]]></title><description><![CDATA[ecological engineering to harness evolution]]></description><link>https://blog.fortunalab.org/</link><image><url>https://blog.fortunalab.org/favicon.png</url><title>ecological engineering to harness evolution</title><link>https://blog.fortunalab.org/</link></image><generator>Ghost 4.16</generator><lastBuildDate>Thu, 19 Feb 2026 01:53:57 GMT</lastBuildDate><atom:link href="https://blog.fortunalab.org/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Docker image for the Avida digital evolution software platform]]></title><description><![CDATA[If you work on Windows and are interested in using Avida as a platform for studying evolution, you might have problems trying to install it in your computer. We have built a Docker image for you.]]></description><link>https://blog.fortunalab.org/docker-avida/</link><guid isPermaLink="false">6318aadc2b269448c4517813</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Thu, 08 Sep 2022 09:32:37 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-08-at-11.07.32-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-08-at-11.07.32-1.png" alt="Docker image for the Avida digital evolution software platform"><p>Many people have problems trying to install Avida in their computers. If you work on GNU/Linux (or Mac) you will not have any problems cloning Avida from the <a href="https://github.com/devosoft/avida">GitHub developers repository</a> or from our <a href="https://gitlab.com/fortunalab/avida">GitLab repository</a> (if you want to get our latest extensions). In contrast, people using Windows most likely will have to install Avida as a Docker image.</p><p>This a step-by-step guide to install the Ubuntu Docker image that we have previously built in <a href="https://fortunalab.org">our lab</a>. We first describe the process of building and uploading the image into Docker Hub. Therefore, &#xA0;you can skip the first two sections and go directly to the section &quot;<em>Downloading the image from Docker Hub</em>&quot; to learn how to install the image in your computer.</p><h2 id="building-an-ubuntu-image-containing-avida">Building an Ubuntu image containing Avida:</h2><p>We create the following file, named &quot;Dockerfile&quot;, using a text editor:</p><!--kg-card-begin: markdown--><pre><code>FROM ubuntu:20.04 as avida-build
ARG DEBIAN_FRONTEND=noninteractive
WORKDIR /gitlab.com/fortunalab/
RUN apt-get update &amp;&amp; apt-get install -y \
gcc-9 \
g++-9 \
cmake=3.16.3-1ubuntu1 \
make=4.2.1-1.2 \
git=1:2.25.1-1ubuntu3.5 \
curl \
&amp;&amp; update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 \
&amp;&amp; update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 \\ &amp;&amp; git clone https://gitlab.com/fortunalab/avida.git
WORKDIR /gitlab.com/fortunalab/avida
RUN git submodule foreach git fetch
RUN git submodule update
RUN git submodule init
RUN ./build_avida

FROM ubuntu:20.04
WORKDIR /avida/
COPY --from=avida-build /gitlab.com/fortunalab/avida/cbuild/work/ .
</code></pre>
<!--kg-card-end: markdown--><p>Next, we &#xA0;build the image by calling the docker file stored in our gitlab repository:</p><!--kg-card-begin: markdown--><pre><code>docker build https://gitlab.com/fortunalab/avida/-/raw/master/doker@images/avida/ubuntu/Dockerfile -t fortunalab/avida:2.15.ubuntu
</code></pre>
<!--kg-card-end: markdown--><p>The above code for the compilation reads the content of the &quot;Dockerfile&quot; and executes the following two steps:</p><p>First, a temporal image named &quot;avida-build&quot; is created. This temporal image is used to install the required tools, clone the Avida repository from GitLab and compile the Avida software platform.</p><p>Second, a smaller image named &quot;fortunalab/avida:2.15.ubuntu&quot; is created from a clean Ubuntu 20.04 image by adding only the compiled software.</p><h2 id="uploading-the-image-into-docker-hub">Uploading the image into Docker Hub:</h2><p><a href="https://hub.docker.com">Docker Hub</a> is the world&apos;s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. Users get access to free public repositories for storing and sharing images or can choose subscription plan for private repos.</p><p>We have uploaded the docker image containing Avida into Docker Hub. First, we logged in Docker Hub:</p><!--kg-card-begin: markdown--><pre><code>docker login
</code></pre>
<!--kg-card-end: markdown--><p>Then, we pushed the image to our public repository in Docker Hub:</p><!--kg-card-begin: markdown--><pre><code>docker push fortunalab/avida:2.15.ubuntu
</code></pre>
<!--kg-card-end: markdown--><p> The image is available at <a href="https://hub.docker.com/r/fortunalab/avida">Docker Hub</a></p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-08-at-11.07.32.png" class="kg-image" alt="Docker image for the Avida digital evolution software platform" loading="lazy" width="808" height="358" srcset="https://blog.fortunalab.org/content/images/size/w600/2022/09/Screen-Shot-2022-09-08-at-11.07.32.png 600w, https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-08-at-11.07.32.png 808w" sizes="(min-width: 720px) 720px"></figure><h2 id="downloading-the-image-from-docker-hub">Downloading the image from Docker Hub:</h2><h3 id="install-docker">Install Docker:</h3><p>Before downloading the image, you should have Docker installed in your computer. Docker provides <a href="https://docs.docker.com/get-started">documentation</a> for different operating systems to help you in this process.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-07-at-16.04.39-1.png" class="kg-image" alt="Docker image for the Avida digital evolution software platform" loading="lazy" width="711" height="252" srcset="https://blog.fortunalab.org/content/images/size/w600/2022/09/Screen-Shot-2022-09-07-at-16.04.39-1.png 600w, https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-07-at-16.04.39-1.png 711w"></figure><p>Once Docker is installed, the daemon should be initialized and the process enabled to start on boot. We check that Docker is running by executing (you need root privileges to do it):</p><!--kg-card-begin: markdown--><pre><code>sudo systemctl status docker
</code></pre>
<!--kg-card-end: markdown--><p>In order to execute Docker without root privileges, you need to add your <em>username</em> to the <code>docker</code> group (by default, the <code>docker</code> command can only be run by the root user or by a user in the <code>docker</code> group):</p><!--kg-card-begin: markdown--><pre><code>sudo usermod -aG docker username
</code></pre>
<!--kg-card-end: markdown--><p>Now, we apply the new group membership by typing the following:</p><!--kg-card-begin: markdown--><pre><code>su - username
</code></pre>
<!--kg-card-end: markdown--><p>You need to log out and log back to that the group membership is re-evaluated:</p><p>Then, we check that your <em>username</em> is now added to the <code>docker</code> group by typing:</p><!--kg-card-begin: markdown--><pre><code>id -nG
</code></pre>
<!--kg-card-end: markdown--><p>Finally, we can view system-wide information about Docker by typing:</p><!--kg-card-begin: markdown--><pre><code>docker info
</code></pre>
<!--kg-card-end: markdown--><p>You might need to change the permissions in order to connect to Docker (e.g., <em>Got permission denied while trying to connect to the Docker daemon socket ...</em>):</p><!--kg-card-begin: markdown--><pre><code>sudo chmod 777 /var/run/docker.sock
</code></pre>
<!--kg-card-end: markdown--><h3 id="download-the-docker-image">Download the Docker image: </h3><p>Now, we login in Docker Hub from the command line as <em>username</em>:</p><!--kg-card-begin: markdown--><pre><code>docker login
</code></pre>
<!--kg-card-end: markdown--><p>download the image by typing:</p><!--kg-card-begin: markdown--><pre><code>docker pull fortunalab/avida:2.15.ubuntu
</code></pre>
<!--kg-card-end: markdown--><p>and check that the image has been downloaded to our computer:</p><!--kg-card-begin: markdown--><pre><code>docker images
</code></pre>
<!--kg-card-end: markdown--><h2 id="running-avida-from-the-docker-image-stored-in-our-computer">Running Avida from the Docker image stored in our computer:</h2><!--kg-card-begin: markdown--><pre><code>docker run -it avida:2.15.ubuntu /bin/bash
</code></pre>
<!--kg-card-end: markdown--><p>Go to the Avida folder:</p><!--kg-card-begin: markdown--><pre><code>cd avida
</code></pre>
<!--kg-card-end: markdown--><p>Check the version of Avida:</p><!--kg-card-begin: markdown--><pre><code>./avida -version
</code></pre>
<!--kg-card-end: markdown--><p>We should see the following output:</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-07-at-18.20.44.png" class="kg-image" alt="Docker image for the Avida digital evolution software platform" loading="lazy" width="680" height="371" srcset="https://blog.fortunalab.org/content/images/size/w600/2022/09/Screen-Shot-2022-09-07-at-18.20.44.png 600w, https://blog.fortunalab.org/content/images/2022/09/Screen-Shot-2022-09-07-at-18.20.44.png 680w"></figure><p>Now, you are ready to run your experiments using Avida.</p>]]></content:encoded></item><item><title><![CDATA[GitLab CI/CD: pipeline for the R package avidaR]]></title><description><![CDATA[We have created a Pipeline for the R package avidaR which is launched every time we upload some changes to our GitLab remote repository. ]]></description><link>https://blog.fortunalab.org/gitlab-pipeline/</link><guid isPermaLink="false">624b0a43f0d81d228d2be60d</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Tue, 05 Apr 2022 09:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2022/04/Screen-Shot-2022-04-04-at-17.08.28-3.png" medium="image"/><content:encoded><![CDATA[<h2></h2><img src="https://blog.fortunalab.org/content/images/2022/04/Screen-Shot-2022-04-04-at-17.08.28-3.png" alt="GitLab CI/CD: pipeline for the R package avidaR"><p>We have created a <a href="https://docs.gitlab.com/ee/ci/pipelines/">Pipeline</a> for the R package <a href="https://gitlab.com/fortunalab/avidaR/">avidaR</a> which is launched every time we upload some changes to our GitLab remote repository (i.e., when a push command is executed from our local repository or a commit is sent from the GiLab graphical user interface). This Pipeline is defined <a href="https://gitlab.com/fortunalab/avidaR/-/blob/main/.gitlab-ci.yml">here</a>.</p><h3 id="pipeline">Pipeline.</h3><p>The pipeline is organized in three independent stages:</p><ul><li><strong>test:</strong> avidaR is installed from GitLab, tests are run on it, and the coverage test tool is executed. No artifacts are stored.</li><li><strong>build:</strong> the package is built without vignettes and manual, and the <strong>R</strong> CMD<strong> </strong>check<strong> </strong>is<strong> </strong>run. The package tar-ball is stored as an artifact for later downloads.</li><li><strong>check:</strong> CMD check --as-cran is executed. No artifacts are stored.</li></ul><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/yml_script.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="473" height="500"></figure><h3 id="monitoring">Monitoring.</h3><p>We can take a look at <a href="https://gitlab.com/fortunalab/avidaR/-/pipelines">avidaR repository --&gt; main menu -&gt; CI/CD -&gt; Pipelines</a> to monitor the Pipeline status.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/monitor_log.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="443" height="319"></figure><p>If any o these stages is unsuccessfully executed, we can review it to get information about bugs or notes.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/pipeline_failed.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="578" height="100"></figure><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/monitor_log-1.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="443" height="319"></figure><p>Otherwise we can continue developing and updating our source code as usual. This is useful to avoid checking our code manually every time we do an update, leaving to the end the task of checking it before submitting to CRAN.</p><p>The pipeline can be improved by publishing/sending the logs and reports to the maintainers for checking.</p><p><i>Note: By default, only 400 minutes of CPU execution are available for the pipelines in GitLab. When this time is reached, GitLab will suggest ... to buy more time.</i></p><h3 id="artifacts">Artifacts.</h3><p>The tar-ball file of the package stored at the <em>public</em> folder during the building stage can be downloaded to install, check, or submit it to the CRAN repository.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/download_artifacts.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="181" height="125"></figure><h2 id="badges">Badges.</h2><h3 id="what-are-badges">What are badges?</h3><p><i>&quot;Badges are a unified way to present condensed pieces of information about your projects. They consist of a small image and a URL that the image points to. Examples for badges can be the pipeline status, test coverage, latest release, or ways to contact the project maintainers ...&quot;</i>.</p><p>Read <a href="https://docs.gitlab.com/ee/user/project/badges.html">here</a> more about badges.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/readme_badgets.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="600" height="173" srcset="https://blog.fortunalab.org/content/images/2022/04/readme_badgets.png 600w"></figure><p><strong>Pipeline status</strong> and <strong>code coverage</strong> percentage badges are populated with data extracted from the pipeline output logs created during execution.</p><p>Note: <strong>CRAN</strong> and <strong>Downloads</strong> badges are populate from the <strong>CRAN API</strong>. At the time of writing this document, avidaR package is still in development process and has not yet been sent to the CRAN repository.</p><h3 id="code">Code.</h3><p>In order to show the badges it in the README.md file, we have added the following code at the top of the document:</p><pre><code>&lt;!-- badges: start --&gt;

[![pipeline status](https://gitlab.com/fortunalab/avidaR/badges/main/pipeline.svg)](https://gitlab.com/fortunalab/avidaR/-/commits/main) [![coverage report](https://gitlab.com/fortunalab/avidaR/badges/main/coverage.svg)](https://gitlab.com/fortunalab/avidaR/-/commits/main) [![Version on
CRAN](https://www.r-pkg.org/badges/version/avidaR?color=brightgreen)](https://cran.r-project.org/package=avidaR) [![Total downloads on
CRAN](https://cranlogs.r-pkg.org/badges/grand-total/avidaR?color=brightgreen)](https://cran.r-project.org/package=avidaR) 

&lt;!-- badges: end --&gt;
</code></pre><h3 id="settings">Settings</h3><p>In the repository <a href="https://gitlab.com/fortunalab/avidaR/-/ci/editor?branch_name=main">menu -&gt; CI/CD -&gt; Editor</a>, add the keyword <strong>coverage</strong> and set its value:</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/05/test_coverage_parsing.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="686" height="154" srcset="https://blog.fortunalab.org/content/images/size/w600/2022/05/test_coverage_parsing.png 600w, https://blog.fortunalab.org/content/images/2022/05/test_coverage_parsing.png 686w"></figure><p>Then, click on the <strong>Commit Changes</strong> button.</p><p>Finally, we browse/refresh the README.md file to check out that the coverage percentage is updated.</p><p>Note:<i> Value coverage percentage is captured from the output generated by <strong>R -e &apos;covr::package_coverage()&apos;</strong> command at <strong>test stage</strong>.</i></p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2022/04/avidaR_coverage.png" class="kg-image" alt="GitLab CI/CD: pipeline for the R package avidaR" loading="lazy" width="288" height="73"></figure>]]></content:encoded></item><item><title><![CDATA[pyLODE: an OWL ontology documentation tool]]></title><description><![CDATA[pyLODE is a python tool based on LODE that makes owl ontologies human-readable. It converts an owl file into a html page where the IRIs, descriptions, domain and ranges of the classes, object properties, and datatype properties can be easily read and visualized.]]></description><link>https://blog.fortunalab.org/pylode/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfa9</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 22 Nov 2021 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2021/11/pyLODE.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2021/11/pyLODE.png" alt="pyLODE: an OWL ontology documentation tool"><p>An ontology written in the <a href="https://www.w3.org/OWL">OWL</a> language is a bunch of definitions and their semantic relationships that a machine can read. Unfortunately, the content of an <em>owl</em> file cannot be easily visualized by humans. <a href="https://github.com/RDFLib/pyLODE">pyLODE</a> is a python tool based on <a href="https://github.com/essepuntato/LODE">LODE</a> that makes <em>owl</em> ontologies human-readable.</p><p> pyLODE converts an <em>owl</em> file into a html page where the IRIs, descriptions, domain and ranges of the classes, object properties, and datatype properties can be easily read and visualized.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-21-at-12.27.12.png" class="kg-image" alt="pyLODE: an OWL ontology documentation tool" loading="lazy" width="596" height="196"></figure><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-19-at-16.45.06-2.png" class="kg-image" alt="pyLODE: an OWL ontology documentation tool" loading="lazy" width="725" height="266" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/Screen-Shot-2021-11-19-at-16.45.06-2.png 600w, https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-19-at-16.45.06-2.png 725w" sizes="(min-width: 720px) 720px"></figure><p>We have customized the <a href="https://github.com/rdflib/pyLODE" rel="nofollow noreferrer noopener">original templates</a> provided by pyLODE to convert a scheme of our <em>owl</em> ontology <a href="https://gitlab.com/fortunalab/ontoavida">OntoAvida</a> in a <a href="https://owl.fortunalab.org/ontoavida">html file</a> (see screenshot above). You can find our customized templates at our <a href="https://gitlab.com/fortunalab/pyLODE">gitlab repository</a>.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-19-at-16.44.47-3.png" class="kg-image" alt="pyLODE: an OWL ontology documentation tool" loading="lazy" width="632" height="236" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/Screen-Shot-2021-11-19-at-16.44.47-3.png 600w, https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-19-at-16.44.47-3.png 632w"></figure><p>The html description of the <em>owl</em> ontology can also include figures depicting the main relationships between the terms defined in the ontology (as below),</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/screenshot_post-2.png" class="kg-image" alt="pyLODE: an OWL ontology documentation tool" loading="lazy" width="743" height="624" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/screenshot_post-2.png 600w, https://blog.fortunalab.org/content/images/2021/11/screenshot_post-2.png 743w" sizes="(min-width: 720px) 720px"></figure><p>besides the IRI and description of the classes, as well as the domain and range the class is involved in (as shown here for the class <em>digital organism</em>). </p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/screenshot_digitalOrganism-3.png" class="kg-image" alt="pyLODE: an OWL ontology documentation tool" loading="lazy" width="984" height="968" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/screenshot_digitalOrganism-3.png 600w, https://blog.fortunalab.org/content/images/2021/11/screenshot_digitalOrganism-3.png 984w" sizes="(min-width: 720px) 720px"></figure>]]></content:encoded></item><item><title><![CDATA[rdf4r library: build your semantic RDF database from R]]></title><description><![CDATA[We have extended the functionality of the rdf4r library, developed for working with Resource Description Framework (RDF) data in the R programming environment, to improve performance when uploading lots of RDF triples to a graphDB triplestore hosted in a remote server. ]]></description><link>https://blog.fortunalab.org/rdf4r/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfba</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 15 Mar 2021 09:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2021/03/semantic-web.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2021/03/semantic-web.png" alt="rdf4r library: build your semantic RDF database from R"><p></p><p>Transforming the data into information and knowledge that can be understood by machines requires a semantic approach. Unfortunately, most scientists are unware of the <a href="https://en.wikipedia.org/wiki/Semantic_Web">Semantic Web</a> effort. The Resource Description Framework (<a href="https://www.w3.org/RDF/">RDF</a>) is a standard model for data interchange on the Web. The building block of the RDF model is the triple (subject - predicate - object) and this implies an atomic decomposition of your data in individual statements.</p><p>An RDF graph is a set of tiples or statements where both the subject and the predicate are resources (uniquely identified by URIs) and the object can be either another resource or a literal. There are two key characteristics of RDF stores (aka triple stores): the first and by far the most relevant is that they represent, store and query data as a graph. The second is that they are semantic,which means that they can store not only data but also explicit descriptions of the meaning of that data (i.e., ontologies).</p><p>Making the semantics of your data explicit in an <a href="/ontology-for-avida/">ontology</a> will enable data and/or knowledge exchange and interoperability<strong> </strong>which will be useful in some situations. In other scenarios, you may want to use your ontology to run generic inferencing on your data to derive new facts from existing ones. Another similar use of explicit semantics would be to run domain-specific consistency checks<strong> </strong>on the data.</p><p>In previous posts we have described a semantic model for scientific publishing (<a href="/semantic-web-nanopublications/">nanopublications</a>) and a property graph database (<a href="/neo4j-jupyterlab/">Neo4j</a>). This time we will introduce our work for extending the <a href="https://github.com/vsenderov/rdf4r">rdf4r library </a> and accelerate the process of building, storing, and uploading thousands of RDF triples directly from the <a href="https://www.r-project.org/">R programming language</a>. This has been a great advance in developing and setting up our semantic graph databases in remote <a href="https://graphdb.ontotext.com">graphDB</a> repositories.</p><!--kg-card-begin: markdown--><h2 id="rdf4rextendedlibraryforr">rdf4r (extended) library for R.</h2>
<p>We have extended the functionality of the <a href="https://gitlab.com/fortunalab/rdf4r">rdf4r</a> library, originally developed by Viktor Senderov for working with <a href="https://www.w3.org/RDF/">Resource Description Framework (RDF)</a> data in the <a href="https://www.r-project.org/">R programming environment</a>, to improve performance when uploading lots of RDF triples into a <a href="https://www.ontotext.com/products/graphdb/">graphDB</a> triplestore hosted in a remote server. Please, see the original <a href="https://github.com/vsenderov/rdf4r/blob/master/README.md">readme file</a> for getting more details of the rdf4r library.</p>
<h3 id="newfunctionsadded">New functions added:</h3>
<ul>
<li>add_triples_extended():</li>
<li>serialize_to_file():</li>
<li>add_trig_file_to_graphdb():</li>
<li>ntriples():</li>
</ul>
<h4 id="add_triples_extended">add_triples_extended():</h4>
<p>The function <code>add_triples()</code> included in the rdf4r original package takes huge amount of time adding triples to its internal dynamic vector. Time consumption increases exponentialy when thousands of triples are added, and resizing the dimension of the dynamic vectors does not help. Our new function <code>add_triples_extended()</code> creates instead a list of dynamic vectors by adding them to the list every time the function is called on the same RDF object. It also skips some data processing that are not required when data are well-curated in the source dataframe (i.e., before adding triples to the RDF object). Therefore, using our new function <code>add_triples_extended()</code> accelerates the proccess of adding thousands of triples.</p>
<p>The function takes a dataframe as input data and iterates throught its rows to build the triples. Then, it adds the triples to the RDF object using only a single instruction. In addition, a progress bar is shown by default during the process of adding triples, although it can be hidden by setting <code>param progres_bar = FALSE</code>.</p>
<p>The predicate of the triples is defined once for all triples that will be added to the RDF object, using an identifier before calling the <code>add_triples_extended()</code> function. To build the subject and the object of the triples from each row of the dataframe, different rules will be applied to the <code>add_triples_extended()</code> function depending on the values of the following parameters:</p>
<ul>
<li>WHEN <code>subject_column_label = &quot;&quot;</code> AND <code>subject_column_name != &quot;&quot;</code>, THEN <code>subject = identifier(id = subject_column_name, prefix = subject_rdf_prefix)</code></li>
<li>WHEN <code>subject_column_label != &quot;&quot;</code> AND <code>subject_column_name != &quot;&quot;</code>, THEN <code>subject = identifier(id = paste0(subject_column_label, subject_column_name), prefix = subject_rdf_prefix)</code></li>
<li>WHEN <code>subject_column_label != &quot;&quot;</code> AND <code>subject_column_name = &quot;&quot;</code>, THEN <code>subject = literal(text_value = subject_column_label)</code></li>
<li>WHEN <code>subject_blank = TRUE</code> THEN <code>subject = identifier(id = paste0(subject_column_label, subject_column_name), prefix = NA, blank = TRUE)</code></li>
</ul>
<p>The objects of the triples are build in the same way but replacing <em>subject</em> by <em>object</em> in the above rules.</p>
<h5 id="example">example:</h5>
<pre><code># define a RDF object:
rdf_infects &lt;- ResourceDescriptionFramework$new()
    
# define the prefixes:
prefixes &lt;- c(
   rdf = &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;,
   rdfs = &quot;http://www.w3.org/2000/01/rdf-schema#&quot;,
   owl = &quot;http://www.w3.org/2002/07/owl#&quot;,
   phageon = &quot;http://owl.fortunalab.org/phageon#&quot;,
   obo = &quot;http://purl.obolibrary.org/obo/&quot;
)

# phageon prefix:
phageon &lt;- prefixes[4]

# read data from a file and store them as a dataframe:
phage_host &lt;- read_csv(&quot;phage_host_db.csv&quot;, col_types = cols(phage_taxid = col_character(), host_taxid = col_character()))
  
# define the predicate:
infects &lt;- identifier(id = &quot;PHAGEON_0000001&quot;, prefix = phageon)
  
# define the subject and object while building and adding the triples from the data frame:
rdf_infects$add_triples_extended(
   data = phage_host,
   subject_column_label = &quot;NCBITaxon_&quot;, subject_column_name = &quot;phage_taxid&quot;, subject_rdf_prefix = phageon,
   predicate = infects,
   object_column_label = &quot;NCBITaxon_&quot;, object_column_name = &quot;host_taxid&quot;, object_rdf_prefix = phageon
)
</code></pre>
<h4 id="serialize_to_file">serialize_to_file():</h4>
<p>The function <code>serialize()</code> from the original rdf4r package takes a huge amount of time serializing thousands of triples. Our new function <code>serialize_to_file()</code> iterates through the list of dynamic vectors built previously to extract the triples and store them into a <em>trig</em> output file, skiping some data processing that are not required. Therefore, using our new function <code>serialize_to_file()</code> accelerates the proccess of saving the triples into <em>trig</em> files. In addition, a progress bar is shown by default during the process, although it can be hidden by setting <code>param progres_bar = FALSE</code>.</p>
<h5 id="example">example:</h5>
<pre><code># set the context (for named graphs):
rdf_infects$set_context(identifier(id = &quot;phageon&quot;, prefix = phageon))

# serialize RDF object to file:
rdf_infects$serialize_to_file(&quot;rdf_infects.trig&quot;)
</code></pre>
<h4 id="add_trig_file_to_graphdb">add_trig_file_to_graphdb():</h4>
<p>Our new function <code>add_trig_file_to_graphdb()</code> retrieves the triples stored in a <em>trig</em> file and inserts each triple into an element of a list. Then, this list is imported to graphdb using the <code>rdfr4::add_factory()</code> function from the original package.</p>
<h5 id="example">example:</h5>
<pre><code># set the graphdb access options to the repository:
graphdb = rdf4r::basic_triplestore_access(
   server_url = &quot;http://your_graphdb_url/&quot;,
   user = &quot;your_username&quot;,
   password = &quot;your_password&quot;,
   repository = &quot;graphdb_repository_name&quot;
)
# import the trig file:
rdf4r::add_trig_file_to_graphdb(graphdb_access_options = graphdb, prefixes = prefixes, trig_file = &quot;rdf_infects.trig&quot;)
</code></pre>
<h4 id="ntriples">ntriples():</h4>
<p>Our new function <code>ntriples()</code> returns the number of triples added to the RDF object using the <code>add_triples_extended()</code> function.</p>
<h5 id="example">example:</h5>
<pre><code># build the sparql query to retrieve the triples:
query = &quot;
   PREFIX phageon: &lt;http://owl.fortunalab.org/phageon#&gt;
   SELECT ?s ?p ?o
   WHERE {
      GRAPH phageon:phageon {
         ?s phathe:PHAGEON_0000001 ?o .
         ?s ?p ?o
      }
   }
&quot;

# submit the query to the graphdb repository:
n_inserted_triples &lt;- rdf4r::submit_sparql(query = query, access_options = graphdb)

# check and show results:
cat(paste0(&quot;Number of triples inserted: &quot;, rdf_infects$ntriples(), &quot;\n&quot;))
cat(paste0(&quot;Number of triples retrieved from the triplestore: &quot;, nrow(n_inserted_triples)), &quot;\n&quot;)
n_inserted_triples %&gt;% head
</code></pre>
<h3 id="newdatatypesadded">New data types added:</h3>
<p>Some missing XSD data types have been added:</p>
<ul>
<li>xsd_double</li>
<li>xsd_boolean</li>
</ul>
<h3 id="installation">Installation.</h3>
<p><code>devtools::install_git(&quot;https://gitlab.com/fortunalab/rdf4r.git&quot;)</code></p>
<h3 id="sourcecode">Source code.</h3>
<p>The <a href="https://gitlab.com/raul.ortega/rdf4r">extended rdf4r library</a> was developed by <a href="https://gitlab.com/raul.ortega">Ra&#xFA;l Ortega</a>.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Scientific knowledge should be semantically encoded: a graph of nanopublications.]]></title><description><![CDATA[Only with the adquisition of meaning we adquire knowledge. We briefly explain here an approach to use and link nanopublications (i. e., a linked data format for scholarly data publishing) as a unifying framework to represent knowledge in a semantic way.]]></description><link>https://blog.fortunalab.org/semantic-web-nanopublications/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb5</guid><category><![CDATA[Our research]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 22 Feb 2021 09:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2021/02/semantic-web.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2021/02/semantic-web.png" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications."><p>We have failed to store and organize much of the rapidly accumulating scientific information in rigorous, principled ways, so that finding what we want and understanding what is already known become exhausting, frustating, stressful and increasingly costly experiences. For information to be usable, it must be stored and organized in ways that allow us to access it, to analyze it, to annotate it and to relate it to other information. Only then can we begin to understand what it means. Only with the adquisition of meaning we adquire knowledge.</p><p><a href="http://nanopub.org/wordpress/">Nanopublications</a> are a Linked Data format for scholarly data publishing that has received considerable uptake in the last few years. We briefly explain here an approach to use and link nanopublications as a unifying framework to represent knowledge in a semantic way.</p><p>A nanopublication is a single publishable and citable entity that combines an assertion, the provenance of the assertion, and the provenance of the nanopublication. This information can be about anything, for example a relation between a gene and a disease. Nanopublications are fully expressed in a formal and machine-interpretable way, making scientific communication more effective and user-friendly. Furthermore, because nanopublications can be attributed and cited, they provide incentives for researchers to make their data available in standard formats that drive data accessibility and interoperability.</p><p>We illustrate here the uniqueness of the nanopublication-based scheme by representing three instances of the class <code>Nanopublication</code>, two instances of the classes <code>Provenance</code> and <code>PublicationInfo</code> , and one instance of the classes <code>Assertion</code>, <code>Subject</code>, <code>Predicate</code> and <code>Object</code>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-30-at-13.38.32.png" class="kg-image" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications." loading="lazy"></figure><p>Nanopublications are identified by their <code>URIs</code>, that it, by pointing the address where the file is stored. Many nanopublications can share the same <code>Assertion</code> (e.g., the one identified by the following <code>statement</code>: &quot;<em>Escherichia coli</em> is resistant to ampicillin&quot;). However, they can only share a second class: either the <code>Provenance</code> of the assertion, e.g., the one identified by the PubMed ID <code><a href="https://www.ncbi.nlm.nih.gov/pubmed/16562043">16562043</a></code> (i.e., a research paper published &#xA0;in 1965 in <em>Journal of Bacteriology</em>) or the <code>PublicationInfo</code>, e.g., the one identified by the ORCID <code><a href="https://orcid.org/0000-0002-8374-1941">0000-0002-8374-1941</a></code> (i.e., the author of the nanopublication).</p><p>This means that more than one author (uniquely identified by his/her ORCID) can report the same assertion from the same provenance (e.g., a research paper), and the same author can report the same assertion from different provenances (e.g., distinct research papers). In fact, this is something good and desirable to happen.</p><p>Let&apos;s focus now on the instance of the <code>Assertion</code> class to understand how a collection of nanopublications, as the one shown in the above illustration, becomes a knowledge graph.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-05-01-at-01.09.18.png" class="kg-image" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications." loading="lazy"></figure><p>The instance of the class <code>Assertion</code> identified by the <code>statement</code>: &quot;<em>Escherichia coli</em> is resistant to ampicillin&quot; is a RDF graph (i.e., a triple consisting on a <code>Subject</code>, <code>Predicate</code> and <code>Object</code>).</p><p>The instance of the class <code>Assertion</code> takes its identifier (i.e., <code>statement</code>) by combining the three identifiers (<code>id</code>) of the instances of the classes it is linked to. If two instances of the class <code>Assertion</code> have the same identifiers for their <code>Subject</code>, <code>Predicate</code> and <code>Object</code> instances, the assertions will be linked by a <code>synonymous</code> relationship, regardless of the <code>statement</code> identifiers of the assertions (i.e., the same researcher might extract the same claim from the same publication but write it down in a slightly different natural language). </p><p>In RDF, the <code>Subject</code> of this triple is the <code>URI</code> of the taxon &quot;<em>Escherichia coli&quot; </em>(defined in the <a href="http://www.obofoundry.org/ontology/ncbitaxon.html">NCBI Taxon ontology</a> ) the <code>Predicate</code> is the <code>URI</code> of the term &quot;<em>resistant to</em>&quot; (defined in the <a href="http://www.obofoundry.org/ontology/omp.html">Ontology of Microbial Phenotypes</a>), and the <code>Object</code> is the <code>URI</code> of the antibiotic &quot;<em>ampicillin</em>&quot; (defined in the <a href="http://www.obofoundry.org/ontology/ncit.html">NCI Thesaurus</a>).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-01-at-02.07.27.png" class="kg-image" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications." loading="lazy"></figure><p>The instance of the class <code>PublicationInfo</code> identified by <code><a href="https://orcid.org/0000-0003-3974-6515">orcid: 0000-0003-3974-6515</a></code> is, in fact, another RDF graph (i.e., a triple consisting on a <code>Subject</code>, <code>Predicate</code> and <code>Object</code>).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-05-01-at-01.12.09.png" class="kg-image" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications." loading="lazy"></figure><p>The <code>Subject</code> of this triple is the <code>URI</code> of the nanopublication, the <code>Predicate</code> is the <code>ORCID</code>, and the <code>Object</code> is the literal containg the value of the <code>ORCID</code>.</p><p>All resources in a triple (here, only the <code>Subject</code> and the <code>Predicate</code>) are represented in RDF by their <code>URIs</code> (they were meant to be read by machines). That&apos;s why the <code>Predicate</code> contains <code>URI: <a href="http://purl.obolibrary.org/obo/APOLLO_SV_00000496">http://purl.obolibrary.org/obo/APOLLO_SV_00000496</a></code> instead of <code>ORCID</code>. The Semantic Web encourages the use of <code>URIs</code> as names of things to use a common vocabulary, pointing at places where the meaning of the terms are clearly defined. The term <code>ORCID</code>, is defined in the <a href="http://www.obofoundry.org/ontology/apollo_sv.html">Apollo Structured Vocabulary (Apollo-SV)</a> ontology.</p><p>When the <code>Object</code> of a triple is not a resource (which means it cannot be the <code>Subject</code> of any triple), the datatype of the literal is indicated. We use here the XML Scheme Definition (<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>) to indicate that the <code>ORCID</code> value is a string.</p><p>In natural language, this <code>PublicationInfo</code> triple reads: &quot;This <a href="http://fortunalab.org/np/pub_1">nanopublication</a> was created by <a href="https://orcid.org/0000-0003-3974-6515">Carlos J. Meli&#xE1;n</a>&quot;.</p><p>Likewise, the instance of the class <code>Provenance</code> identified by <code>pmid:336612</code> is, in fact, another RDF graph (i.e., a triple consisting on a <code>Subject</code>, <code>Predicate</code> and <code>Object</code>).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-05-01-at-01.33.44.png" class="kg-image" alt="Scientific knowledge should be semantically encoded: a graph of nanopublications." loading="lazy"></figure><p>The <code>Subject</code> of this triple is the <code>statement</code> of the assertion, the <code>Predicate</code> is the <code>URI</code> of the PubMed ID term (i.e., <code>pmid</code> is defined in the <a href="http://edamontology.org">EDAM Ontology</a>), and the <code>Object</code> is the literal containg the value of the <code>pmid</code> (in this case, a research paper published in 1977 in <em>Journal of Bacteriology</em>).</p><p>In natural language, this <code>Provenance</code> triple reads: &quot;The statement <em>Escherichia coli is resistant to ampicillin</em> was extracted from a publication having PubMed ID = 336612&quot;.</p><p>In summary, we should make published scientific literature more machine-readable, and hence more dynamic and informative. Nanopublications are a way of annotate semantically the scientific literature to understand the meaning of the published information and enable the linking to related documents.</p>]]></content:encoded></item><item><title><![CDATA[Arthur Schopenhauer’s "On authorship and style".]]></title><description><![CDATA[Should peer review stop being anonymous? Inspired by Arthur Schopenhauer’s "On authorship and style", I now sign my reviews. I would like to share here some excerpts on anonymity in literary journals from this memorable essay.]]></description><link>https://blog.fortunalab.org/on-anonymity/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb9</guid><category><![CDATA[Setting up our lab]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 24 Aug 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/08/3525236.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/08/3525236.jpg" alt="Arthur Schopenhauer&#x2019;s &quot;On authorship and style&quot;."><p>Should peer review stop being anonymous? Inspired by Arthur Schopenhauer&#x2019;s &quot;<em>On authorship and style</em>&quot;, I now sign my reviews. Below are some excerpts on anonymity in literary journals from this memorable essay.</p><blockquote>Above all, that shield of literary knavery, anonymity, would therefore have to be discarded. It was introduced into literary journals on the plea of protecting the honest reviewer, the monitor of the public, from the pique and animosity of the author and his promoters. But for one such case there will be a hundred where it merely serves to absolve from all responsibility the man who cannot back up what he says, or even to hide the shame of the person who, for a financial consideration from the publisher, is mercenary and mean enough to recommend to the public an inferior book. It often serves also to conceal the obscurity, insignificance, and incompetence of the critic. It is incredible to see the audacity of the fellows and the sharp practices at which they do not shrink when they know they are safe under the cover of anonymity. Just as there are universal medicines, so is the following a <em>universal anti-critique</em> against all anonymous reviewers, it matters not whether they have praised the bad or censured the good. Your name, you scoundrel! For to mask and disguise yourself and to attack those who go about undisguised is not the act of an honourable man, but of knaves and rascals. Therefore <em>your name</em>, you scoundrel! &#xA0;<em>probatum est</em>.</blockquote><blockquote>It should at least be conditioned by a prohibition of every kind of anonymity and pseudonymity, so that everyone might be held responsible, at least with his honour if he still has any, for what he publicly proclaims through the far-reaching trumpet of the press, and also that, if he is without honour, his words might be neutralized by his name. It is obviously dishonourable to attack anonymously those who have not so written. An anonymous reviewer is a fellow who <em>will not stand by</em> what he tells to, or conceals from, the world concerning other people and their work and who, therefore, withholds his name. And is anything like this tolerated? No lie is so shameless that an anonymous reviewer will not venture to use it; indeed he is not responsible. All anonymous reviewing aims at falsehood and imposture. Therefore just as the police do not allow us to walk about the streets in masks, so should they not tolerate anonymous writing. Anonymous literary journals are the very place where ignorance with impunity sits in judgement on scholarship, and stupidity on intelligence, and where the public is deceived and through the praise of inferior work is cheated of its time and money, again with impunity. For is not anonymity the stronghold of all literary, and especially publicist, rascality? It must, therefore, be pulled down to the very ground, in other words, so that every article in a journal shall always be accompanied by the name of the author and the editor shall accept the heavy responsibility for the correctness of the signature. Since even the most insignificant man is known in the place where he lives, two-thirds of the lies in journals would thus disappear and the audacity of many a venomous tongue would be kept within bounds.</blockquote><blockquote>But as long as that prohibition does not exist, all honest authors should unite in &#xA0;proscribing anonymity by publicly branding it with the mark of their utmost contempt, daily and hourly expressed. They should make it known in every possibleway that anonymous reviewing is contemptible and dishonourable. Whoever writes and carries on a controversy anonymously, is <em>eo ipso</em> presumed to be trying to deceive the public or to injure the reputation of others without risk to himself. And so whenever we speak of an anonymous reviewer, even when we do this quite incidentally and do not otherwise find fault with him, we should use only such expressions as: &#x2018;<em>the cowardly, anonymous rogue at such and such a place</em>&#x2019;, or &#x2018;<em>in that periodical the masked, anonymous scoundrel</em>&#x2019;, and so on. This is really the right and proper tone in which to speak of such fellows in order to put them out of conceit with their business. For obviously everyone can claim some personal consideration only in so far as he enables us to see who he is, so that we know with whom we are dealing, but not the man who slinks around disguised in a mask, and who is then pert and saucy. On the contrary, such a man is <em>ipso facto</em> proscribed and outlawed. [...] We should, therefore, at once call every anonymous reviewer a knave and a cur, especially in anti-critiques, and not talk of <em>the honoured and respected reviewer</em>, as do some of the pack of defiled authors through cowardice. &#x2018;<em>A cur who withholds his name!</em>&#x2019; must be the cry of all honourable authors. And now if anyone distinguishes himself by removing the mist-cap from such a fellow who has run the gauntlet, and by seizing his ear and dragging him forward, then the night-owls will be delighted to see such sport. When a slander comes to our ears, the first outburst of indignation is usually the question &#x2018;<em>Who said that?</em>&#x2019; But anonymity returns no answer.</blockquote><p>Arthur Schopenhauer. <em>Parerga and Paralipomena</em> (volume 2). Oxford University Press. 1974 (translated from the German <em>Parerga und Paralipomena </em>(1851) by E. F. J. Payne). (<a href="https://archive.org/details/23341891SchopenhauerParergaAndParalipomenaV2/page/n517/mode/2up">https://archive.org/details/23341891SchopenhauerParergaAndParalipomenaV2/page/n517/mode/2up</a>). </p>]]></content:encoded></item><item><title><![CDATA[Our desktop computers: Raspberry Pi 4 + 2 vertical monitors.]]></title><description><![CDATA[We do not need powerful desktop computers in our lab, just single connection points in the cloud. Learn how to build a silent, energy-efficient, and dual display workspace.]]></description><link>https://blog.fortunalab.org/raspi-dual-display/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfaf</guid><category><![CDATA[Setting up our lab]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 06 Jul 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/07/Screen-Shot-2020-07-02-at-18.22.02-1.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/07/Screen-Shot-2020-07-02-at-18.22.02-1.png" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors."><p>As I said in <a href="/working-in-the-cloud">a previous post</a>, we work in the cloud. Our data and the software required to analyze them are stored in our <a href="https://system76.com/desktops/meerkat">Meerkat System76</a> server. We do not need powerful desktop computers, just single connection points in the cloud. Our server will do the hard work.</p><p>You might heard of the Raspberry Pi, a credit card sized single board computer. The latest <a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b">Raspberry Pi 4</a> is based on a new processor called the BCM2711, a system-on-a-chip that integrates a 64-bit 1.5 GHz Quad-Core (ARM v8) CPU and up to 8 GB of &#xA0;SDRAM. Local storage is provided via a ScanDisk memory card slot on board.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/Screen-Shot-2020-07-02-at-18.22.02.png" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>The power consumption of a single Raspberry Pi 4 is slightly less than 5W at full speed: all cores at 100%. It runs the Raspbian operating system, an optimized version of the Debian GNU/Linux distribution (you can download a pre-loaded image from the Raspberry Pi Foundation).</p><p>This is the list of what you need to build a connection point to your server:</p><ul><li><a href="https://www.raspberrypi.org/products/raspberry-pi-4-model-b">Raspberry Pi 4 Model B</a></li><li><a href="https://www.raspberrypi.org/products/raspberry-pi-keyboard-and-hub">Raspberry Pi Keyboard &amp; Hub</a></li><li><a href="https://www.raspberrypi.org/products/raspberry-pi-mouse">Raspberry Pi Mouse</a></li><li><a href="https://www.raspberrypi.org/products/type-c-power-supply">Raspberry Pi 15.3W USB-C Power Supply</a></li><li><a href="https://www.raspberrypi.org/products/raspberry-pi-4-case">Raspberry Pi 4 Case</a></li><li><a href="https://thepihut.com/products/noobs-preinstalled-sd-card">Raspberry Pi NOOBS - Preinstalled Micro SD Card</a> (64 GB)</li><li><a href="https://www.tiendatec.es/raspberry-pi/accesorios/1116-kit-4-disipadores-calor-extremo-para-raspberry-pi-4-8472496016056.html?kk=a4c6224-17310727ca8-a0cb6&amp;gclid=EAIaIQobChMI4NaO9oOv6gIVidOyCh2rQwXLEAQYASABEgKbtfD_BwE&amp;utm_source=kelkooes&amp;utm_medium=cpc&amp;utm_campaign=kelkooclick&amp;utm_term=Raspberry+Pi+KIT+4+DISIPADORES+CALOR+EXT&amp;from=kelkooes">Heat Sink Raspberry Pi 4</a></li><li><a href="https://www.raspberrypi.org/products/micro-hdmi-to-standard-hdmi-a-cable">Micro HDMI to Standard HDMI (A/M) Cable</a> (2 units)</li><li><a href="https://www.amazon.com/Dell-Ultrasharp-U2719DX-2560x1440-Resolution/dp/B07KGR784M">Dell Ultrasharp U2719DX 27-Inch WQHD 2560x1440</a> (2 units)</li></ul><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_083029971-1.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>We&apos;ll start by placing the four pieces of aluminium heatsinks (CPU, memory, chipset USB, and chipset Ethernet).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_083349570.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>It will look like this:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_084243026.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>Next, we will insert the Raspberry Pi 4 into the case:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_084833535.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>After connecting the keyboard, mouse, Ethernet, and the power supply, we will connect the Raspberry Pi 4 to the two Dell monitors:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_092300593-1.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>We will rotate the monitors and install Raspbian from the NOOBS micro SD card.</p><p>And this is how our desktop computer looks like:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/07/IMG_20200623_123057574.jpg" class="kg-image" alt="Our desktop computers: Raspberry Pi 4 + 2 vertical monitors." loading="lazy"></figure><p>In our lab we do not need powerful computers for our team, just what you see here: a silent, energy-efficient, and dual display workspace.</p>]]></content:encoded></item><item><title><![CDATA[Ontology for Avida: a computational approach for performing experimental evolution on digital organisms.]]></title><description><![CDATA[The Ontology for Avida project is developing an integrated vocabulary for the description of the most widely used computational approach for performing experimental evolution on digital organisms.]]></description><link>https://blog.fortunalab.org/ontology-for-avida/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb8</guid><category><![CDATA[Our research]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 15 Jun 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/06/a.jpg" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/06/a.jpg" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms."><p>The lack of a clearly defined vocabulary makes biologists feel reluctant to embrace the field of digital evolution. The <a href="https://gitlab.com/fortunalab/ontoavida">Ontology for Avida (OntoAvida)</a> project is developing an integrated vocabulary for the description of <a href="https://github.com/devosoft/avida" rel="noopener">the most widely used computational approach for performing experimental evolution on digital organisms</a> (i.e., self-replicating computer programs that evolve within a user-defined computational environment).</p><p>In this post, I show briefly how this project has started.</p><p>The <a href="https://github.com/INCATools/ontology-development-kit">Ontology Development Kit (ODK)</a>, from the <a href="http://www.obofoundry.org">OBO Foundry</a>, provides a way of creating an ontology project ready for pushing to GitHub. Just to illustrate the goal of the OBO Foundry, <a href="http://www.obofoundry.org">in this site</a> you will find a table of ontologies, available in several formats, with details for each, and documentation on <a href="http://obofoundry.org/principles/fp-000-summary.html">OBO Principles</a>. Please, take a look at some of them and you realize the huge effort of ontology developers to add semantics to the biomedical and biological scientific fields.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-12.38.34.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><p>We will use <a href="https://blog.fortunalab.org/docker/">Docker</a> to install the Ontology Development Kit from the <a href="https://github.com/INCATools/ontology-development-kit">GitHub repository</a>.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-12.39.47.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><p>We first create a new folder for storing our ontology:</p><!--kg-card-begin: markdown--><pre><code>mkdir ontology@avida
</code></pre>
<!--kg-card-end: markdown--><p>Then, we pull the software to the newly created folder:</p><!--kg-card-begin: markdown--><pre><code>cd ontology@avida
docker pull obolibrary/odkfull
</code></pre>
<!--kg-card-end: markdown--><p>Next, we download the wrapper script that will configure the source tree directory for the ontology:</p><!--kg-card-begin: markdown--><pre><code>wget seed-via-docker.sh
</code></pre>
<!--kg-card-end: markdown--><p>We need to make this script executable by changing the permissions and by allowing it to access the Docker sock:</p><!--kg-card-begin: markdown--><pre><code>chmod 755 seed-via-docker.sh
chmod 777 /var/run/docker.sock
</code></pre>
<!--kg-card-end: markdown--><p>We customize the <code>project.yaml</code> file that was downloaded along the ODK to the <code>ontology@avida</code> folder (i.e., edit the file using, for example, the <code>nano</code> editor), by adding the following:</p><!--kg-card-begin: markdown--><pre><code>id: ontoavida
title: OntoAvida
github_org: fortunalab
repo: ontoavida
</code></pre>
<!--kg-card-end: markdown--><p>Then, we run the wrapper script (make sure you have Docker running):</p><!--kg-card-begin: markdown--><pre><code>./seed-via-docker.sh -C project.yaml
</code></pre>
<!--kg-card-end: markdown--><p>After changing the permissions to access the source tree directory:</p><!--kg-card-begin: markdown--><pre><code>sudo chown -R yourusername:yourusername target
cd target/ona
</code></pre>
<!--kg-card-end: markdown--><p>we have all we need to start developing the ontology under the OBO Foundry guidelines.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-13.17.34.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><p>To make the ontology available to the scientific community, we create a repository in GitLab (OntoAvida, as we specified it in the <code>project.yaml</code> file):</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-21-at-13.35.21.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy" width="609" height="202" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/Screen-Shot-2021-11-21-at-13.35.21.png 600w, https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-21-at-13.35.21.png 609w"></figure><p>We push the project to GitLab:</p><!--kg-card-begin: markdown--><pre><code>git remote add origin git@gitlab.com:fortunalab/ontoavida.git
git push -u origin master
</code></pre>
<!--kg-card-end: markdown--><p>Now, everybody can access the ontology tree directory and the ontology OWL file <code>ontoavida.owl</code>.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-21-at-13.42.08.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy" width="1247" height="618" srcset="https://blog.fortunalab.org/content/images/size/w600/2021/11/Screen-Shot-2021-11-21-at-13.42.08.png 600w, https://blog.fortunalab.org/content/images/size/w1000/2021/11/Screen-Shot-2021-11-21-at-13.42.08.png 1000w, https://blog.fortunalab.org/content/images/2021/11/Screen-Shot-2021-11-21-at-13.42.08.png 1247w" sizes="(min-width: 720px) 720px"></figure><blockquote>Please use this GitLab repository&apos;s <a href="https://gitlab.com/fortunalab/ontoavida/-/issues">Issue tracker</a> to request new terms/classes or report errors or specific concerns related to the ontology.</blockquote><p>The Ontology Web Language (OWL) was not designed to be read by humans but by machines (i.e., we are adding semantics to data). That&apos;s why the <code>ontoavida.owl</code> file is not reader-friendly. There are software applications specifically developed to visualize and edit <code>owl</code> files. The most widely-used open-source ontology editor is called <code><a href="https://protege.stanford.edu">Prot&#xE9;g&#xE9;</a></code>, developed by the Stanford Center for Biomedical Informatics Research at the Stanford University School of Medicine.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-14.00.28.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><p>You can freely download <code>Prot&#xE9;g&#xE9;</code> and then open the ontology file <code>ontoavida.owl</code> to visualize the Classes, Object Properties, and Datatype Properties currently added to the Ontology for Avida.</p><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-13.43.22.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="https://blog.fortunalab.org/content/images/2020/06/Screen-Shot-2020-06-05-at-13.44.12.png" class="kg-image" alt="Ontology for Avida: a computational approach for performing experimental evolution on digital organisms." loading="lazy"></figure><p>I hope you enjoy it.</p>]]></content:encoded></item><item><title><![CDATA[DataCite: get your bibliographic references automatically by providing DOIs.]]></title><description><![CDATA[Getting your bibliographic references from DOIs, appropriately formatted to the journal you are planning to submit your manuscript.]]></description><link>https://blog.fortunalab.org/datacite/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb3</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 08 Jun 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/06/DC.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/06/DC.png" alt="DataCite: get your bibliographic references automatically by providing DOIs."><p><a href="https://datacite.org">DataCite</a> is an international not-for-profit organization which aims to improve data citation.</p><p>Although DataCite members can assign digital object identifiers (DOIs) to data sets, you do not need to be a DataCite member to get a reference from a DOI appropriately formatted to the journal you are planning to submit your manuscript.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/06/a.png" class="kg-image" alt="DataCite: get your bibliographic references automatically by providing DOIs." loading="lazy"></figure><p>Scroll down to <code>Get started with DataCite</code>:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/06/Screen-Shot-2020-06-05-at-11.31.04.png" class="kg-image" alt="DataCite: get your bibliographic references automatically by providing DOIs." loading="lazy"></figure><p>Click on <code><a href="https://citation.crosscite.org">Generate your references automatically ...</a></code> and you will be redirected to the main search page: </p><p>Paste your DOI, select the formatting style, and click on <code>Format</code>:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/06/Screen-Shot-2020-06-05-at-11.37.45.png" class="kg-image" alt="DataCite: get your bibliographic references automatically by providing DOIs." loading="lazy"></figure><p>For example, for the formatting style of the journal <em>Ecology</em>, the reference corresponding to that DOI will read as: </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/06/Screen-Shot-2020-06-05-at-11.35.57.png" class="kg-image" alt="DataCite: get your bibliographic references automatically by providing DOIs." loading="lazy"></figure><p>Then, you can copy and paste the bibliographic reference in the reference list of your manuscript.</p><p>Quite easy, isn&apos;t it?</p>]]></content:encoded></item><item><title><![CDATA[PURL: getting permanent addresses to access the files you share.]]></title><description><![CDATA[You should create a persistent address for sharing files with your colleagues on the web when you are not sure about where they will be located in your server.]]></description><link>https://blog.fortunalab.org/purl/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb4</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 25 May 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/05/a-5.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/05/a-5.png" alt="PURL: getting permanent addresses to access the files you share."><p>Sometimes you change the location of a shared file in your server for technical reasons. When this happens, the link to the shared file you provided to others (e.g., by email or embedded in a document) does not work anymore and shows a 404 error. PURLs (<a href="https://en.wikipedia.org/wiki/Persistent_uniform_resource_locator">persistent uniform resource locators</a>) are an approach to fixing the problem of unstable URLs (<a href="https://en.wikipedia.org/wiki/Uniform_resource_locator">uniform resource locators</a>).</p><p>A PURL is a persistent URL, it provides a permanent address to access a resource on the web. When a user retrieves a PURL they will be redirected to the current location of the resource. When an author needs to move a page or file they can update the PURL to point to the new location.</p><p>This post covers how to create and use a PURL that you can share with your colleagues.</p><p>The PURL system is a service of the Internet Archive. </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.20.38.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>To create and update a PURL, you need to have a user account with the Internet Archive.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.21.04.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>You will be prompted to enter your email and create a password.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.22.00.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Once you sign up, they will send you a link you will need to click on to validate the registration process.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.30.21.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Now you can login with your email and password.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.46.48.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>You will be returned to the PURL Administration page.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.47.07.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>URLs are grouped into domains that can be searched from the home page.</p><p>Let&apos;s create a domain that will host your URLs.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.47.58.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Now it&apos;s time to create the PURLs that will point to your URLs.</p><p>The PURL resolution service associates the PURL with the actual URL and returns that URL to the client as a standard HTTP redirect.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-24-at-00.50.07.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Since the Internet Archive has taken full control of PURLs, we will not use the service shown above, instead, we will go to its <a href="https://archive.org">website</a> and login our account:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-13.17.57.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>We see our recently created domain <code>/fortunalab</code>. We click on it:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-13.21.35.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>It&apos;s empty right now. We click on <code>Edit</code> (top-left corner):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-13.30.42.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Now, we click on <code>change the files</code> (next to the butterfly):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-13.31.00.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>Finally, we select <code>Add a file</code> to upload it.</p><p>We see now one <code>comma-separated values</code> file (on the right) pointing to the following address: <code><a href="https://archive.org/download/purl_fortunalab/avida_genbank.csv">https://archive.org/download/purl_fortunalab/avida_genbank.cs</a>v</code> and a <code>torrent</code> download available at the following address: <a href="https://archive.org/download/purl_fortunalab/purl_fortunalab_archive.torrent"><code>https://archive.org/download/purl_fortunalab/purl_fortunalab_archive.torrent</code></a>\</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-13.43.00.png" class="kg-image" alt="PURL: getting permanent addresses to access the files you share." loading="lazy"></figure><p>You can share that link with your colleagues.</p><p>That&apos;s it!</p>]]></content:encoded></item><item><title><![CDATA[Docker Hub: pulling and pushing container images to a public respository]]></title><description><![CDATA[Learn how to use Docker's container registry (Doker Hub) to find official images and host your own for public or private use.]]></description><link>https://blog.fortunalab.org/dockerhub/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb7</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 18 May 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/05/a-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/05/a-2.png" alt="Docker Hub: pulling and pushing container images to a public respository"><p><a href="https://www.docker.com/products/docker-hub">Docker Hub</a> is the world&apos;s largest repository of container images with an array of content sources including container community developers, open source projects and independent software vendors (ISV) building and distributing their code in containers. Users get access to free public repositories for storing and sharing images or can choose subscription plan for private repos.</p><p>We start by <a href="https://hub.docker.com/signup">creating an account</a>:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-10.31.41-1.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p></p><p>Then, we login in Docker Hub:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-00.13.32.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>We search for the required image (in our case, the phamdb image created by James Lamine):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-22.56.23.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>Click on the image name to see more details:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-22.54.58.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>Now, we are going to download the image. We first login in our account from the command line:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker login
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-23.22.11.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>Second, we download the phamdb image created by James Lamine:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker pull jglamine/phamdb
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-23.28.35.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>We will <a href="https://docs.docker.com/registry/spec/deprecated-schema-v1/">solve</a> the warning we have received: &quot;<em>Image docker.io/jglamine/phamdb:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility</em>&quot;.</p><p>From the above link, we can read: &quot;One way to upgrade an image from image manifest version 2, schema 1 to schema 2 is to <code>docker pull</code> the image and then <code>docker push</code> the image with a current version of Docker. Doing so will automatically convert the image to use the latest image manifest specification&quot;.</p><p>We start by getting the ID of the image we just downloaded:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker ps -a
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-23.38.39.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>Then, we tag the jglamine/phamdb image:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker tag d4f0e6e9d45b fortunalab/phamdb:schema2
</code></pre>
<!--kg-card-end: markdown--><p>After tagging the image, we push it to our repository:</p><blockquote>Before pushing, you might need to logout, then log in from the command line to your docker hub account.</blockquote><!--kg-card-begin: markdown--><pre><code class="language-bash">docker push fortunalab/phamdb:schema2
</code></pre>
<!--kg-card-end: markdown--><p>The image is now stored in our DockeHub account:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-23.51.19.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>We pull the image from our remote public repository to our local server:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker pull fortunalab/phamdb:schema2
</code></pre>
<!--kg-card-end: markdown--><p>We see that we do not receive that warning anymore.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-07-at-00.02.34.png" class="kg-image" alt="Docker Hub: pulling and pushing container images to a public respository" loading="lazy"></figure><p>That&apos;s it.</p>]]></content:encoded></item><item><title><![CDATA[Docker: software that includes everything needed to run an application.]]></title><description><![CDATA[Docker is a container of software that includes everything needed for an application to run isolated from the operating system. In this post we will walk you through the installation process.]]></description><link>https://blog.fortunalab.org/docker/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfb6</guid><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 11 May 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/05/dockericon-2.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/05/dockericon-2.png" alt="Docker: software that includes everything needed to run an application."><p><a href="https://www.docker.com">Docker</a> is a software platform for deploying applications in resource-isolated processes. Docker runs processes in isolated containers. Containers isolate applications at the process level and use the host&apos;s kernel instead of virtualizing an entire operating system. The host does not care about what is running inside the container and the container does not care about which host it is running on. In short, they are similar to virtual machines, only more resource-friendly.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/container-what-is-container.png" class="kg-image" alt="Docker: software that includes everything needed to run an application." loading="lazy"></figure><p>In this post we&apos;ll install Docker and pull a Docker image.</p><h2 id="install-docker-">Install Docker.</h2><p>We install Docker from the official Docker repository to ensure we get the latest version.</p><p>First, we&apos;ll add a new package source:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add
</code></pre>
<!--kg-card-end: markdown--><p>Second, we add the GPG key from Docker:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo add-apt-repository &quot;deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable&quot;
</code></pre>
<!--kg-card-end: markdown--><p>Third, we update the package database with the Docker packages from the newly added repo:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo apt update
</code></pre>
<!--kg-card-end: markdown--><p>Make sure we are about to install from the Docker repo instead of the default Debian repo:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">apt-cache policy docker-ce
</code></pre>
<!--kg-card-end: markdown--><p>Finally, we install Docker</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo apt install docker-ce
</code></pre>
<!--kg-card-end: markdown--><p>Docker should now be installed, the daemon started, and the process enabled to start on boot. We check that it&apos;s running:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo systemctl status docker
</code></pre>
<!--kg-card-end: markdown--><p>The output should be similar to the following, showing that the service is active and running:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-04-at-00.26.19.png" class="kg-image" alt="Docker: software that includes everything needed to run an application." loading="lazy"></figure><p>Once we have Docker installed, we can use the <code>docker</code> command line utility (i.e., the Docker client).</p><p>We add the user <em>username</em> to the <code>docker</code> group (by default, the <code>docker</code> command can only be run by the root user or by a user in the <code>docker</code> group):</p><!--kg-card-begin: markdown--><pre><code class="language-bash">sudo usermod -aG docker username
</code></pre>
<!--kg-card-end: markdown--><p>Now, we apply the new group membership by typing the following:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">su - username
</code></pre>
<!--kg-card-end: markdown--><p>We check that our user <em>username</em> is now added to the <code>docker</code> group by typing:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">id -nG
</code></pre>
<!--kg-card-end: markdown--><p>We can view system-wide information about Docker by typing:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker info
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-04-at-01.01.30.png" class="kg-image" alt="Docker: software that includes everything needed to run an application." loading="lazy"></figure><p>We might want to change the root directory <code>/var/lib/docker</code> (i.e., the location of the Docker files) to another directory because we ran out of disk space in <code>/var</code>. To do this, we create the file <code>/etc/docker/daemon.json</code> and populate it with:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">{
    &quot;data-root&quot;: &quot;/new/docker/root&quot;
}
</code></pre>
<!--kg-card-end: markdown--><p>Then, we restart the daemon:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">systemctl daemon-reload
systemctl restart docker
</code></pre>
<!--kg-card-end: markdown--><p>We now check that the the root directory has been updated by typing:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker info
</code></pre>
<!--kg-card-end: markdown--><h2 id="install-a-docker-image-ontology-development-kit-odk-as-an-example-">Install a Docker image: Ontology Development Kit (ODK) as an example:</h2><p><a href="https://github.com/INCATools/ontology-development-kit">The Ontology Development Kit (ODK)</a> provides a Docker image that helps you in the process of creating <a href="http://www.obofoundry.org">OBO ontologies</a>.</p><p>We download the image by typing:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker pull obolibrary/odkfull
</code></pre>
<!--kg-card-end: markdown--><p>We check that the image has been downloaded to our server:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker images
</code></pre>
<!--kg-card-end: markdown--><figure class="kg-card kg-image-card"><img src="/content/images/2020/05/Screen-Shot-2020-05-06-at-12.07.42.png" class="kg-image" alt="Docker: software that includes everything needed to run an application." loading="lazy"></figure><p>We check that a container ID (<code>e3044811f2f0</code>, in this case) is running the image <code>obolibrary/odkfull</code> by listing the containers that are running in our server:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker ps
</code></pre>
<!--kg-card-end: markdown--><p>or we might want to list all the containers (i.e., the started and the stopped ones):</p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker ps -a
</code></pre>
<!--kg-card-end: markdown--><p>We can remove a container (e.g. <code>e3044811f2f0</code>) we do not need anymore by typing: </p><!--kg-card-begin: markdown--><pre><code class="language-bash">docker rm e3044811f2f0
</code></pre>
<!--kg-card-end: markdown--><p>That&apos;s it!</p>]]></content:encoded></item><item><title><![CDATA[Zenodo: a catch-all repository for your research.]]></title><description><![CDATA[Zenodo is a general-purpose open-access repository that assign a persistent digital object identifier (DOI) to any research digital material. We show how to create a release of a repository stored in GitHub and upload it into Zenodo.]]></description><link>https://blog.fortunalab.org/zenodo/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfad</guid><category><![CDATA[Setting up our lab]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 04 May 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/05/a.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/05/a.png" alt="Zenodo: a catch-all repository for your research."><p><a href="https://zenodo.org">Zenodo</a> is a general-purpose open-access repository developed under the European <a href="https://en.wikipedia.org/wiki/OpenAIRE">OpenAIRE</a> program and operated by <a href="https://en.wikipedia.org/wiki/CERN">CERN</a> . It allows researchers to deposit data sets, research software, reports, and any other research related digital material. For each submission, a persistent digital object identifier (<code><a href="https://en.wikipedia.org/wiki/Digital_object_identifier">DOI</a></code>) is minted, which makes the stored items easily citeable.</p><p>We will illustrate this process by creating a release of a repository stored in our <code><a href="https://github.com/miguelfortuna/BirdMigrationNetworks">GitHub</a></code> account, uploading a copy into Zenodo, and using the <code>DOI</code> provided by Zenodo in our manuscript before submitting it to a scientific journal. </p><p>This is the repository we are going to upload to Zenodo:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.12.02-2.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Let&apos;s start. Go to the <a href="https://zenodo.org">Zenodo</a> website: </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-13.58.40.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Now, <code>Log in</code> to your account or <code>Sign up</code> if you do to not have registered in Zenodo yet.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-13.59.32.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Once you log in, go to <code>GitHub</code>:</p><blockquote>Note that you need to authorize Zenodo to connect to your GitHub account in the <code>GitHub</code> section. Zenodo will redirect you to GitHub to ask for permissions to use <code>webhooks</code> on your repositories.</blockquote><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-17.01.18.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Then, enable the repository (from <code>OFF</code> to <code>ON</code>):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/a-1.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Click on the recently enabled repository.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.06.13-1.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Next, we are ready to create a release for that repository (click on <code>Create release</code> and we will be redirected to the <code><a href="https://github.com/miguelfortuna/BirdMigrationNetworks">GitHub</a></code>repository). If we didn&apos;t do it before, the following screen will show up:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-13.36.20-2.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Click on <code>Create a new release</code>:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.19.26.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>After adding a version name, title, and a short description of the release, click on<code><a href="https://github.com/devosoft/avida">Publish release</a></code>:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.20.20-2.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Zenodo will automatically download a .zip ball of the new release and register a <code>DOI</code>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.21.38-2.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>Click on it to see more details of the release just created.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.22.26-1.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>The directory structure will show up as it is stored in your <code>GitHub</code> repository.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-14.23.33.png" class="kg-image" alt="Zenodo: a catch-all repository for your research." loading="lazy"></figure><p>That&apos;s it. You can now add the following sentence when submitting the manuscript to the journal:</p><p><em>The data reported in this paper and the code to perform the analyses have been archived on Zenodo: </em>https://zenodo.org/badge/latestdoi/192325725.</p>]]></content:encoded></item><item><title><![CDATA[Setting up host-parasite coevolutionary experiments in Avida.]]></title><description><![CDATA[Digital coevolution between hosts and parasites resembles the coevolutionary dynamics among bacteria and phages. By following this tutorial you will be able to set up and run coevolutionary experiments in Avida (i.e., the most widely-used software platform for studying evolution in action).]]></description><link>https://blog.fortunalab.org/avida_host-parasite/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfab</guid><category><![CDATA[Our research]]></category><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 27 Apr 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/04/Screen-Shot-2020-04-20-at-02.43.35.png" medium="image"/><content:encoded><![CDATA[<img src="https://blog.fortunalab.org/content/images/2020/04/Screen-Shot-2020-04-20-at-02.43.35.png" alt="Setting up host-parasite coevolutionary experiments in Avida."><p>In the <a href="/avida/">previous post</a> we briefly introduced the <code><a href="https://github.com/devosoft/avida">Avida</a></code> software platform for the study of evolution. Here, we will learn to work with parasites within this computational tool. Parasitic digital organisms are almost identical to the hosts, and as such they self-replicate by copying their genome instruction by instruction into a new memory space. But they operate inside hosts, stealing CPU cycles from them to execute their own genome&#x2019;s instructions and, hence, reduce their host fitness.</p><p>Digital coevolution between hosts and parasites resembles, at some level, the coevolutionary dynamics among bacteria and phages (ie.,. viruses that infect bacteria). On the one hand, bacteria must have receptors on their surface in order to import resources from their environment. On the other hand, phages must attach to those receptors in order to infect bacteria. Therefore, a trade-off exists between having receptorsf or obtaining nutrients and being susceptible to phages.</p><p>Coevolutionary dynamics results from bacteria evolving phage resistance by changing their surface receptors, and from phages countering bacteria resistance by altering their tail fibres to attach to the novel receptor. </p><p>Analogously, digital hosts must compute logic operations to consume resources and thus replicate, but those traits leave them susceptible to infection by digital parasites.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Fig_1-2.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><h3 id="installation-">Installation.</h3><p>We need first to install <code><a href="https://githowto.com">git</a></code> &#xA0;(see how to do it from <code><a href="/jupyterlab-git/">JuptyterLab</a></code>).</p><p>Then, from the devosoft/avida development account on <code><a href="https://github.com/devosoft/avida">github</a></code> </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.37.33.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>we get the repository after setting-up <code>git</code> &#xA0;from the command line:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">mkdir git_avida # create folder
cd git_avida # go to folder
git init # initialize git repository (it creates a subfolder named .git)
git clone https://github.com/devosoft/avida # get repository
</code></pre>
<!--kg-card-end: markdown--><p>and, finally, we follow the instructions:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.37.56.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><!--kg-card-begin: markdown--><pre><code class="language-bash">cd avida
git submodule init
git submodule update
</code></pre>
<!--kg-card-end: markdown--><p>We then compile and install Avida:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">./build_avida
</code></pre>
<!--kg-card-end: markdown--><p>Of course, we can do it from <code>JuptyterLab</code> as well:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.38.22.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><h3 id="configuration-">Configuration.</h3><p>After a successful installation, we will have the following directory structure:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.41.40.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>We go to <code>cbuild</code> and then to <code>work</code></p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.42.43.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The <code>work</code> folder contains the configuration files <code>*.cfg</code> and the executable file <code>avida</code>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.43.16.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The &#xA0;<code>avida.cfg</code> file is the main configuration file for designing an experiment.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.43.40.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>It&apos;s a text file containing many options along with a description of what each one does and what its parameters are.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.47.31.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>In order for Avida to work with parasites, we need to change the instruction set that is going to be used in the experiment. That is, the genetic language for digital organisms (analogous to the four nucleotides for biological organisms). By default, the genome of a digital organism is made of instructions taken from the set of 26 instructions specified in the file <code>instset-heads.cfg</code> (you can also see the <code>instset-heads-sex.cfg</code> file in the folder, which is used in experiments in which recombination between organisms is allowed). Parasites and their hosts work under a different instruction set, <code>instset-transsmt.cfg</code>. This 33-instruction set contains the instruction <code>Inject</code> that, when executed, is used for the parasite to infect its host. Do not forget to change this! It&apos;s the only option we&apos;re going to modify by editing the <code>avida.cfg</code> file directly. We will set the configuration options when running Avida from the command line.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.48.03.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>There are many ways for a digital organism to mutate,</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.48.37.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>many demographic parameters to be set,</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.48.51.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>and many options for them to interact with the environment.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.49.08-2.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The <code>PARASITE GROUP</code> options are the ones required for setting up parasites.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.51.33.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>You can get <a href="https://github.com/devosoft/avida/wiki/Introduction-to-parasites">more information</a> on how parasites work in Avida from his developer, <a href="https://zeeelab.com">Luis Zaman</a>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-14.00.57.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.58.41.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>If the <code>instset-transsmt.cfg</code> file provided by default looks like the one below,</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.59.02.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>please, replace it by this one (the instruction <code>Inject</code> should be there, as well as <code>Divide-Erase</code>that is used to produce offspring under this instruction set):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.59.28.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>You can see the meaning of the 33 instructions contained in the <code>instset-transsmt.cfg</code> from <a href="https://github.com/miguelfortuna/avida_host-parasite/blob/master/instruction-set.pdf">our repository</a>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.00.44.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p></p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.52.12.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The <code>environment.cfg</code> file contains the options that will allow digital organisms to get extra CPU cycles (and hence self-replicate faster) when computing Boolean functions.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.52.24.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>We will replace the content of the default <code>environment.cfg</code> file as follows:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.53.15.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>We specify a single resource that will limit population size (first line). Parasites and hosts will take a unit of resource (if available) the first time they compute a Boolean function (any of the 9 functions defined here: <code>NOT</code>, <code>NAND</code>, <code>AND</code>, <code>ORN</code>, <code>OR</code>, <code>ANDN</code>, <code>NOR</code>, <code>XOR</code>, and <code>EQU</code>) by manipulating&#x2014;with the instructions they may harbor in their genomes&#x2014;32-binay numbers that the take from the environment. If they do not perform any Boolean function, or if there are not resources available in the environment, the digital organisms will fail when producing offspring.</p><p>We do not reward digital organisms with extra CPU cycles for computing Boolean functions. Then, there are no fitness differences between organisms encoding different phenotypes (i.e., computing different Boolean functions): the only selective pressure will come from the antagonistic interactions between hosts and parasites.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-12.56.32.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The <code>envents.cfg</code> file contains many options to specify the kind of data we want to get from the experiment and when we want them. Below, you can see an example that illustrates many more options that the one we will use here. </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.31.55.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The content of our <code>envents.cfg</code> file will be the following:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.32.20.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>A host population will grow and evolve, from a single ancestor, in the absence of parasites until a single parasite ancestor is introduced at time 5000 (after approximately 100 host generations, for this particular host ancestor). The experiment will last until time 500000 (approximately, 10000 host generations).</p><p>You can choose any of these <a href="https://github.com/miguelfortuna/avida_host-parasite/tree/master/hosts">30 hosts</a> and <a href="https://github.com/miguelfortuna/avida_host-parasite/tree/master/parasites">15 parasites</a> as ancestors to perform your our coevolutionary experiments:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.27.42.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The genome of one of these hosts looks like (100 instructions):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.28.03.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Same for parasites:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.30.03.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.31.02.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><h3 id="execution-">Execution.</h3><p>We run Avida from the command line, or from a<em> </em><code>bash</code> notebook in <code>JupyterLab</code>, as:</p><!--kg-card-begin: markdown--><pre><code class="language-bash">./avida -set DATA_DIR data_coevo -set WORLD_X 100 -set WORLD_Y 100 -set COPY_MUT_PROB 0 -set DIVIDE_INS_PROB 0 -set DIVIDE_DEL_PROB 0 -set OFFSPRING_SIZE_RANGE 1 -set MIN_COPIED_LINES 0 -set MIN_EXE_LINES 0 -set REQUIRE_EXACT_COPY 1 -set STERILIZE_UNSTABLE 1 -set HARDWARE_TYPE 2 -set BASE_MERIT_METHOD 2 -set DEATH_METHOD 1 -set AGE_LIMIT 3000 -set MAX_CPU_THREADS 2 -set PARASITE_VIRULENCE 0.9 -set PARASITE_NO_COPY_MUT 1 -set INJECT_METHOD 1 -set REQUIRE_SINGLE_REACTION 1 -set DIVIDE_MUT_PROB 0.025 -set INJECT_MUT_PROB 0.01
</code></pre>
<!--kg-card-end: markdown--><p>We have modified many options of the configuration file &#xA0;<code>avida.cfg</code> by adding <code>set - <em>option</em></code> when calling Avida.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.03.40.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>You will see the following output after running the above command in <code>JupyterLab</code></p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.03.57.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>or in a terminal:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.11.20-1.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The total number of hosts <code>Orgs:</code> and parasites <code>Para:</code> will change over time as a consequence of the ecological and coevolutionary dyamics.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.11.47.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>One the experiment is over, we will ge the following directory structure:</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.14.55.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>We briefly explain what those files tell us. We start with the file <code>grid_task_hosts.500000.dat</code> </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.18.41.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Each number represent the phenotype (i.e., a unique combination of the Boolean functions that a digital organism performed) of the &#xA0;host organism that was <em>living</em> at that time (i.e., 500000, that is, the end of the experiment) in that memory cell within the 100x100 grid (defined by the <code>WORLD_X</code> and <code>WORLD_Y</code> options). </p><p>The number <code>-1</code> indicates that that particular memory cell was empty at that time (i.e., there was no organism <em>living</em> there).</p><p>The phenotype of the organism <em>living</em> in a particular memory cell can be obtained by converting the number into the vector of the Boolean functions as (e.g., 4):</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.16.43.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p> Same for the file <code>grid_task_parasite.500000.dat</code> Here, the parasite <em>lives</em> in the same memory cell where its host is <em>living</em>. It cannot be located in an empty memory cell: <code>-1</code> in the <code>grid_task_hosts.500000.dat</code></p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.05.36.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The file <code>host_genome_list.500000.dat</code> contains the genomes of each host organism whose phenotype was described above.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.21.15.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Note that the genomes of all host organisms contain the instruction <code>G</code> &#xA0;(i.e., the one required to produce an offspring <code>Divide-Erase</code>).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.21.58.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Same for the <code>parasite_genome_list.500000.dat</code> file. Parasite genomes are shorter than host genomes (for this particular experiment).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.22.32.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Here, all parasite&apos;s genomes contain the instruction <code>F</code> (the one required to infect a host <code>Inject</code>).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.23.29.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The <code>host_tasks.dat</code> file contains the number of host organisms performing each Boolean function. Note that this is not the number of hosts whose genomes encode a distinct phenotype (i.e., a host organism can perform more than one Boolean function). </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.24.36.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Same for the <code>parasite_tasks.dat</code> file. Remember that parasites were introduced at time 5000, that&apos;s why we do not see any parasite in the screenshot yet. </p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.25.07.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>Finally the <code>time.dat</code> file contains the mapping between <code>updates</code> (i.e., the unit of time in Avida) and the corresponding number of generations. The time required for an organism to produce an offspring (called in Avida <code>gestation time</code>) depends on the genome, which is continually evolving).</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-13.25.51.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure><p>The information provided in those files is enough for generating figures like this one (and movies; see the next post):</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.44.04-1.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"><figcaption>Snapshot of the coevolution between hosts and parasites in Avida. Nodes represent distinct host (green) and parasite(red) phenotypes. The abundance of individuals encoding each phenotype is indicated by node size. Interactions between a host phenotype and a parasite phenotype are depicted as arrows pointing in opposite directions: the thickness of red arrows indicates the fraction of infections that a particular parasite is responsible for inflicting on the indicated host phenotype, while the thickness of the green arrows indicates the fraction of all of the hosts a particular parasite phenotype infects that is accounted for by the indicated host phenotype.</figcaption></figure><p>You can take a look at <a href="https://github.com/miguelfortuna/avida_host-parasite">our paper </a>on the role of exaptations in shaping antagonistic host-parasite networks to learn more about setting and running coevolutionary experiments <em>in silico</em>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-17-at-14.02.07.png" class="kg-image" alt="Setting up host-parasite coevolutionary experiments in Avida." loading="lazy"></figure>]]></content:encoded></item><item><title><![CDATA[Digital evolution: Avida as a software platform for studying evolution in action.]]></title><description><![CDATA[Digital evolution is a form of evolutionary computation in which self-replicating computer programs—digital organisms—evolve within a user-defined computational environment. Avida is the most widely used software platform for research in digital evolution.]]></description><link>https://blog.fortunalab.org/avida/</link><guid isPermaLink="false">61695ac0cd7e80da0632cfac</guid><category><![CDATA[Our research]]></category><category><![CDATA[Our computational toolbox]]></category><dc:creator><![CDATA[Miguel A. Fortuna]]></dc:creator><pubDate>Mon, 20 Apr 2020 08:00:00 GMT</pubDate><media:content url="https://blog.fortunalab.org/content/images/2020/04/Screen-Shot-2020-04-20-at-02.57.04-1.png" medium="image"/><content:encoded><![CDATA[<figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.35.54.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption><a href="https://ofria.com">Charles Ofria</a> leads the <a href="https://devolab.org">Digital evolution lab</a> at Michigan State University (USA). They perform experimental studies on digital organisms with the twin goals of improving our understanding of how natural evolution works and applying this knowledge to solving computational, engineering, and biological problems.</figcaption></figure><img src="https://blog.fortunalab.org/content/images/2020/04/Screen-Shot-2020-04-20-at-02.57.04-1.png" alt="Digital evolution: Avida as a software platform for studying evolution in action."><p>Digital evolution is a form of evolutionary computation in which self-replicating computer programs&#x2014;digital organisms&#x2014;evolve within a user-defined computational environment. <a href="https://github.com/devosoft/avida"><em>Avida</em></a> is the most widely used software platform for research in digital evolution. It satisfies the three essential requirements for evolution to occur: <em>replication</em>, <em>heritable variation</em>, and <em>differential fitness</em>. The latter arises through competition for the limited resources of memory space and central processing unit (CPU) time. </p><p></p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.38.52.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>Digital organisms <em>live</em> in memory space (represented here as a grid).</figcaption></figure><p>A digital organism in Avida consists of a sequence of instructions&#x2014;its genome or genotype&#x2014;and a virtual CPU, which executes these instructions. Some of these instructions are involved in copying an organism&#x2019;s genome, which is the only way the organism can pass on its genetic material to future generations. To reproduce, a digital organism must copy its genome instruction by instruction into a new region of memory through a process that may lead to errors (i.e., mutations). A mutation occurs when an instruction is copied incorrectly, and is instead replaced in the offspring genome by an instruction chosen at random (with a uniform distribution) from a set of possible instructions.</p><p>Some instructions are required for replication (i.e., viability), whereas others are required to complete computational operations (such as addition, multiplications, and bit-shifts), and are executed on binary numbers taken from the environment through input-output instructions. When the output of processing these numbers equals the result of a specific Boolean logic operation, the digital organism is said to have a functional trait represented by that logic operation.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.36.57.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>Many studies use Avida to tackle general principles of evolutionary biology. Some of them have been published in top international scientific journals.</figcaption></figure><p></p><p>An organism can be rewarded for having a functional trait with virtual CPU-cycles, which speeds up its execution of instructions. These rewards create an additional selective pressure (besides streamlining replication) which favours those organisms with mutations that have produced sequences of instructions in their genomes that encode functional traits. Organisms that are more successful&#x2014;those that replicate faster&#x2014;are more likely to spread through a population.</p><h3 id="the-genome-of-a-digital-organism-">The genome of a digital organism.</h3><p>The genome of a digital organism is a circular sequence of instructions taken from a 26-instruction alphabet. It comprises instructions for copying (e.g., <code>v</code>, <code>w</code>, <code>x</code>) as well as for completing computational operations (such as additions, subtractions, and bit-shifts), which are executed on binary numbers taken from the environment. The default environment provides the organism with new, random input strings every time an input-output instruction (<code>y</code>) is executed.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.38.02.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>The genome of a digital organism (12-instruction length) along with its genetic language (i.e., the 26-instruction alphabet, analogous to the 4 nucleotides of biological organisms).</figcaption></figure><p>The genome of a digital organism can harbor one or several input-output instructions (<code>y</code>) that can be executed either only once or many times during the time it takes to generate an offspring. This means that the organism can take input numbers from the environment more than once before replicating and can compute the result of more than one logic operation (see below). Only one instruction from the instruction set is itself a logic operator (<code>u</code>).</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.39.26.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>Instructions involved in computing Boolean logic operations.</figcaption></figure><p>This is the <code>nand</code> (not-and) instruction, which must be executed in coordination with input-output instructions (<code>y</code>) to perform the <em>NAND</em> logic operation. The <code>nand</code> instruction reads in the contents of the <em>BX</em> and <em>CX</em> registers and performs a bitwise <em>NAND</em> operation on them (i.e., it returns <em>0</em> if and only if both inputs at the corresponding bit positions are <em>1</em>, otherwise it returns <em>1</em>).</p><p>The result of this operation is placed in the <em>BX</em> register. The input-output instruction (<code>y</code>) takes the contents of the <em>BX</em> register and outputs it, checking it &#xA0;for any logic operations that may have been performed. It will then place a new input into <em>BX</em>. All other logic operations must be performed using one or more <code>nand</code> instructions in combination with input-output (<code>y</code>) instructions.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.40.26.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>The genotype encodes the phenotype of a digital organism. The genotype of a digital organism with the smallest genome required to perform the logic operation <em>NAND</em> is depicted as a circular set of 12 instructions (represented here as letters). Beyond the instructions necessary for copying the genome, the genetic language of Avida contains instructions for storing and manipulating 32-bit binary numbers in buffers (<em>input-1</em> and <em>input-2</em>) and registers (<em>AX</em>, <em>BX</em>, and <em>CX</em>). Each binary number is represented here as a sequence of 32 boxes, one for each bit. The value of each bit is depicted as a black box if it equals one and as a white box if it equals zero. The cartoon shows the execution of the input-output instruction (represented by the letter <code>y</code>; highlighted in black). Left, the state of the input buffers and registers before executing the input-output instruction (the arrow points toward the next instruction to be executed). Right, the state of the input buffers, registers, and the output after executing the input-output instruction. The input-output instruction outputs the number stored in the <em>BX </em>register, checking for any logic operation that may have been performed on the two binary numbers previously stored in the input buffers. In this example, the output is the result of applying the logic operation <em>NAND</em>: for each bit pair, the result is <em>0</em> (white box) if and only if the two bits are <em>1</em>, and <em>1</em> otherwise (red box). Then, the input-output instruction places a new random binary number into the <em>BX</em> register (a number that is also stored in the <em>input-1</em> buffer after moving the number previously stored there to the <em>input-2 buffer</em>). Figure taken from <a href="https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005414">our paper</a>).</figcaption></figure><h3 id="the-phenotype-of-a-digital-organism-">The phenotype of a digital organism.</h3><p>Phenotypes are defined by the combination of the following 9 Boolean logic operations that organisms can perform on 32-bit one- and two-input numbers: <code>NOT</code>, which returns <em>1</em> at a bit position if the input is <em>0</em> at that bit position, and <em>0</em> if the input is <em>1</em>; <code>NAND</code>, which returns <em>0</em> if and only if both inputs at the corresponding bit positions are <em>1</em> (otherwise it returns <em>1</em>); <code>AND</code>, which returns <em>1</em> if and only if both inputs are <em>1</em> (otherwise it returns <em>0</em>); <code>OR_N</code> (or-not), which returns <em>1</em> if for each input bit pair one input bit is <em>1</em> or the other is <em>0</em> (otherwise it returns <em>0</em>); <code>OR</code>, which returns <em>1</em> if either the first input, the second input, or both are <em>1</em> (otherwise it returns <em>0</em>); <code>AND_N</code> (and-not), which only returns <em>1</em> if for each bit pair one input is <em>1</em> and the other input is <em>0</em> (otherwise it returns <em>0</em>); <code>NOR</code> (not-or), which returns <em>1</em> only if both inputs are <em>0</em> (otherwise it returns <em>0</em>); <code>XOR</code> (exclusive <code>OR</code>), which returns <em>1</em> if one but not both of the inputs are <em>1</em> (otherwise it returns <em>0</em>); <code>EQU</code> (equals), which returns <em>1</em> if both bits are identical, and <em>0</em> if they are different.</p><figure class="kg-card kg-image-card kg-card-hascaption"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.41.23.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"><figcaption>Phenotypes are defined by the combination of 9 Boolean logic operations.</figcaption></figure><p>You can explore a database of <em>512,000</em> organism&apos;s genomes and the phenotypes they encode in a single environment <a href="https://miguelfortuna.es/avida_genbank">here</a>.</p><figure class="kg-card kg-image-card"><img src="/content/images/2020/04/Screen-Shot-2020-04-20-at-00.44.49.png" class="kg-image" alt="Digital evolution: Avida as a software platform for studying evolution in action." loading="lazy"></figure><p>Charles Ofria and Claus O. Wilke explain <a href="https://authors.library.caltech.edu/13705/1/OFRal04.pdf">here</a> the general principles on which Avida is built, as well as its main components and their interactions.</p>]]></content:encoded></item></channel></rss>