Installing Canopy

Back to Canopy front page

 

Canopy is written in Python and integrates several existing tools for sequence alignment and phylogenetic inference. Canopy is provided as a downloadable package (works on Linux and MacOSX systems) and as a Docker image (works on all major operating systems).

Install Canopy as a Docker image:

  1. Download the Docker image from here.
    • Includes preinstalled Canopy and all the dependencies.
    • Compared to the source code installation, this option results in a larger download size and some virtualization overhead.
  2. Run the image with Docker.

Install Canopy from the source code:

  1. Download the package from here.
    • Canopy requires Python version 2.7.x
  2. Install Python library dependencies:
    • Numpy (ver. 1.16.6)
    • Biopython (ver. 1.58)
    • Dendropy (ver. 3.10.0)
    You can install the libraries manually (using pip) or use the Canopy installer script.
  3. Install Canopy with the installer script.
    • This will install the Canopy module, the main application script and all python dependencies.
    • You need to have pip (preinstalled in Python 2.7.9+) and setuptools installed first.
      On Ubuntu Linux, these can be installed with:
      sudo apt-get install python-pip
      pip install setuptools
    1. Download Canopy, unpack it, and go to its directory:
      curl -O http://wasabiapp.org/download/canopy/canopy-0.1.4.tar.gz
      tar pxf canopy-0.1.4.tar.gz
      cd canopy-0.1.4/
      

    2. Install Canopy, either globally:
      sudo python setup.py install

      or for a single user:
      python setup.py install --user

    3. Test the new Canopy installation:
      canopy test

      • You should see the following confirmation text:
        Succeed!

        or, if you installed to a Python virtual environment:
        Virtual environment is ready to launch by "source env/bin/activate"

      • If some of the dependencies failed to install, you will be presented with the following options:
        Biopython(==1.58) is not installed
        Dendropy(==3.10.0) is not installed
        Please choose:
          1. exit (Install the requirement libraries manually and then run the script again.)
          2. setup python virtual environment.
        Your choice: [1/2]:
        

        Here, you can select to install the listed libraries manually (option 1), or retry the automatic installation in Python virtual environment (option 2):
        Your choice: [1/2]:2
        Creating virtual environment
        virtualenv env
        Activating...
        source env/bin/activate
        Installing python packages...
        pip install numpy
        pip install biopython==1.58
        pip install dendropy==3.10.0
        

        After this, a virtual Python environment has been set up in ./env directory.
        Enter the environment to use Canopy:
        source env/bin/activate

        To exit the environment:
        deactivate

    The installation is now complete. You are ready to run Canopy.