There is no restriction as far as I am aware of. Tested and working on Linux, macOS and Windows systems.
(But Windows users will need extra configurations...)
HGTector is written in Python 3. One needs at least Python 3.6 to run the program. I recommend Conda for managing Python version and packages.
conda create -n hgtector -c conda-forge python=3 pyyaml pandas matplotlib scikit-learn
conda activate hgtector
pip install git+https://github.com/qiyunlab/HGTector.git
Download this repository or any of the releases. Unzip. Then execute:
python setup.py install
Type hgtector
to check if installation is successful, in which case command-line help information will be displayed on the screen.
You may now read first run and second run before proceeding with aligner and database installation.
One may use choice of DIAMOND or BLAST for sequence homology search. If you have already installed them, make sure they are callable from the environment, or use command-line arguments to point the executables to HGTector. Alternatively, you may install them via Conda:
conda install -c bioconda diamond blast
HGTector has a command database
for automated database construction. It defaults to the NCBI RefSeq microbial genomes and taxonomy. Meanwhile, we also provide instructions for using GTDB and custom databases. See details.
A standard database built using the default protocol on 2023-01-02 is available for download (OneDrive or Dropbox), together with instruction for compiling.
A small, pre-compiled test database is also available for download from the same websites.
Just add --upgrade
or -U
to the pip command:
pip install -U git+https://github.com/qiyunlab/HGTector.git
Note: You can only upgrade from HGTector 2.0b1 or above. You cannot upgrade from older versions, which were written in Perl.
pip uninstall hgtector
If you no longer need the conda environment:
conda env remove -n hgtector --all
If in the future some dependencies have changes that are not compatible with the current release of HGTector, the following "safe" command can be used to install the current versions of dependencies.
conda create -n hgtector-dev -c conda-forge python=3.10.0 pyyaml=6.0 pandas=1.3.4 matplotlib=3.5.0 scikit-learn=1.0.1 bioconda::diamond=2.0.13 bioconda::blast=2.12.0