Skip to content

Installation

JianJun Jin edited this page Jun 11, 2023 · 36 revisions

Installation

There are several generally 3 ways to install GetOrganelle:

After installation of GetOrganelle, you need to download and initialize the default database as described at Initialization.

Option 1. Using conda

Install Anaconda or Miniconda. To get the latest stable version of GetOrganelle from the bioconda channel or the biojj channel:

conda install -c bioconda getorganelle

If you got stuck at Solving Environment on conda, see my reply or directly jump to solutions from StackOverflow. To get an older version of GetOrganelle, such as 1.6.4:

conda install -c bioconda getorganelle=1.6.4

Although older versions like 1.6.4/1.7.1 will be more stable, but we encourage you to keep updated. GetOrganelle was actively updated with new features, but new bugs too. So if you catch one, please do not be surprised and report it to us. We usually have a quick response to bugs.

If you encountered assembly errors, such as ERROR: Assembling failed, please uninstall spades from conda environment and install SPAdes from source. Alternatively, downgrading spades in conda may also work for some users depending the environment.

Option 2. Using the setup.py

Execute following curl commands to download a stable version (see more versions here). You can also use git to download the entire GetOrganelle repository as explained later in the In situ configuration.

# To dowload GetOrganelle using curl and decompress it. 
# Supposing you download GetOrganelle to ~/Downloads
cd ~/Downloads
curl -L https://github.com/Kinggerm/GetOrganelle/archive/1.7.4.1.tar.gz | tar zx
mv GetOrganelle-1.7.4.1 GetOrganelle

# If you want to use the binaries of dependencies (SPAdes, Bowtie2, Blast) from GetOrganelleDep
cd GetOrganelle
# for linux; replace v1.7.0-linux.tar.gz with v1.7.0-macOS.tar.gz if you are using macOS system
curl -L https://github.com/Kinggerm/GetOrganelleDep/releases/download/v1.7.0/v1.7.0-linux.tar.gz | tar zx
cd ..
# Otherwise if you want to install dependencies by yourself in Ubuntu linux
# apt install spades bowtie2 ncbi-blast+ pigz

install pip and then install downloaded GetOrganelle with pip.

# install pip, NOT necessary if pip was already available
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py

# install GetOrganelle; add the option "--user" after "install" to install for current user
pip install ./GetOrganelle
# install optional libs
pip install psutil matplotlib

Alternatively, if you have Python library setuptools installed (sudo apt install -y python-setuptools or sudo yum install -y python-setuptools), you can install GetOrganelle with cd GetOrganelle && python setup.py install.

For some fresh linux systems, after above commands you still cannot execute get_organelle_from_reads.py in a new terminal directly, meaning ~/.local/bin was not added to the $PATH, you have to manually add ~/.local/bin by executing echo "PATH=~/.local/bin:\$PATH" >> ~/.bashrc. For fresh MacOS environment with similar situation, for example, if you installed GetOrganelle with Python 3.6 and find scripts not in the $PATH, please execute echo "PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:\$PATH" >> ~/.zprofile.

If you encountered assembly errors, such as ERROR: Assembling failed, please try to install SPAdes from source.

Option 3. In situ configuration

You could use curl as explained above, however, git would be more suggested for update and version control.

# Supposing you are going to install it at ~/Applications/bin
mkdir ~/Applications && mkdir ~/Applications/bin  # create directories if not existed
GetOrganellePATH=~/Applications/bin
cd $GetOrganellePATH
git clone git://github.com/Kinggerm/GetOrganelle --depth=1

# If you want to use the binaries of dependencies (SPAdes, Bowtie2, Blast) from GetOrganelleDep
cd GetOrganelle
git clone git://github.com/Kinggerm/GetOrganelleDep --depth=1
cd ..
# Otherwise if you want to install dependencies by yourself in Ubuntu linux
# apt install spades bowtie2 ncbi-blast+ pigz

use following commands to make GetOrganelle scripts executable

