Skip to content
SHANG Jiayu edited this page Nov 14, 2024 · 59 revisions

🚀  Quick Start

Note: we suggest you install all the packages using conda (both miniconda and Anaconda are ok).

🧭  Prepare the database and environment

  1. If you are using PhaBOX2 for the first time, please follow the commands below:
# install environment
conda create -n phabox2 phabox=2.1.5 -c conda-forge -c bioconda -y
conda activate phabox2

# install the latest scripts (optional)
git clone https://github.com/KennthShang/PhaBOX.git
cd PhaBOX
python  -m pip install .
cd ..
# you can remove the PhaBOX folder once it is installed
rm -rf PhaBOX

# Downloading the database using wget (or go to the release page)
wget https://github.com/KennthShang/PhaBOX/releases/download/v2/phabox_db_v2.zip
unzip phabox_db_v2.zip > /dev/null
  1. Then, you only need to activate your 'phabox2' environment before using phabox next time.
conda activate phabox2
# test
phabox2 --help

🧭  Upgrading PhaBOX

Sometimes we may upgrade our codes to provide new modules or fix some issues. if you have installed PhaBOX2 before and want to ensure your PhaBOX2 is in the latest version, please try:

git clone https://github.com/KennthShang/PhaBOX.git
cd PhaBOX
python  -m pip install .
cd ..
# you can remove the PhaBOX folder once it is installed
rm -rf PhaBOX

The update log can be found via Updates and specific release can be found via: Release

📊  Simple Usage

Run all pipelines in one command:

You can also replace the path with any absolute path

# usage
phabox2 --help

# example
phabox2 --task end_to_end --dbdir phabox_db_v2/ \
        --outpth  output_folder \
        --contigs input_contigs.fa \
        --threads 40

Detailed usage can be found in the Options

NOTE: We highly recommend you review our Tutorial. This will help you quickly get started and understand the usage of phabox2.

NOTE: If you are in mainland CHINA, please click the button to download the database via your browser. Then upload it to your HPC.

🔒  Installing phabox2 in primitive ways

For the person who cannot install PhaBOX as a package. Please try to install the following dependencies one by one:

# install dependencies
conda create --name phabox2 python=3.10
conda activate phabox2
conda config --add channels bioconda
conda install diamond=0.9.14 blast=2.16.0 mcl fasttree=2.1.11 kcounter=0.1.1 mafft=7.525
conda install numpy=1.26.4 pandas=2.2.3 networkx=3.4.2 seaborn-base=0.13.2 biopython=1.84 tqdm=4.66.5 scipy=1.14.1
conda install datasets transformers pytorch triton accelerate prodigal-gv

# install phabox binary 
git clone https://github.com/KennthShang/PhaBOX.git
cd PhaBOX
python  -m pip install . -vv
cd ..
# you can remove the PhaBOX folder once it is installed
rm -rf PhaBOX

# test
phabox2 --help

# Do not forget to download the database using wget (or go to the release page)
wget https://github.com/KennthShang/PhaBOX/releases/download/v2/phabox_db_v2.zip
unzip phabox_db_v2.zip > /dev/null