<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Vimalkumar Velayudhan</title><link href="https://vimalkvn.gitlab.io/" rel="alternate"/><link href="https://vimalkvn.gitlab.io/feeds/all.atom.xml" rel="self"/><id>https://vimalkvn.gitlab.io/</id><updated>2026-03-07T00:00:00+00:00</updated><entry><title>Installing Conda Using the Miniforge Installer</title><link href="https://vimalkvn.gitlab.io/blog/install-conda-using-miniforge/" rel="alternate"/><published>2026-03-07T00:00:00+00:00</published><updated>2026-03-07T00:00:00+00:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2026-03-07:/blog/install-conda-using-miniforge/</id><summary type="html">&lt;p&gt;&lt;strong&gt;Table of&amp;nbsp;Contents&lt;/strong&gt;&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#about-conda"&gt;About&amp;nbsp;Conda&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-1-downloading-miniforge-installer"&gt;Step 1: Downloading Miniforge&amp;nbsp;Installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-2-running-the-installer-script"&gt;Step 2: Running the Installer&amp;nbsp;Script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-3-optional-disabling-auto-activation-of-base-environment"&gt;Step 3: (Optional) Disabling Auto-Activation of base&amp;nbsp;Environment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id="about-conda"&gt;About Conda&lt;a class="headerlink" href="#about-conda" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://conda.io"&gt;Conda&lt;/a&gt; is a software and environment manager. You can use it to create an isolated environment where you can install a software along with …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;Table of&amp;nbsp;Contents&lt;/strong&gt;&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#about-conda"&gt;About&amp;nbsp;Conda&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-1-downloading-miniforge-installer"&gt;Step 1: Downloading Miniforge&amp;nbsp;Installer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-2-running-the-installer-script"&gt;Step 2: Running the Installer&amp;nbsp;Script&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-3-optional-disabling-auto-activation-of-base-environment"&gt;Step 3: (Optional) Disabling Auto-Activation of base&amp;nbsp;Environment&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id="about-conda"&gt;About Conda&lt;a class="headerlink" href="#about-conda" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://conda.io"&gt;Conda&lt;/a&gt; is a software and environment manager. You can use it to create an isolated environment where you can install a software along with its dependencies i.e., all the software it depends upon to&amp;nbsp;function. &lt;/p&gt;
&lt;p&gt;There are three different sources from which you can get Conda — &lt;a href="https://docs.anaconda.com/miniconda/"&gt;Miniconda&lt;/a&gt;, &lt;a href="https://www.anaconda.com/download"&gt;Anaconda&lt;/a&gt;, and &lt;a href="https://conda-forge.org/download/"&gt;Miniforge&lt;/a&gt;. In this tutorial, I will install Conda using the Miniforge&amp;nbsp;installer. &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
I run these commands on &lt;strong&gt;Linux Mint 22.1&lt;/strong&gt;. These steps should also work on &lt;strong&gt;Ubuntu 24.04 &lt;span class="caps"&gt;LTS&lt;/span&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="step-1-downloading-miniforge-installer"&gt;Step 1: Downloading Miniforge Installer&lt;a class="headerlink" href="#step-1-downloading-miniforge-installer" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Visit &lt;a href="https://conda-forge.org/"&gt;https://conda-forge.org/&lt;/a&gt; and click on the &lt;strong&gt;Download Installer&lt;/strong&gt;&amp;nbsp;button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Download Miniforge Installer" src="https://vimalkvn.gitlab.io/blog/install-conda-using-miniforge/images/01_download_miniforge_installer.png"&gt;&lt;/p&gt;
&lt;p&gt;This should take you to the Download the conda-forge Installer&amp;nbsp;page. &lt;/p&gt;
&lt;p&gt;Under Miniforge Latest Release, click on the &lt;strong&gt;Linux x86_64 (amd64)&lt;/strong&gt;&amp;nbsp;option. &lt;/p&gt;
&lt;p&gt;&lt;img alt="Click on the Linux x86_64 button" src="https://vimalkvn.gitlab.io/blog/install-conda-using-miniforge/images/02_download_linux_amd64.png"&gt;&lt;/p&gt;
&lt;p&gt;This will download the installer file to your computer as &lt;strong&gt;Miniforge3-Linux-x86_64.sh&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id="step-2-running-the-installer-script"&gt;Step 2: Running the Installer Script&lt;a class="headerlink" href="#step-2-running-the-installer-script" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Open a&amp;nbsp;terminal.&lt;/p&gt;
&lt;p&gt;Change in to the directory where you downloaded the installer script. In my case this&amp;nbsp;was &lt;code&gt;/home/vimal/Downloads&lt;/code&gt;: &lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~/Downloads
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, run the installer script using&amp;nbsp;bash:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;bash&lt;span class="w"&gt; &lt;/span&gt;Miniforge3-Linux-x86_64.sh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Press the &lt;span class="caps"&gt;ENTER&lt;/span&gt; key. You will need to answer the following prompts to&amp;nbsp;continue.&lt;/p&gt;
&lt;h3 id="q1-miniforge-license-agreement"&gt;Q1: Miniforge License Agreement&lt;a class="headerlink" href="#q1-miniforge-license-agreement" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First, you will need to read the Miniforge license&lt;sup id="fnref:miniforge-license"&gt;&lt;a class="footnote-ref" href="#fn:miniforge-license"&gt;1&lt;/a&gt;&lt;/sup&gt; agreement and accept the terms to proceed with the installation. To scroll down, press the &lt;span class="caps"&gt;ENTER&lt;/span&gt;&amp;nbsp;key. &lt;/p&gt;
&lt;p&gt;To proceed,&amp;nbsp;type &lt;code&gt;yes&lt;/code&gt; at&amp;nbsp;the &lt;code&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/code&gt; prompt and press&amp;nbsp;the &lt;code&gt;ENTER&lt;/code&gt; key.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Do you accept the license terms? [yes|no]&lt;/span&gt;
&lt;span class="go"&gt;&amp;gt;&amp;gt;&amp;gt; yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="q2-where-to-install-miniforge"&gt;Q2: Where to Install Miniforge&lt;a class="headerlink" href="#q2-where-to-install-miniforge" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Next, you will need to select a location for installing&amp;nbsp;Miniforge. &lt;/p&gt;
&lt;p&gt;Press the &lt;span class="caps"&gt;ENTER&lt;/span&gt; key to use the default&amp;nbsp;— &lt;code&gt;/home/user/minforge3&lt;/code&gt;. You can also type in a different path after&amp;nbsp;the &lt;code&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/code&gt; prompt, if you&amp;nbsp;wish.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Miniforge3 will now be installed into this location:&lt;/span&gt;
&lt;span class="go"&gt;/home/vimal/miniforge3&lt;/span&gt;

&lt;span class="go"&gt;  - Press ENTER to confirm the location&lt;/span&gt;
&lt;span class="go"&gt;  - Press CTRL-C to abort the installation&lt;/span&gt;
&lt;span class="go"&gt;  - Or specify a different location below&lt;/span&gt;

&lt;span class="go"&gt;[/home/vimal/miniforge3] &amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Press&amp;nbsp;the &lt;code&gt;ENTER&lt;/code&gt; key to&amp;nbsp;proceed.&lt;/p&gt;
&lt;h3 id="q3-do-you-wish-to-initialize-conda"&gt;Q3: Do You Wish to Initialize Conda?&lt;a class="headerlink" href="#q3-do-you-wish-to-initialize-conda" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the final step, you will need to decide if you wish to initialize&amp;nbsp;conda. &lt;/p&gt;
&lt;p&gt;Typing &lt;strong&gt;yes&lt;/strong&gt; here will have the following&amp;nbsp;effects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The &lt;code&gt;conda&lt;/code&gt; command will be available in&amp;nbsp;your &lt;code&gt;PATH&lt;/code&gt;. &lt;sup id="fnref:conda-command"&gt;&lt;a class="footnote-ref" href="#fn:conda-command"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;li&gt;The&amp;nbsp;Conda &lt;code&gt;base&lt;/code&gt; environment will be activated automatically when you open a terminal&amp;nbsp;session.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Type&amp;nbsp;either &lt;code&gt;yes&lt;/code&gt; or &lt;code&gt;no&lt;/code&gt; and press&amp;nbsp;the &lt;code&gt;ENTER&lt;/code&gt; key to&amp;nbsp;proceed:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Do you wish to update your shell profile to automatically initialize conda?&lt;/span&gt;
&lt;span class="go"&gt;...&lt;/span&gt;
&lt;span class="go"&gt;Proceed with initialization? [yes|no]&lt;/span&gt;
&lt;span class="go"&gt;[no] &amp;gt;&amp;gt;&amp;gt; yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
I have answered yes here, but I will disable auto-activation of the Conda base environment in &lt;a href="#step-3-optional-disabling-auto-activation-of-base-environment"&gt;Step 3&lt;/a&gt;. This is because I prefer to activate conda environments only when I need&amp;nbsp;it. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id="check-if-conda-is-installed-correctly"&gt;Check if Conda is Installed Correctly&lt;a class="headerlink" href="#check-if-conda-is-installed-correctly" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Open a new terminal&amp;nbsp;session:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;(base) vimal@mint-zara:~$ 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Notice&amp;nbsp;the &lt;code&gt;(base)&lt;/code&gt; label at the beginning of the prompt. This means the Conda base environment is now&amp;nbsp;active.&lt;/p&gt;
&lt;p&gt;Now,&amp;nbsp;type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;conda&lt;span class="w"&gt; &lt;/span&gt;--version
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Example&amp;nbsp;output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda 25.3.1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you receive an output like the above, Conda is installed and ready to&amp;nbsp;use.&lt;/p&gt;
&lt;h2 id="step-3-optional-disabling-auto-activation-of-base-environment"&gt;Step 3: (Optional) Disabling Auto-Activation of base Environment&lt;a class="headerlink" href="#step-3-optional-disabling-auto-activation-of-base-environment" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you answered yes in Step 2 &lt;a href="#q3-do-you-wish-to-initialize-conda"&gt;Q3&lt;/a&gt;, the Conda base environment will be activated automatically whenever you open a new terminal&amp;nbsp;session.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
This step is only necessary if you prefer to activate conda environments&amp;nbsp;manually.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Type the following&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;conda&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;--set&lt;span class="w"&gt; &lt;/span&gt;auto_activate&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There will be no output, but this command will update your Conda configuration. If you open a new terminal, you will notice&amp;nbsp;the &lt;code&gt;(base)&lt;/code&gt; label will no longer be&amp;nbsp;visible. &lt;/p&gt;
&lt;p&gt;Now, if you wish to activate the Conda base environment,&amp;nbsp;type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;conda&lt;span class="w"&gt; &lt;/span&gt;activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To exit the environment,&amp;nbsp;type:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;conda&lt;span class="w"&gt; &lt;/span&gt;deactivate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;—&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Footnotes:&lt;/em&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:miniforge-license"&gt;
&lt;p&gt;Miniforge installer code uses the open source &lt;span class="caps"&gt;BSD&lt;/span&gt;-3-Clause license, but the packages that are bundled with the installer might have their own open source licenses. More information at 
&lt;a href="https://github.com/conda-forge/miniforge/blob/main/LICENSE"&gt;https://github.com/conda-forge/miniforge/blob/main/&lt;span class="caps"&gt;LICENSE&lt;/span&gt;&lt;/a&gt;.&amp;#160;&lt;a class="footnote-backref" href="#fnref:miniforge-license" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:conda-command"&gt;
&lt;p&gt;Otherwise, you will need to update&amp;nbsp;your &lt;code&gt;PATH&lt;/code&gt; variable&amp;nbsp;in &lt;code&gt;~/.bashrc&lt;/code&gt; to include the path to your miniforge3 installation.&amp;#160;&lt;a class="footnote-backref" href="#fnref:conda-command" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="Software"/><category term="Miniforge"/><category term="Conda"/></entry><entry><title>Getting the Lineage of an Organism Using Python, BioSQL, and Taxonomy Data</title><link href="https://vimalkvn.gitlab.io/blog/getting-lineage-using-python-taxonomy-data/" rel="alternate"/><published>2018-07-14T00:00:00+01:00</published><updated>2026-03-07T00:00:00+00:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2018-07-14:/blog/getting-lineage-using-python-taxonomy-data/</id><summary type="html">&lt;p&gt;A Python script to obtain the complete taxonomic lineage of
an organism using Python, BioSQL, and &lt;span class="caps"&gt;NCBI&lt;/span&gt; taxonomy&amp;nbsp;data.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;strong&gt;Table of&amp;nbsp;Contents&lt;/strong&gt;&lt;/p&gt;
&lt;div class="toc"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="#introduction"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-1-install-required-software"&gt;Step 1: Install Required&amp;nbsp;Software&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-2-create-a-database-for-storing-taxonomy-data"&gt;Step 2: Create a Database for Storing Taxonomy&amp;nbsp;Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-3-import-ncbi-taxonomy-data-into-database"&gt;Step 3: Import &lt;span class="caps"&gt;NCBI&lt;/span&gt; Taxonomy Data Into&amp;nbsp;Database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#step-4-run-python-script-to-get-lineage"&gt;Step 4: Run Python Script to Get&amp;nbsp;Lineage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;a class="headerlink" href="#introduction" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;You can retrieve the complete taxonomic lineage of an organism by querying the &lt;span class="caps"&gt;NCBI&lt;/span&gt; Taxonomy database using the &lt;a href="https://www.ncbi.nlm.nih.gov/books/NBK25497/"&gt;Entrez &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt;. The method described here &lt;strong&gt;works offline&lt;/strong&gt; and will be useful if you need to retrieve  the taxonomic lineage for a large number of organisms at&amp;nbsp;once.&lt;/p&gt;
&lt;p&gt;Much of the information in this blog post comes from the documentation of the &lt;a href="https://biosql.org/"&gt;BioSQL&lt;/a&gt; and &lt;a href="https://biopython.org"&gt;BioPython&lt;/a&gt; projects. In
addition, I wrote a &lt;a href="https://codeberg.org/vimalkvn/lineager"&gt;Python script&lt;/a&gt; to query the taxonomy database and return the  complete lineage of an&amp;nbsp;organism.&lt;/p&gt;
&lt;p&gt;Here is how the script&amp;nbsp;works:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;lineager.py&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;Bos&lt;span class="w"&gt; &lt;/span&gt;taurus
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And the resulting&amp;nbsp;output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;2018-07-14 04:47 INFO     Processing organism name provided&lt;/span&gt;
&lt;span class="go"&gt;                          at the command line: Bos taurus&lt;/span&gt;
&lt;span class="go"&gt;Organism,Lineage&lt;/span&gt;
&lt;span class="go"&gt;Bos taurus,cellular organisms;Eukaryota;Opisthokonta;Metazoa;&lt;/span&gt;
&lt;span class="go"&gt;Eumetazoa;Bilateria;Deuterostomia;Chordata;Craniata;Vertebrata;&lt;/span&gt;
&lt;span class="go"&gt;Gnathostomata;Teleostomi;Euteleostomi;Sarcopterygii;&lt;/span&gt;
&lt;span class="go"&gt;Dipnotetrapodomorpha;Tetrapoda;Amniota;Mammalia;Theria;&lt;/span&gt;
&lt;span class="go"&gt;Eutheria;Boreoeutheria;Laurasiatheria;Cetartiodactyla;&lt;/span&gt;
&lt;span class="go"&gt;Ruminantia;Pecora;Bovidae;Bovinae;Bos;Bos taurus&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can also provide an input file&amp;nbsp;(&lt;code&gt;-f&lt;/code&gt;), containing names of organisms. See the example towards the end of this blog&amp;nbsp;post.&lt;/p&gt;
&lt;h2 id="step-1-install-required-software"&gt;Step 1: Install Required Software&lt;a class="headerlink" href="#step-1-install-required-software" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;These steps were tested in &lt;strong&gt;Ubuntu 24.04 &lt;span class="caps"&gt;LTS&lt;/span&gt;&lt;/strong&gt; with the following programs&amp;nbsp;installed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MySQL&lt;/strong&gt; 8.0.45&lt;br&gt;
  For storing taxonomy&amp;nbsp;data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Perl&lt;/strong&gt; 5.38.2 with the &lt;span class="caps"&gt;DBI&lt;/span&gt;, &lt;span class="caps"&gt;DBD&lt;/span&gt;, and libwww-perl modules&lt;br&gt;
  For initialising the database with the BioSQL schema and for importing taxonomy data. Optionally, the perl-doc package for viewing&amp;nbsp;documentation. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; 3.12.3 with the MySQLdb package&lt;br&gt;
  For running&amp;nbsp;the &lt;code&gt;lineager.py&lt;/code&gt; script.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