chmod +x GetOrganelle/get_organelle*py
chmod +x GetOrganelle/Utilities/*py

add GetOrganelle and GetOrganelle/Utilities to the $PATH.

# for Linux
echo "PATH=$GetOrganellePATH/GetOrganelle:\$PATH" >> ~/.bashrc
echo "PATH=$GetOrganellePATH/GetOrganelle/Utilities:\$PATH" >> ~/.bashrc
echo "export PATH" >> ~/.bashrc
source ~/.bashrc

## for MacOS
## echo "PATH=$GetOrganellePATH/GetOrganelle:\$PATH" >> ~/.zprofile
## echo "PATH=$GetOrganellePATH/GetOrganelle/Utilities:\$PATH" >> ~/.zprofile
## echo "export PATH" >> ~/.zprofile
## source ~/.zprofile

At last, install python libraries numpy, scipy, and sympy using pip. Alternatively you could install package/environment management systems such as conda, which already have those python packages installed. Pyenv is highly suggested to control python versions/environments.

# install required libs
pip install numpy scipy sympy requests
# install optional libs
pip install psutil matplotlib

Updating GetOrganelle

You are always recommended to use the latest stable GetOrganelle version, although you could find all released versions of GetOrganelle here. You can check your GetOrganelle version by:

    get_organelle_from_reads.py --version
  1. If you want to update GetOrganelle Using conda:

     conda update -c bioconda getorganelle
    
  2. If you want to update GetOrganelle Using the setup.py, just do the same thing as the installation process, except that you need to change the version number to the latest one.

  3. If you want to update GetOrganelle In situ configuration with git, go to the directory where you cloned GetOrganelle:

     # Supposing you are going to installed it at ~/Applications/bin
     cd ~/Applications/bin/GetOrganelle
     git stash
     git pull
     # update dependencies
     cd GetOrganelleDep
     git pull
     cd ..
     # initialize it again
     python setup.py --in-situ
    

Requirement & Dependencies

The installation of requirements and dependencies is already covered in the above 3 ways. This is an illustration of what has been done.

If you are Using conda, conda will cover all the required & optional dependencies except for the Bandage. Otherwise, if you are Using the setup.py or using In situ configuration, you can install (SPAdes, Bowtie2, BLAST+) by yourself (using apt install spades bowtie2 ncbi-blast+ for Ubuntu) or via GetOrganelleDep as mentioned above. During the installing process mentioned above, GetOrganelle would add those dependencies (SPAdes, Bowtie2, BLAST+) to the GetOrganelle-*.egg rather than to the $PATH, thereby not influence your previously installed version if you have one. For example, if you already installed SPAdes v3.6.2, after installing GetOrganelle with GetOrganelleDep, the spades version for your system would still be v3.6.2, while only GetOrganelle uses the version in GetOrganelleDep.

"" ""
SYSTEM Linux/Unix 64-bit
PYTHON >3.5.1 or >2.7.11. 3.* suggested.
PYTHON LIBS numpy, sympy, scipy, requests
DEPENDENCIES SPAdes, Bowtie2, BLAST+, perl (used by Bowtie2)
optional PYTHON LIBS matplotlib, psutil
optional DEPENDENCIES Bandage, pigz (used by SPAdes)

Required libs & dependencies:

  • Bowtie2 used for recruiting seed reads.
  • SPAdes used for assembly (>=3.9).
  • BLAST+ used for labeling contig tags.
  • numpy used for calculating contig multiplicity.
  • scipy used for calculating contig multiplicity.
  • sympy used for calculating contig multiplicity.
  • requests used for online database initialization using get_organelle_config.py.

Optional libs & dependencies:

  • psutil If psutil (version >= 3.0; pip install -U psutil) was installed, the memory cost of get_organelle_from_reads.py will be logged.
  • matplotlib used for plot the evaluation with evaluate_assembly_using_mapping.py and round_statistics.py.
  • Bandage is a fantastic tool to view the assembly graph (*.fastg/*.gfa). If you have Bandage correctly configured and add the binary folder of Bandage (which is Bandage.app/Contents/MacOS for MacOS) to the $PATH, get_organelle_from_*.py would automatically generate the a png formatted image of the assembly graph.
  • pigz parallel implementation of gzip used by latest versions of SPAdes