sudo privileges are required only for installing packages, creating the database, and creating the database user.&lt;br&gt;
&lt;strong&gt;All other commands are run from a regular user&amp;nbsp;account.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Install MySQL using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;mysql-server
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once the installation is complete, check if the MySQL server is up and running using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;ss&lt;span class="w"&gt; &lt;/span&gt;-tap&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;mysql
&lt;span class="go"&gt;LISTEN 0      151        127.0.0.1:mysql       0.0.0.0:*    users:((&amp;quot;mysqld&amp;quot;,pid=1323,fd=23))&lt;/span&gt;
&lt;span class="go"&gt;LISTEN 0      70         127.0.0.1:33060       0.0.0.0:*    users:((&amp;quot;mysqld&amp;quot;,pid=1323,fd=21))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
For additional information on installing and configuring MySQL, please refer to the &lt;a href="https://ubuntu.com/server/docs/how-to/databases/install-mysql/"&gt;Installing MySQL&lt;/a&gt; section of the Ubuntu Server&amp;nbsp;documentation.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Install remaining packages&amp;nbsp;using &lt;code&gt;apt&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;libdbi-perl&lt;span class="w"&gt; &lt;/span&gt;libdbd-mysql-perl&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;libmysqlclient-dev&lt;span class="w"&gt; &lt;/span&gt;python3-mysqldb&lt;span class="w"&gt; &lt;/span&gt;perl-doc&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;libwww-perl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-2-create-a-database-for-storing-taxonomy-data"&gt;Step 2: Create a Database for Storing Taxonomy Data&lt;a class="headerlink" href="#step-2-create-a-database-for-storing-taxonomy-data" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Login as the mysql admin&amp;nbsp;user:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;mysql&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;root
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="create-database"&gt;Create Database&lt;a class="headerlink" href="#create-database" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Run the following &lt;span class="caps"&gt;SQL&lt;/span&gt; command. Note the use of backticks (`) around the database name&amp;nbsp;(&lt;code&gt;biosql&lt;/code&gt;), instead of single&amp;nbsp;quotes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;DATABASE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="n"&gt;biosql&lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;COLLATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf8_general_ci&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="create-database-user"&gt;Create Database User&lt;a class="headerlink" href="#create-database-user" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Run the following command to create a database user. Also, grant this user permissions to access and modify the biosql&amp;nbsp;database.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
Replace &amp;#8216;your-password-here&amp;#8217; with a strong password in the command&amp;nbsp;below.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="n"&gt;lineager&lt;/span&gt;&lt;span class="o"&gt;`@`&lt;/span&gt;&lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IDENTIFIED&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;BY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;your-password-here&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;GRANT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ALL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;PRIVILEGES&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;ON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="n"&gt;biosql&lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="n"&gt;lineager&lt;/span&gt;&lt;span class="o"&gt;`@`&lt;/span&gt;&lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="o"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Type &lt;code&gt;exit&lt;/code&gt; to quit the MySQL&amp;nbsp;shell.&lt;/p&gt;
&lt;h3 id="initialise-database-with-biosql-schema"&gt;Initialise Database With BioSQL Schema&lt;a class="headerlink" href="#initialise-database-with-biosql-schema" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First, create a file&amp;nbsp;named &lt;code&gt;.my.cnf&lt;/code&gt; in the user &lt;span class="caps"&gt;HOME&lt;/span&gt; directory with the following&amp;nbsp;content:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[client]&lt;/span&gt;
&lt;span class="na"&gt;user&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;lineager&lt;/span&gt;
&lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;your-password-here&lt;/span&gt;
&lt;span class="na"&gt;database&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;biosql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This file is used for connecting to the database from&amp;nbsp;the &lt;code&gt;lineager.py&lt;/code&gt; script.&amp;nbsp;Replace &lt;code&gt;your-password-here&lt;/code&gt; with the password you set above in Step&amp;nbsp;2.&lt;/p&gt;
&lt;p&gt;Since&amp;nbsp;the &lt;code&gt;.my.cnf&lt;/code&gt; file contains the database password in plain text, it is a good idea to make it readable only for the current user. To do this, use the following&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;chmod&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~/.my.cnf
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next, download the BioSQL&amp;nbsp;schema:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;wget&lt;span class="w"&gt; &lt;/span&gt;https://github.com/biosql/biosql/archive/refs/heads/master.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Extract the archive and change&amp;nbsp;directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;unzip&lt;span class="w"&gt; &lt;/span&gt;master.zip
&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;biosql-master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Initialise database by running&amp;nbsp;the &lt;code&gt;biosqldb-mysql.sql&lt;/code&gt; script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;mysql&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;lineager&lt;span class="w"&gt; &lt;/span&gt;-D&lt;span class="w"&gt; &lt;/span&gt;biosql&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;&lt;span class="w"&gt; &lt;/span&gt;sql/biosqldb-mysql.sql
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-3-import-ncbi-taxonomy-data-into-database"&gt;Step 3: Import &lt;span class="caps"&gt;NCBI&lt;/span&gt; Taxonomy Data Into Database&lt;a class="headerlink" href="#step-3-import-ncbi-taxonomy-data-into-database" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While still in&amp;nbsp;the &lt;code&gt;biosql-master&lt;/code&gt; directory,
create a directory to store taxonomy data and change into&amp;nbsp;it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;mkdir&lt;span class="w"&gt; &lt;/span&gt;taxdata
&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;taxdata
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Download the taxonomy database (~&lt;span class="caps"&gt;70MB&lt;/span&gt;) and its  &lt;span class="caps"&gt;MD5&lt;/span&gt;&amp;nbsp;checksum:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;wget&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
&lt;span class="gp"&gt;$ &lt;/span&gt;wget&lt;span class="w"&gt; &lt;/span&gt;https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz.md5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Ensure the file has downloaded correctly by verifying its &lt;span class="caps"&gt;MD5&lt;/span&gt; checksum. A successful download should return &amp;#8220;&lt;span class="caps"&gt;OK&lt;/span&gt;&amp;#8221;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;md5sum&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;taxdump.tar.gz.md5
&lt;span class="go"&gt;taxdump.tar.gz: OK&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Uncompress the&amp;nbsp;archive:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;tar&lt;span class="w"&gt; &lt;/span&gt;zxvf&lt;span class="w"&gt; &lt;/span&gt;taxdump.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Before running the script to import taxonomy data, set&amp;nbsp;the &lt;code&gt;DBI_PASSWORD&lt;/code&gt;
environment variable. 
This is the same password you set for the database user in Step&amp;nbsp;2:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;export&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;DBI_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;your-password-here&amp;#39;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now run the script to import taxonomy data into the&amp;nbsp;database:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;..
&lt;span class="gp"&gt;$ &lt;/span&gt;perl&lt;span class="w"&gt; &lt;/span&gt;scripts/load_ncbi_taxonomy.pl&lt;span class="w"&gt; &lt;/span&gt;--dbname&lt;span class="w"&gt; &lt;/span&gt;biosql&lt;span class="w"&gt; &lt;/span&gt;--dbuser&lt;span class="w"&gt; &lt;/span&gt;lineager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
This will take a long time to complete. Leave the terminal session&amp;nbsp;open.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Loading NCBI taxon database in taxdata:&lt;/span&gt;
&lt;span class="go"&gt;    ... retrieving all taxon nodes in the database&lt;/span&gt;
&lt;span class="go"&gt;    ... reading in taxon nodes from nodes.dmp&lt;/span&gt;
&lt;span class="go"&gt;    ... insert / update / delete taxon nodes&lt;/span&gt;
&lt;span class="go"&gt;    ... updating new parent IDs&lt;/span&gt;
&lt;span class="go"&gt;    ... (committing nodes)&lt;/span&gt;
&lt;span class="go"&gt;    ... rebuilding nested set left/right values&lt;/span&gt;
&lt;span class="go"&gt;    ... reading in taxon names from names.dmp&lt;/span&gt;
&lt;span class="go"&gt;    ... deleting old taxon names&lt;/span&gt;
&lt;span class="go"&gt;    ... inserting new taxon names&lt;/span&gt;
&lt;span class="go"&gt;    ... cleaning up&lt;/span&gt;
&lt;span class="go"&gt;Done.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To view all the options supported by the script, use the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;perl&lt;span class="w"&gt; &lt;/span&gt;scripts/load_ncbi_taxonomy.pl&lt;span class="w"&gt; &lt;/span&gt;--help
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-4-run-python-script-to-get-lineage"&gt;Step 4: Run Python Script to Get Lineage&lt;a class="headerlink" href="#step-4-run-python-script-to-get-lineage" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Download the source code of lineager using&amp;nbsp;wget:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;
&lt;span class="gp"&gt;$ &lt;/span&gt;wget&lt;span class="w"&gt; &lt;/span&gt;https://codeberg.org/vimalkvn/lineager/archive/master.zip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Alternatively, clone the Git&amp;nbsp;repository:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;https://codeberg.org/vimalkvn/lineager
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Run&amp;nbsp;the &lt;code&gt;lineager.py&lt;/code&gt; script with the name of the organism, for&amp;nbsp;example:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;lineager
&lt;span class="gp"&gt;$ &lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;lineager.py&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;Escherichia&lt;span class="w"&gt; &lt;/span&gt;coli
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Organism,Lineage&lt;/span&gt;
&lt;span class="go"&gt;Escherichia coli,cellular organisms;Bacteria;Pseudomonadati;Pseudomonadota;Gammaproteobacteria;Enterobacterales;Enterobacteriaceae;Escherichia;Escherichia coli&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can also get the lineage for multiple organisms at once. To do this, create a text file containing names of organisms like&amp;nbsp;this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Canis lupus familiaris
Bos taurus
Escherichia
AMBIGUOUS
Arabidopsis thaliana
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save the file&amp;nbsp;as &lt;code&gt;input.txt&lt;/code&gt; and then, run the script like&amp;nbsp;this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gp"&gt;$ &lt;/span&gt;python3&lt;span class="w"&gt; &lt;/span&gt;lineager.py&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;input.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;When complete, an output&amp;nbsp;file &lt;code&gt;lineage.csv&lt;/code&gt; will be
generated in the same directory containing lineage information for all organisms in the input&amp;nbsp;file.&lt;/p&gt;
&lt;p&gt;If you have any questions or comments, please &lt;a href="mailto:contact@vimalkvn.com"&gt;send me an email&lt;/a&gt;.&lt;/p&gt;
&lt;hr&gt;</content><category term="Programming"/><category term="MySQL"/><category term="BioPython"/><category term="BioSQL"/><category term="Perl"/><category term="Python"/></entry><entry><title>Running Galaxy Project on Ubuntu 16.04 LTS</title><link href="https://vimalkvn.gitlab.io/blog/running-galaxy-project-on-ubuntu/" rel="alternate"/><published>2017-11-30T00:00:00+00:00</published><updated>2021-08-18T00:00:00+01:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2017-11-30:/blog/running-galaxy-project-on-ubuntu/</id><summary type="html">&lt;p&gt;This is a step-by-step tutorial on running an instance
of the Galaxy platform (v17.09) for biomedical research on Ubuntu 16.04 &lt;span class="caps"&gt;LTS&lt;/span&gt;.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;Updates&lt;/em&gt;&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Aug 18,&amp;nbsp;2021&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;The title of this blog post is changed from
&lt;em&gt;&amp;#8220;Setup your own instance of the Galaxy Bioinformatics platform on DigitalOcean&amp;#8221;&lt;/em&gt;
to &lt;em&gt;&amp;#8220;Running Galaxy project on Ubuntu&amp;#8221;&lt;/em&gt;, as these steps can be
performed on a standalone Ubuntu system and on
&lt;span class="caps"&gt;VPS&lt;/span&gt; providers other than&amp;nbsp;DigitalOcean.&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;URL&lt;/span&gt; of this blog post is changed from
https://vimal.io/setup-your-own-galaxy-bioinformatics-instance-on-digitalocean/
to &lt;a href="https://vimakvn.com/running-galaxy-project-on-ubuntu"&gt;https://vimakvn.com/running-galaxy-project-on-ubuntu&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Minor updates to text, links, and&amp;nbsp;formatting.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;hr&gt;
&lt;p&gt;I will use DigitalOcean as the &lt;span class="caps"&gt;VPS&lt;/span&gt; provider in this tutorial, but you can
perform these steps on any Ubuntu&amp;nbsp;system.&lt;/p&gt;
&lt;p&gt;When complete, you will have an instance of Galaxy which can be used to host tools
developed by the research&amp;nbsp;group.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s begin by creating the virtual&amp;nbsp;server.&lt;/p&gt;
&lt;h2 id="step-1-create-the-virtual-server-droplet"&gt;Step 1: Create the virtual server (droplet)&lt;a class="headerlink" href="#step-1-create-the-virtual-server-droplet" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;First, you will need an account on &lt;a href="https://www.digitalocean.com/"&gt;DigitalOcean&lt;/a&gt;, which is a paid&amp;nbsp;service.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you would like to support my work, you can use this &lt;a href="https://m.do.co/c/7c4902411017"&gt;referral link&lt;/a&gt;
  to sign up on DigitalOcean. You will get a $100, 60-day&amp;nbsp;credit.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Once you have confirmed your email account and completed the verification step by adding a payment method, your can start creating virtual
servers — also known as &lt;em&gt;droplets&lt;/em&gt;.&lt;/p&gt;
&lt;figure class="kg-card kg-embed-card kg-card-hascaption"&gt;
    &lt;iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Vt0ETp2Ok-Q" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;
    &lt;figcaption&gt;Video: Creating a droplet&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;The server we are going to create will be based on &lt;a href="https://www.ubuntu.com"&gt;Ubuntu&lt;/a&gt; 16.04 &lt;span class="caps"&gt;LTS&lt;/span&gt; and will cost about $5 per month for the basic configuration
— &lt;span class="caps"&gt;512MB&lt;/span&gt; Memory, 1 &lt;span class="caps"&gt;CPU&lt;/span&gt; and a &lt;span class="caps"&gt;20GB&lt;/span&gt; Hard&amp;nbsp;disk.&lt;/p&gt;
&lt;p&gt;To create a new&amp;nbsp;droplet:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Click on the &lt;strong&gt;Create Droplet&lt;/strong&gt;&amp;nbsp;button.&lt;/li&gt;
&lt;li&gt;In the next page, click on the &lt;strong&gt;$5/mo&lt;/strong&gt; server panel in
   the &lt;strong&gt;Choose a size&lt;/strong&gt;&amp;nbsp;section.&lt;/li&gt;
&lt;li&gt;Leave all other options at their defaults and then click on
   the &lt;strong&gt;Create&lt;/strong&gt; button at the bottom of the&amp;nbsp;page.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the droplet is created, you will receive an email with details
for accessing the droplet using &lt;span class="caps"&gt;SSH&lt;/span&gt; — &lt;span class="caps"&gt;IP&lt;/span&gt; Address, Username and Password. You
can connect to the droplet using&amp;nbsp;the &lt;code&gt;ssh&lt;/code&gt; command like this &lt;sup id="fnref:f1"&gt;&lt;a class="footnote-ref" href="#fn:f1"&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ssh&lt;span class="w"&gt; &lt;/span&gt;root@server-ip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You will be prompted to change the root password when you first&amp;nbsp;login.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;IMPORTANT&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
Please make sure to destroy the droplet if you are only using it for the purpose of this tutorial. Droplets that are powered down will still be charged after the credit is used&amp;nbsp;up!&lt;/p&gt;
&lt;p&gt;We can now proceed towards configuring the&amp;nbsp;droplet.&lt;/p&gt;
&lt;h2 id="step-2-configure-droplet"&gt;Step 2: Configure droplet&lt;a class="headerlink" href="#step-2-configure-droplet" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="21-create-user-with-administrative-access"&gt;2.1 Create user with administrative access&lt;a class="headerlink" href="#21-create-user-with-administrative-access" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For all administrative functions like installing software, creating user accounts,
database and configuring the web server, we will create a separate account
with administrator privileges. This can be done by adding the user to the &lt;strong&gt;sudo&lt;/strong&gt;
group. In the following example, I am creating a new admin user&amp;nbsp;called &lt;code&gt;vimal&lt;/code&gt; and setting a&amp;nbsp;password:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;useradd&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;/bin/bash&lt;span class="w"&gt; &lt;/span&gt;-G&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;vimal
passwd&lt;span class="w"&gt; &lt;/span&gt;vimal
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Login as the admin user using &lt;span class="caps"&gt;SSH&lt;/span&gt; to continue with the rest of the&amp;nbsp;tutorial:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ssh&lt;span class="w"&gt; &lt;/span&gt;vimal@server-ip
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="22-add-swap-space"&gt;2.2 Add swap space&lt;a class="headerlink" href="#22-add-swap-space" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The database migration scripts that run when Galaxy is first launched require more memory than we have available (&lt;span class="caps"&gt;512MB&lt;/span&gt;). We can make use of a swap file so
this process&amp;nbsp;completes.&lt;/p&gt;
&lt;p&gt;To create and activate a &lt;span class="caps"&gt;2GB&lt;/span&gt; swap file in the Root (/) partition, the following commands can be&amp;nbsp;used:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;fallocate&lt;span class="w"&gt; &lt;/span&gt;-l&lt;span class="w"&gt; &lt;/span&gt;2G&lt;span class="w"&gt; &lt;/span&gt;/swapfile
sudo&lt;span class="w"&gt; &lt;/span&gt;chmod&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;600&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/swapfile
sudo&lt;span class="w"&gt; &lt;/span&gt;mkswap&lt;span class="w"&gt; &lt;/span&gt;/swapfile
sudo&lt;span class="w"&gt; &lt;/span&gt;swapon&lt;span class="w"&gt; &lt;/span&gt;/swapfile
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Enable swap on boot by adding the following line&amp;nbsp;to &lt;code&gt;/etc/fstab&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/swapfile   none    swap    sw    0   0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;NOTE&lt;/span&gt;&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;This is only a temporary&amp;nbsp;measure.&lt;/em&gt;  &lt;/p&gt;
&lt;p&gt;Frequent use of swap will degrade performance of both the application and the
hardware. Also, programs requiring more memory (example: alignment) will fail
to work. It is better to upgrade to a plan with more memory (&lt;span class="caps"&gt;RAM&lt;/span&gt;) for better&amp;nbsp;performance.&lt;/p&gt;
&lt;p&gt;We can now proceed towards installing required&amp;nbsp;software.&lt;/p&gt;
&lt;h3 id="23-install-required-software"&gt;2.3 Install required software&lt;a class="headerlink" href="#23-install-required-software" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;First, refresh the package repositories, then upgrade system packages and then remove packages that are no longer required. All these steps can be done using the following&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;update&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;upgrade&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;autoremove
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Install build tools, &lt;a href="https://git-scm.com/"&gt;Git&lt;/a&gt;, &lt;a href="https://apache.org"&gt;Apache&lt;/a&gt; web server and required modules, &lt;a href="https://virtualenv.pypa.io/en/stable/"&gt;Virtualenv&lt;/a&gt; for creating virtual Python environments, libraries and functions required
for building Python packages, the PostgreSQL_ database server, client and&amp;nbsp;libraries:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;build-essential&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;apache2&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
libapache2-mod-xsendfile&lt;span class="w"&gt; &lt;/span&gt;virtualenv&lt;span class="w"&gt; &lt;/span&gt;python-dev&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
postgresql&lt;span class="w"&gt; &lt;/span&gt;postgresql-contrib&lt;span class="w"&gt; &lt;/span&gt;postgresql-client&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
libpq-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="24-set-postgresql-administrator-password"&gt;2.4 Set PostgreSQL administrator password&lt;a class="headerlink" href="#24-set-postgresql-administrator-password" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Set a password for the PostgreSQL administrator account — postgres&amp;nbsp;using &lt;code&gt;psql&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;postgres&lt;span class="w"&gt; &lt;/span&gt;psql&lt;span class="w"&gt; &lt;/span&gt;template1
&lt;span class="nv"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="c1"&gt;# \password postgres&lt;/span&gt;
&lt;span class="nv"&gt;postgres&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="c1"&gt;# \q&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="25-enable-required-apache-modules"&gt;2.5 Enable required Apache modules&lt;a class="headerlink" href="#25-enable-required-apache-modules" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Enable modules necessary for running Galaxy under Apache.
Restart apache2 service for configuration to take&amp;nbsp;effect:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;a2enmod&lt;span class="w"&gt; &lt;/span&gt;rewrite&lt;span class="w"&gt; &lt;/span&gt;xsendfile&lt;span class="w"&gt; &lt;/span&gt;expires&lt;span class="w"&gt; &lt;/span&gt;proxy&lt;span class="w"&gt; &lt;/span&gt;proxy_http&lt;span class="w"&gt; &lt;/span&gt;deflate&lt;span class="w"&gt; &lt;/span&gt;headers
sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;restart&lt;span class="w"&gt; &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="26-create-galaxy-user-accounts-and-database"&gt;2.6 Create Galaxy user accounts and database&lt;a class="headerlink" href="#26-create-galaxy-user-accounts-and-database" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Create a Linux user account called &lt;strong&gt;galaxy&lt;/strong&gt; and set a password for this&amp;nbsp;user:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;useradd&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;/bin/bash&lt;span class="w"&gt; &lt;/span&gt;galaxy
sudo&lt;span class="w"&gt; &lt;/span&gt;passwd&lt;span class="w"&gt; &lt;/span&gt;galaxy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As PostgreSQL administrator, create a database user called
&lt;strong&gt;galaxy&lt;/strong&gt; and a database owned by that user, also called &lt;strong&gt;galaxy&lt;/strong&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;postgres&lt;span class="w"&gt; &lt;/span&gt;createuser&lt;span class="w"&gt; &lt;/span&gt;-P&lt;span class="w"&gt; &lt;/span&gt;galaxy
sudo&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;postgres&lt;span class="w"&gt; &lt;/span&gt;createdb&lt;span class="w"&gt; &lt;/span&gt;-O&lt;span class="w"&gt; &lt;/span&gt;galaxy&lt;span class="w"&gt; &lt;/span&gt;galaxy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-2-configure-the-apache-web-server"&gt;Step 2: Configure the Apache web server&lt;a class="headerlink" href="#step-2-configure-the-apache-web-server" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We will serve the Galaxy web interface from a sub directory like&lt;br&gt;
&lt;code&gt;http://server-ip/galaxy&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To do this, create a new VirtualHost configuration by creating a file&lt;br&gt;
&lt;code&gt;/etc/apache2/sites-available/galaxy.conf&lt;/code&gt;&lt;br&gt;
as the admin user and add the following&amp;nbsp;content:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;*:80&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c"&gt;# ServerName is currently set to the IP address. When a domain name is&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c"&gt;# available, this directive should be updated&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;ServerName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;server-ip
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;ErrorLog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;${APACHE_LOG_DIR}/galaxy-error.log
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;CustomLog&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;${APACHE_LOG_DIR}/galaxy-access.log&lt;span class="w"&gt; &lt;/span&gt;combined

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteEngine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;On&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy$&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/galaxy/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[R]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy/static/style/(.*)&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/home/galaxy/galaxy/static/june_2007_style/blue/&lt;/span&gt;$1&lt;span class="w"&gt; &lt;/span&gt;[L]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy/static/scripts/(.*)&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/home/galaxy/galaxy/static/scripts/packed/&lt;/span&gt;$1&lt;span class="w"&gt; &lt;/span&gt;[L]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy/static/(.*)&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/home/galaxy/galaxy/static/&lt;/span&gt;$1&lt;span class="w"&gt; &lt;/span&gt;[L]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy/favicon.ico&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/home/galaxy/galaxy/static/favicon.ico&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[L]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy/robots.txt&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/home/galaxy/galaxy/static/robots.txt&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[L]
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;RewriteRule&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;^/galaxy(.*)&lt;span class="w"&gt; &lt;/span&gt;http://localhost:8080$1&lt;span class="w"&gt; &lt;/span&gt;[P]

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/galaxy&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c"&gt;# Compress all uncompressed content.&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;SetOutputFilter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;DEFLATE
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;SetEnvIfNoCase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Request_URI&lt;span class="w"&gt; &lt;/span&gt;\.(?:gif|jpe?g|png)$&lt;span class="w"&gt; &lt;/span&gt;no-gzip&lt;span class="w"&gt; &lt;/span&gt;dont-vary
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;SetEnvIfNoCase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Request_URI&lt;span class="w"&gt; &lt;/span&gt;\.(?:t?gz|zip|bz2)$&lt;span class="w"&gt; &lt;/span&gt;no-gzip&lt;span class="w"&gt; &lt;/span&gt;dont-vary
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;SetEnvIfNoCase&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Request_URI&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sx"&gt;/history/export_archive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;no-gzip&lt;span class="w"&gt; &lt;/span&gt;dont-vary
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;XSendFile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;on&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;XSendFilePath&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Location&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;/galaxy/static&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c"&gt;# Allow browsers to cache everything from /galaxy/static for 6 hours&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;Require&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;all&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;granted
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;ExpiresActive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;On&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;ExpiresDefault&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;access plus 6 hours&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/Location&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save the file and then enable the site i.e., this VirtualHost configuration and
reload&amp;nbsp;Apache:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;a2ensite&lt;span class="w"&gt; &lt;/span&gt;galaxy
sudo&lt;span class="w"&gt; &lt;/span&gt;systemctl&lt;span class="w"&gt; &lt;/span&gt;reload&lt;span class="w"&gt; &lt;/span&gt;apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-3-download-configure-and-start-galaxy"&gt;Step 3: Download, configure and start Galaxy&lt;a class="headerlink" href="#step-3-download-configure-and-start-galaxy" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Login as the &lt;strong&gt;galaxy&lt;/strong&gt; user using &lt;span class="caps"&gt;SSH&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Clone the current stable galaxy release &lt;sup id="fnref:f2"&gt;&lt;a class="footnote-ref" href="#fn:f2"&gt;2&lt;/a&gt;&lt;/sup&gt; using&amp;nbsp;Git:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;-b&lt;span class="w"&gt; &lt;/span&gt;release_17.09&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;   &lt;/span&gt;https://github.com/galaxyproject/galaxy.git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Create a Python 2 virtual environment for&amp;nbsp;galaxy:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;galaxy
virtualenv&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;python2&lt;span class="w"&gt; &lt;/span&gt;galaxy_env
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Create a configuration for Galaxy by making a copy of the
sample&amp;nbsp;configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cp&lt;span class="w"&gt; &lt;/span&gt;config/galaxy.ini.sample&lt;span class="w"&gt; &lt;/span&gt;config/galaxy.ini
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Make changes&amp;nbsp;in &lt;code&gt;galaxy.ini&lt;/code&gt; as given below. There are detailed
comments in this file as to what these options&amp;nbsp;do.&lt;/p&gt;
&lt;p&gt;As we are using Apache as the proxy server uncomment&amp;nbsp;the &lt;code&gt;filter-with&lt;/code&gt;
option and specify&amp;nbsp;the &lt;code&gt;cookie_path&lt;/code&gt; option in&amp;nbsp;the &lt;code&gt;[app:main]&lt;/code&gt;
section:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;[app:main]&lt;/span&gt;
&lt;span class="na"&gt;filter-with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;proxy-prefix&lt;/span&gt;
&lt;span class="na"&gt;cookie_path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/galaxy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As we are using PostgreSQL,&amp;nbsp;the &lt;code&gt;database_connection&lt;/code&gt; setting in the
Database section should be changed to the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;database_connection&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;postgresql:///galaxy?host=/var/run/postgresql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For better performance with large database queries in PostgreSQL, we
can also set the&amp;nbsp;following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;database_engine_option_server_side_cursors&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Also to use Apache to handle file downloads instead of Galaxy&amp;#8217;s own &lt;span class="caps"&gt;HTTP&lt;/span&gt; server,
we will need to set the&amp;nbsp;following &lt;code&gt;apache_xsendfile&lt;/code&gt; option in&amp;nbsp;the
&lt;code&gt;[app:main]&lt;/code&gt; section:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;apache_xsendfile&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;True&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As this is a production server, disable live&amp;nbsp;debugging:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;use_interactive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, in the Users and Security section, add your email address to&amp;nbsp;the &lt;code&gt;admin_users&lt;/code&gt; variable:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;admin_users&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;you@email.com&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If public access to this instance is not desired, disable anonymous access and
disable user&amp;nbsp;registration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;require_login&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;True&lt;/span&gt;
&lt;span class="na"&gt;allow_user_creation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Save &lt;code&gt;galaxy.ini&lt;/code&gt;, activate virtualenv and then
start Galaxy in daemon&amp;nbsp;mode:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# Activate the virtualenv&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;galaxy_env/bin/activate

&lt;span class="c1"&gt;# Start Galaxy in daemon mode&lt;/span&gt;
./run.sh&lt;span class="w"&gt; &lt;/span&gt;--daemon
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A log&amp;nbsp;file, &lt;code&gt;paster.log&lt;/code&gt; will be generated in the same directory.
Once the&amp;nbsp;message &lt;code&gt;Entering daemon mode&lt;/code&gt; is displayed, use the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tail&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;paster.log
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to view the log. When the script has
finished initialisation, the following message will&amp;nbsp;appear:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;serving on http://127.0.0.1:8080&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;At this stage,&amp;nbsp;visit &lt;code&gt;http://server.ip/galaxy&lt;/code&gt;, register an account with the
same email address specified&amp;nbsp;under &lt;code&gt;admin_users&lt;/code&gt; and&amp;nbsp;login.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Start page of Galaxy" src="https://vimalkvn.gitlab.io/blog/2017/images/galaxy_start.jpg"&gt;&lt;/p&gt;
&lt;h2 id="step-4-improving-security-and-performance-updating-galaxy"&gt;Step 4: Improving security and performance, updating Galaxy&lt;a class="headerlink" href="#step-4-improving-security-and-performance-updating-galaxy" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="41-secure-ssh-access"&gt;4.1 Secure &lt;span class="caps"&gt;SSH&lt;/span&gt; access&lt;a class="headerlink" href="#41-secure-ssh-access" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In the default setup, &lt;span class="caps"&gt;SSH&lt;/span&gt; runs on port 22 and allows all users to login
with a password including root. These are some additional steps for securing
&lt;span class="caps"&gt;SSH&lt;/span&gt; access. All these configuration changes should be made
in the&amp;nbsp;file &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id="change-default-port"&gt;Change default port&lt;a class="headerlink" href="#change-default-port" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The port that &lt;span class="caps"&gt;SSH&lt;/span&gt; listens on is specified in&amp;nbsp;the &lt;code&gt;Port&lt;/code&gt; option:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;Port 22&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To prevent unauthorised login attempts on the default &lt;span class="caps"&gt;SSH&lt;/span&gt; port (22), the
recommendation is to change the port to a number less than 1024.
The port that is selected should not currently be used by any other service.
You can check the list of ports currently assiged to services
&lt;a href="https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers"&gt;here&lt;/a&gt;
or lookup &lt;span class="caps"&gt;IANA&lt;/span&gt; port&amp;nbsp;assignments.&lt;/p&gt;
&lt;p&gt;Once the port is changed, restart the sshd service, open the specified
port in firewall (Refer: Configure firewall section below). Test if &lt;span class="caps"&gt;SSH&lt;/span&gt; access is working
and then close port 22 in&amp;nbsp;firewall.&lt;/p&gt;
&lt;h4 id="disable-root-login"&gt;Disable root login&lt;a class="headerlink" href="#disable-root-login" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;If you do need to login as root, you can do so&amp;nbsp;using &lt;code&gt;su -&lt;/code&gt; once logged in
with a regular user&amp;nbsp;account:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;PermitRootLogin no&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4 id="disable-password-authentication"&gt;Disable password authentication&lt;a class="headerlink" href="#disable-password-authentication" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;As an increased security measure, setup &lt;span class="caps"&gt;SSH&lt;/span&gt; key based authentication.
Here is a &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2"&gt;tutorial&lt;/a&gt;
explaining the procedure. Once all users have &lt;span class="caps"&gt;SSH&lt;/span&gt; keys setup and working
(&lt;strong&gt;important!&lt;/strong&gt;), disable login with password&amp;nbsp;completely:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;PasswordAuthentication no&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4 id="restrict-users-with-ssh-access"&gt;Restrict users with &lt;span class="caps"&gt;SSH&lt;/span&gt; access&lt;a class="headerlink" href="#restrict-users-with-ssh-access" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Only the users specified here will be allowed to connect. Accepts a space
separated list of user&amp;nbsp;names::&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;AllowUsers galaxy vimal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="42-configure-firewall"&gt;4.2 Configure firewall&lt;a class="headerlink" href="#42-configure-firewall" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A firewall can be enabled and rules can be configured to allow access only to
specific ports and&amp;nbsp;services.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="caps"&gt;NOTE&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This following commands assume that &lt;span class="caps"&gt;SSH&lt;/span&gt; is running on port 822 instead of the
default (22). If your configuration is different, please change the port&amp;nbsp;accordingly.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;One possibility would be to use the Cloud Firewall function available on
DigitalOcean and create a configuration which can be applied to the droplet. A
tutorial is available &lt;a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-cloud-firewalls"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;An example configuration allowing access to &lt;span class="caps"&gt;SSH&lt;/span&gt;(822), &lt;span class="caps"&gt;HTTP&lt;/span&gt;(80) and &lt;span class="caps"&gt;HTTPS&lt;/span&gt;(443)
is&amp;nbsp;below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="DigitalOcean Cloud Firewall rules to allow acccess to SSH, HTTP and HTTPS" src="https://vimalkvn.gitlab.io/blog/2017/images/do_firewall.jpg"&gt;&lt;/p&gt;
&lt;p&gt;An alternative firewall configuration using &lt;span class="caps"&gt;UFW&lt;/span&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ufw&lt;span class="w"&gt; &lt;/span&gt;allow&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;822&lt;/span&gt;
ufw&lt;span class="w"&gt; &lt;/span&gt;allow&lt;span class="w"&gt; &lt;/span&gt;http
ufw&lt;span class="w"&gt; &lt;/span&gt;allow&lt;span class="w"&gt; &lt;/span&gt;https
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Check&amp;nbsp;status&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ufw&lt;span class="w"&gt; &lt;/span&gt;status
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Status: active&lt;/span&gt;

&lt;span class="go"&gt;To                         Action      From&lt;/span&gt;
&lt;span class="go"&gt;--                         ------      ----&lt;/span&gt;
&lt;span class="go"&gt;822                        ALLOW       Anywhere                  &lt;/span&gt;
&lt;span class="go"&gt;80                         ALLOW       Anywhere                  &lt;/span&gt;
&lt;span class="go"&gt;443                        ALLOW       Anywhere                  &lt;/span&gt;
&lt;span class="go"&gt;822 (v6)                   ALLOW       Anywhere (v6)             &lt;/span&gt;
&lt;span class="go"&gt;80 (v6)                    ALLOW       Anywhere (v6)             &lt;/span&gt;
&lt;span class="go"&gt;443 (v6)                   ALLOW       Anywhere (v6)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id="43-enable-https"&gt;4.3 Enable &lt;span class="caps"&gt;HTTPS&lt;/span&gt;&lt;a class="headerlink" href="#43-enable-https" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For encrypted web communications, it is essential to use an &lt;span class="caps"&gt;SSL&lt;/span&gt; certificate and
re-configure Apache. Free &lt;span class="caps"&gt;SSL&lt;/span&gt; certificates can be obtained from
&lt;a href="https://letsencrypt.org/"&gt;Letsencrypt&lt;/a&gt; or &lt;a href="https://www.cloudflare.com/"&gt;Cloudflare&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The following procedure uses a
&lt;a href="https://en.wikipedia.org/wiki/Self-signed_certificate"&gt;self-signed certificate&lt;/a&gt;
(for demonstration only, not&amp;nbsp;recommended).&lt;/p&gt;
&lt;p&gt;Enable Apache &lt;span class="caps"&gt;SSL&lt;/span&gt; &lt;span class="caps"&gt;HTTPS&lt;/span&gt; site configuration and the &lt;span class="caps"&gt;SSL&lt;/span&gt;&amp;nbsp;module:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;a2ensite&lt;span class="w"&gt; &lt;/span&gt;default-ssl.conf
a2enmod&lt;span class="w"&gt; &lt;/span&gt;ssl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now modify the port in galaxy virtualhost configuration from 80 to 443 and
reload apache. It should now be possible to access the web interface&amp;nbsp;at
&lt;code&gt;https://server.ip/galaxy&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="44-keep-your-galaxy-instance-up-to-date"&gt;4.4 Keep your Galaxy instance up to date&lt;a class="headerlink" href="#44-keep-your-galaxy-instance-up-to-date" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;a href="http://announce.list.galaxyproject.org/"&gt;Galaxy mailing list&lt;/a&gt; provides
information on new releases and any security vulnerabilities that have been&amp;nbsp;discovered.&lt;/p&gt;
&lt;p&gt;You can use the following command to get any updates that have since been issued
after the release&amp;nbsp;(&lt;code&gt;17.09&lt;/code&gt; in this&amp;nbsp;example):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;checkout&lt;span class="w"&gt; &lt;/span&gt;release_17.09&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;--ff-only&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;origin&lt;span class="w"&gt; &lt;/span&gt;release_17.09
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;hr&gt;
&lt;p&gt;&lt;em&gt;References&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://galaxyproject.org/admin/get-galaxy/"&gt;Get&amp;nbsp;Galaxy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://galaxyproject.org/admin/config/performance/production-server/"&gt;Running Galaxy in a production&amp;nbsp;environment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://galaxyproject.org/admin/config/apache-proxy/"&gt;Proxying Galaxy with&amp;nbsp;Apache&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://help.ubuntu.com/community/UFW"&gt;&lt;span class="caps"&gt;UFW&lt;/span&gt;&lt;/a&gt;, Ubuntu Community&amp;nbsp;Wiki&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-cloud-firewalls"&gt;An Introduction To DigitalOcean Cloud&amp;nbsp;Firewalls&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://help.ubuntu.com/lts/serverguide/postgresql.html"&gt;PostgreSQL&lt;/a&gt;, Ubuntu Server&amp;nbsp;Guide&lt;/li&gt;
&lt;li&gt;&lt;a href="https://help.ubuntu.com/lts/serverguide/httpd.html"&gt;Apache 2 Web Server&lt;/a&gt;, Ubuntu Server&amp;nbsp;Guide&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2"&gt;How To Set Up &lt;span class="caps"&gt;SSH&lt;/span&gt; Keys&lt;/a&gt;,&amp;nbsp;DigitalOcean&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Footnotes&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;small&gt;Cover photo by
&lt;a href="https://unsplash.com/photos/0o_GEzyargo"&gt;Rafael Cerqueira&lt;/a&gt;
on &lt;a href="https://unsplash.com"&gt;Unsplash&lt;/a&gt;.
&lt;/small&gt;&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:f1"&gt;
&lt;p&gt;If you are on Windows, you can use an &lt;span class="caps"&gt;SSH&lt;/span&gt; client like Putty_.&amp;#160;&lt;a class="footnote-backref" href="#fnref:f1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:f2"&gt;
&lt;p&gt;When this post was written, the latest stable release of Galaxy was 17.09.
   Visit https://galaxyproject.org/admin/get-galaxy/ to find the latest
   stable release.&amp;#160;&lt;a class="footnote-backref" href="#fnref:f2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="Bioinformatics"/><category term="Galaxy"/><category term="Python"/><category term="Linux"/><category term="Ubuntu"/><category term="PostgreSQL"/><category term="Apache"/></entry><entry><title>Docker Images for Bioinformatics Software</title><link href="https://vimalkvn.gitlab.io/blog/docker-images-for-bioinformatics-software/" rel="alternate"/><published>2017-08-03T00:00:00+01:00</published><updated>2021-05-23T00:00:00+01:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2017-08-03:/blog/docker-images-for-bioinformatics-software/</id><summary type="html">&lt;p&gt;How to run containers of &lt;span class="caps"&gt;VIGA&lt;/span&gt;, &lt;span class="caps"&gt;QIIME&lt;/span&gt;, PyFBA, Cutadapt and
&lt;span class="caps"&gt;DADA2&lt;/span&gt; and a helpful wrapper script for non-root&amp;nbsp;users.&lt;/p&gt;</summary><content type="html">&lt;p&gt;These are all published in
the &lt;a href="https://hub.docker.com"&gt;Docker Hub&lt;/a&gt;. If you have Docker installed
and working, you can get them&amp;nbsp;using&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/image_name
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Most of these images are built using a Dockerfile and so can be customized
easily if required. The Dockerfile&amp;#8217;s, scripts and associated help (&lt;span class="caps"&gt;README&lt;/span&gt;)
can all be found in the &lt;a href="https://gitlab.com/vimalkvn/sysadminbio"&gt;sysadminbio&lt;/a&gt;
under &lt;a href="https://gitlab.com/vimalkvn/sysadminbio/tree/master/docker-images"&gt;docker-images&lt;/a&gt;
on&amp;nbsp;GitLab.&lt;/p&gt;
&lt;h2 id="wrapper-script-to-run-containers"&gt;Wrapper script to run containers&lt;a class="headerlink" href="#wrapper-script-to-run-containers" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Most images have a wrapper script included in their respective
directories which can be used to run a container based on the image. For
example, in the case of the &lt;span class="caps"&gt;VIGA&lt;/span&gt; program, this script is&amp;nbsp;called
&lt;code&gt;run-viga&lt;/code&gt;. This is a simple &lt;span class="caps"&gt;BASH&lt;/span&gt; script that calls&amp;nbsp;the &lt;code&gt;docker&lt;/code&gt; command like&amp;nbsp;this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;--rm&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;LOGNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CURRENT_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CURRENT_USER&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-u&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CURRENT_UID&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;:&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;CURRENT_UID&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-v&lt;span class="w"&gt; &lt;/span&gt;/data/databases:/data/databases:ro&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-v&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;:/wdir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;-w&lt;span class="w"&gt; &lt;/span&gt;/wdir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;vimalkvn/viga&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;--rm&lt;/code&gt; ensures container is removed after it has been&amp;nbsp;used.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-e&lt;/code&gt; and &lt;code&gt;-u&lt;/code&gt; options set the user and group id&amp;#8217;s of the files
generated by the container to that of the current user i.e., the user
running the docker command. Without this, files generated will all be
owned by root or another user set in the Docker&amp;nbsp;image.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;-v&lt;/code&gt; option is specific for different images and can be modified if
necessary. The current directory is also exported set as the working
directory&amp;nbsp;(&lt;code&gt;-w&lt;/code&gt;) for the container so input files will be accessible
and any generated output files will also be saved&amp;nbsp;here.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: the wrapper scripts are not necessary to use any of the images&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It is only provided for convenience. Containers can be created from the
images directly using&amp;nbsp;the &lt;code&gt;docker run&lt;/code&gt; command but this would mean that
users will need access to&amp;nbsp;the &lt;code&gt;docker&lt;/code&gt; command i.e., they should belong
to the docker user group which is equivalent of having root access. That is why
this approach would be better. Users will just need to be given sudo
access to the wrapper&amp;nbsp;script.&lt;/p&gt;
&lt;p&gt;The following is a summary of all available&amp;nbsp;images.&lt;/p&gt;
&lt;h2 id="viga"&gt;&lt;span class="caps"&gt;VIGA&lt;/span&gt;&lt;a class="headerlink" href="#viga" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/EGTortuero/viga"&gt;&lt;span class="caps"&gt;VIGA&lt;/span&gt;&lt;/a&gt; is a de novo viral
genome annotator. This image has all dependencies needed to run VirAnnot
including Aragorn, &lt;span class="caps"&gt;HMMER&lt;/span&gt;, &lt;span class="caps"&gt;BLAST&lt;/span&gt;+, Diamond, Prodigal, BioPython, &lt;span class="caps"&gt;LASTZ&lt;/span&gt;,
Tandem and Inverted Repeats&amp;nbsp;Finder.&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/viga
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This program was previously called as&amp;nbsp;VirAnnot.&lt;/p&gt;
&lt;h2 id="qiime"&gt;&lt;span class="caps"&gt;QIIME&lt;/span&gt;&lt;a class="headerlink" href="#qiime" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://qiime.org/"&gt;&lt;span class="caps"&gt;QIIME&lt;/span&gt;&lt;/a&gt;  is an open source bioinformatics pipeline
for performing microbiome analysis of raw &lt;span class="caps"&gt;DNA&lt;/span&gt; sequencing&amp;nbsp;data.&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;QIIME&lt;/span&gt; image has version 1.9.1 installed along with all dependencies
and the latest version of R (for Ubuntu 14.04) and packages (ape, biom, optparse,
RColorBrewer, randomForest, vegan, DESeq2 and&amp;nbsp;metagenomeSeq)&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/qiime
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="dada2"&gt;&lt;span class="caps"&gt;DADA2&lt;/span&gt;&lt;a class="headerlink" href="#dada2" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://benjjneb.github.io/dada2/"&gt;&lt;span class="caps"&gt;DADA2&lt;/span&gt;&lt;/a&gt; is a program for fast,
accurate, single-nucleotide resolution for amplicon&amp;nbsp;data.&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;DADA2&lt;/span&gt; image has version 1.4.0 of the package installed along with
R&amp;nbsp;3.4.0.&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/dada2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This container simply runs&amp;nbsp;the &lt;code&gt;Rscript&lt;/code&gt; command and expects an R script
as the first argument. If a command other&amp;nbsp;than &lt;code&gt;Rscript&lt;/code&gt; is required,
it can be specified using&amp;nbsp;the &lt;code&gt;--entrypoint&lt;/code&gt; docker&amp;nbsp;argument.&lt;/p&gt;
&lt;h2 id="pyfba"&gt;PyFBA&lt;a class="headerlink" href="#pyfba" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/linsalrob/PyFBA"&gt;PyFBA&lt;/a&gt; is a python implementation
of flux balance analysis to model microbial&amp;nbsp;metabolism.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://gitlab.com/vimalkvn/sysadminbio/tree/master/docker-images/pyfba"&gt;PyFBA image&lt;/a&gt;
will have the latest version of PyFBA from Github along with all the
dependencies pre-installed - &lt;span class="caps"&gt;GLPK&lt;/span&gt;, PyGLPK, libSBML, lxml,
Beautiful Soup 4 and the ModelSEED&amp;nbsp;database.&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/pyfba
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="openlava-lsa"&gt;OpenLava-&lt;span class="caps"&gt;LSA&lt;/span&gt;&lt;a class="headerlink" href="#openlava-lsa" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An &lt;a href="http://openlava.org"&gt;OpenLava&lt;/a&gt; docker image configured for the
&lt;a href="https://github.com/brian-cleary/LatentStrainAnalysis"&gt;&lt;span class="caps"&gt;LSA&lt;/span&gt;&lt;/a&gt;&amp;nbsp;package.&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/docker-openlava-lsa
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Please consult the
&lt;a href="https://gitlab.com/vimalkvn/sysadminbio/tree/master/docker-images/openlava-lsa"&gt;&lt;span class="caps"&gt;README&lt;/span&gt;&lt;/a&gt;
in the repository for information on&amp;nbsp;usage.&lt;/p&gt;
&lt;h2 id="cutadapt"&gt;Cutadapt&lt;a class="headerlink" href="#cutadapt" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/marcelm/cutadapt"&gt;Cutadapt&lt;/a&gt; is a program for removing
adapter sequences from sequencing reads. The cutadapt image has version 1.13
of the package&amp;nbsp;installed.&lt;/p&gt;
&lt;p&gt;You can pull this image using the&amp;nbsp;command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;vimalkvn/cutadapt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;hr&gt;
&lt;p&gt;If there is a problem with any of these images, you can
&lt;a href="https://gitlab.com/vimalkvn/sysadminbio/-/issues"&gt;file an issue&lt;/a&gt;
on&amp;nbsp;GitLab.&lt;/p&gt;</content><category term="Bioinformatics"/><category term="Docker"/></entry><entry><title>An Unofficial VirtualBox Image for QIIME 1</title><link href="https://vimalkvn.gitlab.io/blog/an-unofficial-virtualbox-image-for-qiime1/" rel="alternate"/><published>2017-08-02T10:30:00+01:00</published><updated>2017-11-08T12:00:00+00:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2017-08-02:/blog/an-unofficial-virtualbox-image-for-qiime1/</id><summary type="html">&lt;p&gt;This is a VirtualBox &lt;span class="caps"&gt;VM&lt;/span&gt; I made for &lt;span class="caps"&gt;QIIME&lt;/span&gt; 1.9 based on the current
version Ubuntu &lt;span class="caps"&gt;MATE&lt;/span&gt; &lt;span class="caps"&gt;LTS&lt;/span&gt; (16.04.3) with some additional&amp;nbsp;improvements.&lt;/p&gt;</summary><content type="html">&lt;p&gt;The developers of &lt;span class="caps"&gt;QIIME&lt;/span&gt; provide a VirtualBox disk image for &lt;span class="caps"&gt;QIIME&lt;/span&gt; 1.9.1.
Instructions for using this image is available
&lt;a href="http://qiime.org/install/virtual_box.html"&gt;here&lt;/a&gt;. This is an
alternative (unofficial) image with the same version of &lt;span class="caps"&gt;QIIME&lt;/span&gt; but with some
features and enhancements as described&amp;nbsp;below.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;QIIME&lt;/span&gt; developers are &lt;a href="http://qiime.org"&gt;recommending&lt;/a&gt; that new users
start using &lt;a href="https://qiime2.org"&gt;&lt;span class="caps"&gt;QIIME&lt;/span&gt; 2&lt;/a&gt; rather than &lt;span class="caps"&gt;QIIME&lt;/span&gt; 1 (the version
this image includes). I had created the original version of this image when I
was using &lt;span class="caps"&gt;QIIME&lt;/span&gt; 1 for my work. This image is only provided with the hope that
it will be useful for anyone still requiring &lt;span class="caps"&gt;QIIME&lt;/span&gt;&amp;nbsp;1.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="features-and-enhancements"&gt;Features and Enhancements&lt;a class="headerlink" href="#features-and-enhancements" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This image is based on the &lt;em&gt;latest &lt;span class="caps"&gt;LTS&lt;/span&gt; version of Ubuntu 16.04.3&lt;/em&gt; with
&lt;a href="http://ubuntu-mate.org/"&gt;Ubuntu &lt;span class="caps"&gt;MATE&lt;/span&gt;&lt;/a&gt; - a simpler desktop environment with
minimal applications and desktop effects disabled for better performance.
The default user&amp;nbsp;is &lt;code&gt;qiime&lt;/code&gt; with&amp;nbsp;password &lt;code&gt;qiime&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;VirtualBox &lt;em&gt;guest additions is pre-installed&lt;/em&gt; so features like shared
folders, shared clipboard and better video support should all work&amp;nbsp;immediately.&lt;/p&gt;
&lt;p&gt;&lt;span class="caps"&gt;QIIME&lt;/span&gt; 1.9.1 and some dependencies (&lt;span class="caps"&gt;BLAST&lt;/span&gt;, Mothur, Clearcut, Infernal,
Muscle, Cdbtools, Swarm, ea-utils, SeqPrep, SortmeRNA, &lt;span class="caps"&gt;BWA&lt;/span&gt;, &lt;span class="caps"&gt;BLAT&lt;/span&gt;) are installed
using the Conda package manager and an environment is setup for the qiime user&amp;nbsp;called &lt;code&gt;qiime1&lt;/code&gt;. This environment is activated automatically on&amp;nbsp;login.&lt;/p&gt;
&lt;p&gt;R is installed along with the required packages (ape, biom, optparse,
RColorBrewer, randomForest, vegan, DESeq2 and&amp;nbsp;metagenomeSeq).&lt;/p&gt;
&lt;p&gt;Additional dependencies installed - &lt;span class="caps"&gt;RDP&lt;/span&gt; Classifier, cd-hit,
ChimeraSlayer, rtax, AmpliconNoise, Cytoscape and SourceTracker,
thanks to &lt;a href="https://github.com/qiime/qiime-deploy"&gt;qiime-deploy&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Search and install additional software&lt;/em&gt; easily from the Ubuntu and
Debian repositories using the inclued Synaptic Package Manager. Alternatively,
packages can also be installed using the &lt;a href="https://conda.io"&gt;Conda&lt;/a&gt; package
manager that is configured for the qiime user. Additional software like
&lt;span class="caps"&gt;USEARCH&lt;/span&gt; can be made available by downloading the  executable&amp;nbsp;to
&lt;code&gt;/home/qiime/Software/bin&lt;/code&gt; and then creating a symlink or renaming the
executable to the desired name. See tips section below for an&amp;nbsp;example.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Storage space can be increased&lt;/em&gt;, if necessary. &lt;span class="caps"&gt;LVM&lt;/span&gt; has been configured
for the base installation so hard disk size can be increased if necessary by
adding additional disks to the &lt;span class="caps"&gt;VM&lt;/span&gt; in&amp;nbsp;VirtualBox.&lt;/p&gt;
&lt;h2 id="setup-and-usage"&gt;Setup and Usage&lt;a class="headerlink" href="#setup-and-usage" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Install &lt;a href="https://www.virtualbox.org/wiki/Downloads"&gt;VirtualBox&lt;/a&gt; and
   the extension&amp;nbsp;pack.&lt;/li&gt;
&lt;li&gt;Download the QIIME_1.9.1_UM.ova&amp;nbsp;file.&lt;/li&gt;
&lt;li&gt;Click on the downloaded file. If that does not launch VirtualBox, open
   VirtualBox and then use&amp;nbsp;the &lt;code&gt;File --&amp;gt; Import  Appliance&lt;/code&gt; option and select
   the downloaded&amp;nbsp;file.&lt;/li&gt;
&lt;li&gt;VirtualBox will offer the possibility to configure the number of &lt;span class="caps"&gt;CPU&lt;/span&gt;&amp;#8217;s, the
   amount of &lt;span class="caps"&gt;RAM&lt;/span&gt; and other options in the next&amp;nbsp;step.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="tips"&gt;Tips&lt;a class="headerlink" href="#tips" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;h3 id="passwords"&gt;Passwords&lt;a class="headerlink" href="#passwords" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Password for the &lt;span class="caps"&gt;QIIME&lt;/span&gt;&amp;nbsp;user &lt;code&gt;qiime&lt;/code&gt; is &lt;code&gt;qiime&lt;/code&gt;.  You can change it using&amp;nbsp;the
&lt;code&gt;passwd&lt;/code&gt; command.&lt;/p&gt;
&lt;h3 id="becoming-root"&gt;Becoming root&lt;a class="headerlink" href="#becoming-root" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;qiime&lt;/code&gt; user has admin privileges&amp;nbsp;(&lt;code&gt;sudo&lt;/code&gt;) and so logging in to the root
account is not normally required. If you do need to become root,&amp;nbsp;use
&lt;code&gt;sudo su&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="how-do-i-exit-the-qiime1-conda-environment"&gt;How do I exit the qiime1 conda environment?&lt;a class="headerlink" href="#how-do-i-exit-the-qiime1-conda-environment" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Use the&amp;nbsp;command &lt;code&gt;source deactivate&lt;/code&gt; or &lt;code&gt;dt&lt;/code&gt; (alias).&lt;/p&gt;
&lt;h3 id="increasing-storage-space"&gt;Increasing storage space&lt;a class="headerlink" href="#increasing-storage-space" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Shutdown the &lt;span class="caps"&gt;VM&lt;/span&gt;.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;VirtualBox&lt;/em&gt; -&amp;gt; &lt;em&gt;Settings&lt;/em&gt; - &lt;em&gt;Storage&lt;/em&gt; -&amp;gt;
   Click on the &lt;em&gt;&amp;#8220;Adds Harddisk&amp;#8221;&lt;/em&gt;
   button next to &lt;em&gt;Controller: &lt;span class="caps"&gt;SATA&lt;/span&gt;&lt;/em&gt;. From there, select &lt;em&gt;&amp;#8220;Create new disk&amp;#8221;&lt;/em&gt;,
   use defaults and select a suitable disk size depending on the space available
   on the hard disk. Click &lt;em&gt;&lt;span class="caps"&gt;OK&lt;/span&gt;&lt;/em&gt; when&amp;nbsp;done.&lt;/li&gt;
&lt;li&gt;Start &lt;span class="caps"&gt;VM&lt;/span&gt;, open terminal, use&amp;nbsp;command &lt;code&gt;lsblk&lt;/code&gt; to check if the new
   hard disk is&amp;nbsp;listed.&lt;/li&gt;
&lt;li&gt;Use &lt;span class="caps"&gt;LVM&lt;/span&gt; commands to extend and resize the file&amp;nbsp;system:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pvcreate&lt;span class="w"&gt; &lt;/span&gt;/dev/sdb
vgextend&lt;span class="w"&gt; &lt;/span&gt;ubuntu-mate-vg&lt;span class="w"&gt; &lt;/span&gt;/dev/sdb
lvresize&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;+10G&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;/dev/ubuntu-mate-vg/root
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The root&amp;nbsp;(&lt;code&gt;/&lt;/code&gt;) filesystem should have now been resized. To check disk space
   usage, use the&amp;nbsp;command &lt;code&gt;df -h&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="testing"&gt;Testing&lt;a class="headerlink" href="#testing" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here is the output of&amp;nbsp;the &lt;code&gt;print_qiime_config.py&lt;/code&gt; command to test
the &lt;span class="caps"&gt;QIIME&lt;/span&gt;&amp;nbsp;installation:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;(&lt;/span&gt;qiime1&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;qiime@ubuntu-vm:~$&lt;span class="w"&gt; &lt;/span&gt;print_qiime_config.py&lt;span class="w"&gt; &lt;/span&gt;-tvf

System&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;information&lt;/span&gt;
&lt;span class="o"&gt;==================&lt;/span&gt;
Platform:&lt;span class="w"&gt;   &lt;/span&gt;linux2
Python&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.7.13&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;packaged&lt;span class="w"&gt; &lt;/span&gt;by&lt;span class="w"&gt; &lt;/span&gt;conda-forge&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;default,&lt;span class="w"&gt; &lt;/span&gt;May&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2017&lt;/span&gt;,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;12&lt;/span&gt;:48:11&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;GCC&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;.8.2&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20140120&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;Red&lt;span class="w"&gt; &lt;/span&gt;Hat&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;.8.2-15&lt;span class="o"&gt;)]&lt;/span&gt;
Python&lt;span class="w"&gt; &lt;/span&gt;executable:&lt;span class="w"&gt;  &lt;/span&gt;/home/qiime/Software/miniconda3/envs/qiime1/bin/python

QIIME&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;reference&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;information&lt;/span&gt;
&lt;span class="o"&gt;===================================&lt;/span&gt;
For&lt;span class="w"&gt; &lt;/span&gt;details&lt;span class="w"&gt; &lt;/span&gt;on&lt;span class="w"&gt; &lt;/span&gt;what&lt;span class="w"&gt; &lt;/span&gt;files&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;used&lt;span class="w"&gt; &lt;/span&gt;as&lt;span class="w"&gt; &lt;/span&gt;QIIME&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;s&lt;span class="w"&gt; &lt;/span&gt;default&lt;span class="w"&gt; &lt;/span&gt;references,&lt;span class="w"&gt; &lt;/span&gt;see&lt;span class="w"&gt; &lt;/span&gt;here:
https://github.com/biocore/qiime-default-reference/releases/tag/0.1.3

Dependency&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;versions&lt;/span&gt;
&lt;span class="o"&gt;===================&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;QIIME&lt;span class="w"&gt; &lt;/span&gt;library&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.9.1
&lt;span class="w"&gt;         &lt;/span&gt;QIIME&lt;span class="w"&gt; &lt;/span&gt;script&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.9.1
&lt;span class="w"&gt;  &lt;/span&gt;qiime-default-reference&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.1.3
&lt;span class="w"&gt;                &lt;/span&gt;NumPy&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.10.4
&lt;span class="w"&gt;                &lt;/span&gt;SciPy&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.17.1
&lt;span class="w"&gt;               &lt;/span&gt;pandas&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.20.3
&lt;span class="w"&gt;           &lt;/span&gt;matplotlib&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.4.3
&lt;span class="w"&gt;          &lt;/span&gt;biom-format&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.1.5
&lt;span class="w"&gt;                 &lt;/span&gt;h5py&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.6.0&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;HDF5&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.8.17&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;qcli&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.1.1
&lt;span class="w"&gt;                 &lt;/span&gt;pyqi&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.3.2
&lt;span class="w"&gt;           &lt;/span&gt;scikit-bio&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.2.3
&lt;span class="w"&gt;               &lt;/span&gt;PyNAST&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.2.2
&lt;span class="w"&gt;              &lt;/span&gt;Emperor&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.9.51
&lt;span class="w"&gt;              &lt;/span&gt;burrito&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.9.1
&lt;span class="w"&gt;     &lt;/span&gt;burrito-fillings&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.1.1
&lt;span class="w"&gt;            &lt;/span&gt;sortmerna&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;SortMeRNA&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;.0,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;29&lt;/span&gt;/11/2014
&lt;span class="w"&gt;            &lt;/span&gt;sumaclust&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;SUMACLUST&lt;span class="w"&gt; &lt;/span&gt;Version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.0.00
&lt;span class="w"&gt;                &lt;/span&gt;swarm&lt;span class="w"&gt; &lt;/span&gt;version:&lt;span class="w"&gt;  &lt;/span&gt;Swarm&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;.2.19&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;Jun&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2017&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;11&lt;/span&gt;:47:02&lt;span class="o"&gt;]&lt;/span&gt;
&lt;span class="w"&gt;                        &lt;/span&gt;gdata:&lt;span class="w"&gt;  &lt;/span&gt;Installed.
RDP&lt;span class="w"&gt; &lt;/span&gt;Classifier&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;installed&lt;span class="o"&gt;)&lt;/span&gt;:&lt;span class="w"&gt;  &lt;/span&gt;rdp_classifier-2.2.jar
&lt;span class="w"&gt;      &lt;/span&gt;Java&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;installed&lt;span class="o"&gt;)&lt;/span&gt;:&lt;span class="w"&gt;  &lt;/span&gt;Not&lt;span class="w"&gt; &lt;/span&gt;installed.

QIIME&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;values&lt;/span&gt;
&lt;span class="o"&gt;===================&lt;/span&gt;
For&lt;span class="w"&gt; &lt;/span&gt;definitions&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;these&lt;span class="w"&gt; &lt;/span&gt;settings&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;learn&lt;span class="w"&gt; &lt;/span&gt;how&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;configure&lt;span class="w"&gt; &lt;/span&gt;QIIME,&lt;span class="w"&gt; &lt;/span&gt;see&lt;span class="w"&gt; &lt;/span&gt;here:
http://qiime.org/install/qiime_config.html
http://qiime.org/tutorials/parallel_qiime.html

&lt;span class="w"&gt;             &lt;/span&gt;blastmat_dir:&lt;span class="w"&gt;  &lt;/span&gt;None
&lt;span class="w"&gt;  &lt;/span&gt;pick_otus_reference_seqs_fp:&lt;span class="w"&gt;  &lt;/span&gt;/home/qiime/Software/miniconda3/envs/qiime1/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta
&lt;span class="w"&gt;                 &lt;/span&gt;sc_queue:&lt;span class="w"&gt;  &lt;/span&gt;all.q
&lt;span class="w"&gt;  &lt;/span&gt;topiaryexplorer_project_dir:&lt;span class="w"&gt;  &lt;/span&gt;None
&lt;span class="w"&gt; &lt;/span&gt;pynast_template_alignment_fp:&lt;span class="w"&gt;  &lt;/span&gt;/home/qiime/Software/miniconda3/envs/qiime1/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set_aligned/85_otus.pynast.fasta
&lt;span class="w"&gt;          &lt;/span&gt;cluster_jobs_fp:&lt;span class="w"&gt;  &lt;/span&gt;start_parallel_jobs.py
pynast_template_alignment_blastdb:&lt;span class="w"&gt;  &lt;/span&gt;None
assign_taxonomy_reference_seqs_fp:&lt;span class="w"&gt;  &lt;/span&gt;/home/qiime/Software/miniconda3/envs/qiime1/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/rep_set/97_otus.fasta
&lt;span class="w"&gt;             &lt;/span&gt;torque_queue:&lt;span class="w"&gt;  &lt;/span&gt;friendlyq
&lt;span class="w"&gt;            &lt;/span&gt;jobs_to_start:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="w"&gt;               &lt;/span&gt;slurm_time:&lt;span class="w"&gt;  &lt;/span&gt;None
&lt;span class="w"&gt;    &lt;/span&gt;denoiser_min_per_core:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;50&lt;/span&gt;
assign_taxonomy_id_to_taxonomy_fp:&lt;span class="w"&gt;  &lt;/span&gt;/home/qiime/Software/miniconda3/envs/qiime1/lib/python2.7/site-packages/qiime_default_reference/gg_13_8_otus/taxonomy/97_otu_taxonomy.txt
&lt;span class="w"&gt;                 &lt;/span&gt;temp_dir:&lt;span class="w"&gt;  &lt;/span&gt;/tmp/
&lt;span class="w"&gt;             &lt;/span&gt;slurm_memory:&lt;span class="w"&gt;  &lt;/span&gt;None
&lt;span class="w"&gt;              &lt;/span&gt;slurm_queue:&lt;span class="w"&gt;  &lt;/span&gt;None
&lt;span class="w"&gt;              &lt;/span&gt;blastall_fp:&lt;span class="w"&gt;  &lt;/span&gt;blastall
&lt;span class="w"&gt;         &lt;/span&gt;seconds_to_sleep:&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;

QIIME&lt;span class="w"&gt; &lt;/span&gt;full&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;test&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;results&lt;/span&gt;
&lt;span class="o"&gt;===============================&lt;/span&gt;
test_FastTree_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
FastTree&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_INFERNAL_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
INFERNAL&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_R_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
R&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_ampliconnoise_install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
AmpliconNoise&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;looks&lt;span class="w"&gt; &lt;/span&gt;sane.&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_blast_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
blast&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_blastall_fp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
blastall_fp&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_blastmat_dir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
blastmat_dir&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path.&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_cdbtools_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
cdbtools&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_cdhit_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
cd-hit&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_chimeraSlayer_install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
no&lt;span class="w"&gt; &lt;/span&gt;obvious&lt;span class="w"&gt; &lt;/span&gt;problems&lt;span class="w"&gt; &lt;/span&gt;with&lt;span class="w"&gt; &lt;/span&gt;ChimeraSlayer&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_clearcut_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
clearcut&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_cluster_jobs_fp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
cluster_jobs_fp&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;executable&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_denoiser_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
denoiser&lt;span class="w"&gt; &lt;/span&gt;aligner&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;ready&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;use&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_for_unrecognized_values&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
qiime_config&lt;span class="w"&gt; &lt;/span&gt;has&lt;span class="w"&gt; &lt;/span&gt;no&lt;span class="w"&gt; &lt;/span&gt;extra&lt;span class="w"&gt; &lt;/span&gt;values&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_gdata_install&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
gdata&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;installed&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_get_qiime_scripts_dir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
Test&lt;span class="w"&gt; &lt;/span&gt;that&lt;span class="w"&gt; &lt;/span&gt;we&lt;span class="w"&gt; &lt;/span&gt;can&lt;span class="w"&gt; &lt;/span&gt;find&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;directory&lt;span class="w"&gt; &lt;/span&gt;containing&lt;span class="w"&gt; &lt;/span&gt;QIIME&lt;span class="w"&gt; &lt;/span&gt;scripts.&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_h5py&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
h5py&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;installed&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_mothur_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
mothur&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_muscle_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
muscle&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_pynast_template_alignment_blastdb_fp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
pynast_template_alignment_blastdb,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;set,&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_pynast_template_alignment_fp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
pynast_template_alignment,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;set,&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_raxmlHPC_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
raxmlHPC&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_rtax_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
rtax&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_sourcetracker_installed&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
sourcetracker&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;installed&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_temp_dir&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
temp_dir&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;valid&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_uclust_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
uclust&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok
test_usearch_supported_version&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;__main__.QIIMEDependencyFull&lt;span class="o"&gt;)&lt;/span&gt;
usearch&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;path&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;version&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;supported&lt;span class="w"&gt; &lt;/span&gt;...&lt;span class="w"&gt; &lt;/span&gt;ok

----------------------------------------------------------------------
Ran&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tests&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;.276s

OK
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Bioinformatics"/><category term="VirtualBox"/><category term="QIIME"/><category term="Ubuntu"/><category term="MATE"/><category term="Linux"/></entry><entry><title>A Python Script to Update NCBI BLAST Databases</title><link href="https://vimalkvn.gitlab.io/blog/python-script-to-update-blast-databases/" rel="alternate"/><published>2017-03-05T00:00:00+00:00</published><updated>2020-05-02T00:00:00+01:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2017-03-05:/blog/python-script-to-update-blast-databases/</id><summary type="html">&lt;p&gt;Updating &lt;span class="caps"&gt;BLAST&lt;/span&gt; databases can can be done using the
update_blastdb command but this script only updates
databases if they are not being&amp;nbsp;used.&lt;/p&gt;</summary><content type="html">&lt;p&gt;The following command will download and/or update the
swissprot protein database in the current&amp;nbsp;directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;update_blastdb&lt;span class="w"&gt; &lt;/span&gt;--decompress&lt;span class="w"&gt; &lt;/span&gt;--passive&lt;span class="w"&gt; &lt;/span&gt;swissprot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Output:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="go"&gt;Connected to NCBI&lt;/span&gt;
&lt;span class="go"&gt;Downloading swissprot.tar.gz... [OK]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here is the list of downloaded&amp;nbsp;files:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ls
swissprot.tar.gz&lt;span class="w"&gt;  &lt;/span&gt;swissprot.tar.gz.md5
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;One issue with this approach is that any long running &lt;span class="caps"&gt;BLAST&lt;/span&gt; jobs currently
accessing the database will be aborted. To overcome this problem, I wrote
a wrapper around&amp;nbsp;the &lt;code&gt;update_blastdb&lt;/code&gt; command&amp;nbsp;- &lt;code&gt;blastdb_updater.py&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;It uses a symbolic link
to the latest version of the database and only updates the link if the
database is not being used. If the database is being used, the script
adds a message to the log after the database download is complete. The
link can then be updated manually&amp;nbsp;later.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
  This script will only work on Linux/Unix-like systems due to its
  dependence on&amp;nbsp;the &lt;code&gt;lsof&lt;/code&gt; command to check if a directory is being&amp;nbsp;accessed.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="download-python-script"&gt;Download python script&lt;a class="headerlink" href="#download-python-script" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;From &lt;code&gt;vimalkvn/sysadminbio&lt;/code&gt; repository on GitLab:&lt;br&gt;
Link: &lt;a href="https://gitlab.com/vimalkvn/sysadminbio/-/blob/master/scripts/blastdb_updater.py"&gt;blastdb_updater.py&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Save this script&amp;nbsp;as &lt;code&gt;blastdb_updater.py&lt;/code&gt; under
&lt;code&gt;/home/user/programs/blastdb_updater.py&lt;/code&gt; (only used for
the purpose of the examples below). It can be saved somewhere&amp;nbsp;else.&lt;/p&gt;
&lt;h2 id="usage"&gt;Usage&lt;a class="headerlink" href="#usage" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Assuming you would like to download the swissprot database&amp;nbsp;to &lt;code&gt;/home/user/blast&lt;/code&gt;,&amp;nbsp;use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;python&lt;span class="w"&gt; &lt;/span&gt;/home/user/programs/blastdb_updater.py&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;swissprot&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;/home/user/blast
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;A log file will be available under&lt;br&gt;
&lt;code&gt;/home/user/blast/log/blastdb_updater.log&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To use the database in your &lt;span class="caps"&gt;BLAST&lt;/span&gt; search, you can&amp;nbsp;use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;blastp&lt;span class="w"&gt; &lt;/span&gt;-db&lt;span class="w"&gt; &lt;/span&gt;/home/user/blast/swissprot/swissprot&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;-query&lt;span class="w"&gt; &lt;/span&gt;sample.fasta
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Other databases (supported&amp;nbsp;by &lt;code&gt;update_blastdb&lt;/code&gt;) can be downloaded in the same&amp;nbsp;manner.&lt;/p&gt;
&lt;h2 id="automated-update"&gt;Automated update&lt;a class="headerlink" href="#automated-update" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;An automated update can be setup&amp;nbsp;using &lt;code&gt;cron&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="na"&gt;MAILTO&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;email@domain&lt;/span&gt;
&lt;span class="na"&gt;0 0 1 * * /home/user/programs/blastdb_updater.py \&lt;/span&gt;
&lt;span class="na"&gt;-d swissprot -p /home/user/blast&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The above cron job will update the database on the 1st of every&amp;nbsp;month.&lt;/p&gt;</content><category term="Programming"/><category term="Python"/><category term="Cron"/></entry><entry><title>PyQt Interfaces in BioNumerics 6</title><link href="https://vimalkvn.gitlab.io/blog/pyqt-interfaces-in-bionumerics-6/" rel="alternate"/><published>2010-08-02T21:48:21+01:00</published><updated>2020-01-07T00:00:00+00:00</updated><author><name>Vimalkumar Velayudhan</name></author><id>tag:vimalkvn.gitlab.io,2010-08-02:/blog/pyqt-interfaces-in-bionumerics-6/</id><summary type="html"/><content type="html">&lt;p&gt;&lt;a href="http://www.riverbankcomputing.co.uk/software/pyqt/"&gt;PyQt&lt;/a&gt; is a set
of Python bindings to &lt;a href="http://qt.nokia.com/"&gt;Qt&lt;/a&gt; — Nokia&amp;#8217;s
cross-platform &lt;span class="caps"&gt;GUI&lt;/span&gt; toolkit. Qt is mature, versatile and is released
under an Open Source license. It is used in software like Google Earth,
&lt;span class="caps"&gt;KDE&lt;/span&gt;, Opera, Skype, &lt;span class="caps"&gt;VLC&lt;/span&gt; media player and VirtualBox (Source:
&lt;a href="http://en.wikipedia.org/wiki/Qt_(framework)"&gt;Wikipedia&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;One of the advantages of using PyQt for graphical user interface (&lt;span class="caps"&gt;GUI&lt;/span&gt;)
development is the bundled
&lt;a href="http://qt.nokia.com/products/developer-tools?currentflipperobject=937ba3e952f85ef68ddbb7cb4b20fc19"&gt;Qt Designer&lt;/a&gt;
makes &lt;span class="caps"&gt;GUI&lt;/span&gt; design very easy and efficient. Widgets can be dragged and
dropped onto dialogs, main windows and widgets. The resulting &lt;span class="caps"&gt;XML&lt;/span&gt; user
interface&amp;nbsp;(&lt;code&gt;.ui&lt;/code&gt;) files can be converted to Python code using the scripts
included with&amp;nbsp;PyQt.&lt;/p&gt;
&lt;p&gt;Using PyQt from within
&lt;a href="http://www.applied-maths.com/bionumerics/bionumerics.htm"&gt;Bionumerics&lt;/a&gt;
scripts opens up a number of possibilities — use simple
message boxes with error or informative texts, create dialogs
and display windows for working with databases and so on. Bionumerics includes some modules including
BioPython but PyQt will need to be included manually. It is fairly simple to use an
existing PyQt&amp;nbsp;installation.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;a class="headerlink" href="#requirements" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Python 2.6&lt;br&gt;
   The latest stable version as of this writing is 2.6.5.
   It can be downloaded from &lt;a href="http://python.org/download/releases/"&gt;http://python.org/download/releases/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;PyQt&lt;br&gt;
   Latest version can be downloaded and installed from
   &lt;a href="http://www.riverbankcomputing.co.uk/software/pyqt/download"&gt;http://www.riverbankcomputing.co.uk/software/pyqt/download&lt;/a&gt; [under
   Binary packages]. PyQt version as of this writing&amp;nbsp;is
   &lt;code&gt;PyQt-Py2.6-gpl-4.7.3-2.exe&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To be able to import PyQt modules from within Bionumerics, the module
   directory:&lt;br&gt;
&lt;code&gt;C:\Python26\Lib\site-packages&lt;/code&gt;&lt;br&gt;
   should be added&amp;nbsp;to &lt;code&gt;PYTHONPATH&lt;/code&gt; or appended&amp;nbsp;to &lt;code&gt;sys.path&lt;/code&gt; before other import&amp;nbsp;statements.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The Qt &lt;span class="caps"&gt;DLL&lt;/span&gt;&amp;#8217;s must be available or added to the&amp;nbsp;system &lt;code&gt;PATH&lt;/code&gt;. This
   will be done automatically by the PyQt installer. If the &lt;span class="caps"&gt;DLL&lt;/span&gt;&amp;#8217;s are not
   added to the system path, it will lead to error messages like
   &amp;#8220;&lt;span class="caps"&gt;DLL&lt;/span&gt; load failed&amp;#8221; and the script will&amp;nbsp;fail.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="sample-application"&gt;Sample Application&lt;a class="headerlink" href="#sample-application" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;To demonstrate, I am going to use a simple dialog application as an example.
This application is used to set the value of a given field of
entries selected in the BioNumerics main window. When run, this is
how it will&amp;nbsp;appear:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The Set field dialog" src="https://vimalkvn.gitlab.io/blog/2010/images/set_field.png"&gt;&lt;/p&gt;
&lt;h2 id="step-1-creating-the-dialog-using-qt-designer"&gt;Step 1 — Creating the dialog using Qt Designer&lt;a class="headerlink" href="#step-1-creating-the-dialog-using-qt-designer" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The dialog displayed above was created in Qt Designer and the
file was saved&amp;nbsp;as
&lt;code&gt;setfielddlg.ui&lt;/code&gt;. The text at the&amp;nbsp;top, &lt;code&gt;Field&lt;/code&gt; and &lt;code&gt;Value&lt;/code&gt;
labels are all of&amp;nbsp;type &lt;code&gt;QLabel&lt;/code&gt;. The combo box used to display existing field names from the
database is of&amp;nbsp;type &lt;code&gt;QComboBox&lt;/code&gt;. The input field
corresponding&amp;nbsp;to &lt;code&gt;Value&lt;/code&gt; is
of&amp;nbsp;type &lt;code&gt;QLineEdit&lt;/code&gt;.&amp;nbsp;The &lt;code&gt;Apply&lt;/code&gt;, &lt;code&gt;Close&lt;/code&gt; and
&lt;code&gt;Deselect All&lt;/code&gt; buttons are all of&amp;nbsp;type &lt;code&gt;QPushButton&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;A list of tutorials on PyQt can be found
&lt;a href="http://diotavelli.net/PyQtWiki/Tutorials"&gt;here&lt;/a&gt;. The book
&lt;a href="http://www.qtrac.eu/pyqtbook.html"&gt;Rapid &lt;span class="caps"&gt;GUI&lt;/span&gt; Programming with Python and Qt&lt;/a&gt; is
an excellent reference on the topic. Also useful is Riverbank&amp;#8217;s
documentation of &lt;a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/classes.html"&gt;PyQt&amp;#8217;s classes&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="step-2-generating-python-code-for-the-dialog"&gt;Step 2 — Generating Python code for the Dialog&lt;a class="headerlink" href="#step-2-generating-python-code-for-the-dialog" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;setfielddlg.ui&lt;/code&gt; file generated from Qt Designer in the previous step is
an &lt;span class="caps"&gt;XML&lt;/span&gt; file describing all the elements of the dialog. This can
be converted to Python code using&amp;nbsp;the &lt;code&gt;pyuic4&lt;/code&gt; command
included with&amp;nbsp;PyQt4:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pyuic4&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;ui_setfielddlg.py&lt;span class="w"&gt; &lt;/span&gt;setfielddlg.ui
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;-o&lt;/code&gt; option specifies the name of the output file.
The dialog can now be called from other&amp;nbsp;scripts.&lt;/p&gt;
&lt;p&gt;Note&lt;/p&gt;
&lt;p&gt;&lt;code&gt;C:\Python26\Lib\site-packages\PyQt4\bin&lt;/code&gt;&lt;br&gt;
should be in the&amp;nbsp;system &lt;code&gt;PATH&lt;/code&gt; for&amp;nbsp;the &lt;code&gt;pyuic4&lt;/code&gt; command to&amp;nbsp;work.&lt;/p&gt;
&lt;h2 id="step-3-the-main-script"&gt;Step 3 — The main script&lt;a class="headerlink" href="#step-3-the-main-script" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;code&gt;set_field.py&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;A simple dialog application to set the field of selected entries in&lt;/span&gt;
&lt;span class="sd"&gt;Bionumerics 6&lt;/span&gt;

&lt;span class="sd"&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;bns&lt;/span&gt;

&lt;span class="c1"&gt;#append paths to PyQt4 and the current directory to sys.path&lt;/span&gt;
&lt;span class="n"&gt;moduledir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;C:\Python26\Lib\site-packages&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;G:\Python\Bionumerics_scripts\src&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;moddir&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;moduledir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;moddir&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;moddir&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;dbf&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt4.QtCore&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SIGNAL&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt4.QtGui&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QDialog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QMessageBox&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;ui_setfielddlg&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Dlg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;QDialog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ui_setfielddlg&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Ui_Dialog&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fieldnames&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nb"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Dlg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parent&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setupUi&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close_button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SIGNAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clicked()&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accept&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;apply_button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SIGNAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clicked()&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;setfield&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deselect_button&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;SIGNAL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clicked()&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;deselect&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;fieldnames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field_combo_box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addItems&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fieldnames&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;QMessageBox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;critical&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Error&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Could not get fieldnames&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;deselect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="sd"&gt;&amp;#39;&amp;#39;&amp;#39;Deselect all entries if selected&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bns&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Database&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Selection&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;bns&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Database&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Selection&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Clear&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;setfield&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="sd"&gt;&amp;#39;&amp;#39;&amp;#39;Sets the field value of selected entries&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;

        &lt;span class="n"&gt;field&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;unicode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;field_combo_box&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;currentText&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;unicode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value_line_edit&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

        &lt;span class="n"&gt;selected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dbf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getSelected&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;selected&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;selected&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Key&lt;/span&gt;
                &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;bns&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Database&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EntryField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;field&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;
                &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="ne"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;QMessageBox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;critical&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;Error&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exc_info&lt;/span&gt;&lt;span class="p"&gt;()))&lt;/span&gt;
                &lt;span class="n"&gt;bns&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Database&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Db&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Fields&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Save&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
                &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;QMessageBox&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;information&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;No entries selected&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="s1"&gt;&amp;#39;Please select entries before running script&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vm"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="vm"&gt;__dict__&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;argv&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;argv&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dbf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;getFieldNames&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;dialog&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Dlg&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;dialog&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;__bnscontext__&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Stop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;exec_&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h2 id="step-4-running-the-script"&gt;Step 4 — Running the script&lt;a class="headerlink" href="#step-4-running-the-script" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Source code of all the scripts used here can be downloaded from my
&lt;a href="http://github.com/vimalkvn/bionumerics_scripts"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;scripts &lt;code&gt;set_field.py&lt;/code&gt; and &lt;code&gt;ui_setfielddlg.py&lt;/code&gt; and the&amp;nbsp;module
&lt;code&gt;dbf.py&lt;/code&gt; should be in the same directory. In my case, this&amp;nbsp;was
&lt;code&gt;G:\Python\Bionumerics_scripts\src&lt;/code&gt; and also specified in the
moduledir list in&amp;nbsp;the &lt;code&gt;set_field.py&lt;/code&gt; script.&lt;/p&gt;
&lt;p&gt;The dialog can be called by using&amp;nbsp;the &lt;code&gt;Scripts -&amp;gt; Run script from file&lt;/code&gt;
option in Bionumerics and&amp;nbsp;selecting &lt;code&gt;set_field.py&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For this to work, database entries must be selected in the
main window of BioNumerics or else the dialog displays a
message and does nothing. Select the field from&amp;nbsp;the &lt;code&gt;Field&lt;/code&gt;
combo box, type in the value that needs to be set for the field and&amp;nbsp;hit
&lt;code&gt;Apply&lt;/code&gt;. The value field has a maximum length of 80 characters, which is the
maxiumum length of a field in&amp;nbsp;BioNumerics.&lt;/p&gt;
&lt;h3 id="the-script-in-detail"&gt;The script in detail&lt;a class="headerlink" href="#the-script-in-detail" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Some additional&amp;nbsp;notes&lt;/p&gt;
&lt;h4 id="imports"&gt;Imports&lt;a class="headerlink" href="#imports" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;bns&lt;/code&gt; is the BioNumerics Python&amp;nbsp;module&lt;/li&gt;
&lt;li&gt;PyQt4 module directories are appended&amp;nbsp;to &lt;code&gt;sys.path&lt;/code&gt;, as is the path to
   the directory of the running script. This is done as to import any
   additional modules used by the&amp;nbsp;script.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dbf&lt;/code&gt; is a module I wrote for general database functions. In this
   script, it is used for getting a list of selected entries&amp;nbsp;(&lt;code&gt;get_selected&lt;/code&gt;) and for getting the list of field names
   in the database&amp;nbsp;- &lt;code&gt;get_field_names&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;ui_setfielddlg&lt;/code&gt; contains code for the&amp;nbsp;dialog:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;bns&lt;/span&gt;

&lt;span class="c1"&gt;#append paths to PyQt4 and the current directory to sys.path&lt;/span&gt;
&lt;span class="n"&gt;moduledir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;C:\Python26\Lib\site-packages&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;G:\Python\Bionumerics_scripts\src&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;moddir&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;moduledir&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;moddir&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;moddir&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;dbf&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt4.QtCore&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;SIGNAL&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;PyQt4.QtGui&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;QApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QDialog&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;QMessageBox&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;ui_setfielddlg&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4 id="the-dialog-class-dlg"&gt;The dialog class — Dlg&lt;a class="headerlink" href="#the-dialog-class-dlg" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Takes the fieldnames as an argument and populates&amp;nbsp;the &lt;code&gt;Field&lt;/code&gt;
combo box if it is not empty.&amp;nbsp;The &lt;code&gt;clicked()&lt;/code&gt; signal of the
close button is connected to&amp;nbsp;the &lt;code&gt;accept&lt;/code&gt; slot, which closes
the dialog. This is the same signal that is emitted by when
the window is closed from the menubar. The other buttons are connected to their respective slots which are
defined within the&amp;nbsp;class.&lt;/p&gt;
&lt;h4 id="main"&gt;main&lt;a class="headerlink" href="#main" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The: &lt;code&gt;sys.__dict__['argv'] = ['argv']&lt;/code&gt; does nothing.
For some&amp;nbsp;reason, &lt;code&gt;sys.argv&lt;/code&gt; is empty or not defined when running
the script from BioNumerics, and the line of the&amp;nbsp;code
&lt;code&gt;QApplication(sys.argv)&lt;/code&gt; refuses to work without&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;As no commandline arguments are used in the code above, it should cause no&amp;nbsp;harm:
&lt;code&gt;__bnscontext__.Stop(app.exec_())&lt;/code&gt; stops the program once the event
loop&amp;nbsp;— &lt;code&gt;app.exec_()&lt;/code&gt; returns. This is similar&amp;nbsp;to
&lt;code&gt;sys.exit(app.exec_())&lt;/code&gt; used in standard PyQt4&amp;nbsp;programs.&lt;/p&gt;
&lt;h2 id="troubleshooting"&gt;Troubleshooting&lt;a class="headerlink" href="#troubleshooting" title="Permanent link"&gt;#&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Some issues I am aware&amp;nbsp;of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Only one instance of the script should run. Calling it twice causes a&amp;nbsp;crash.&lt;/li&gt;
&lt;li&gt;The dialog must be closed before exiting Bionumerics or else the program&amp;nbsp;crashes.&lt;/li&gt;
&lt;/ul&gt;</content><category term="Bioinformatics"/><category term="PyQt"/><category term="BioNumerics"/></entry></feed>