Skip to main content
LexicMap: efficient sequence alignment against millions of prokaryotic genomes​
GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Installation

LexicMap can be installed via conda, by downloading executable binary files, or by compiling from the source.

It also supports shell completion, which can speed up typing.

Conda/Pixi

Install conda, then run

conda install -c bioconda lexicmap

Or use mamba, which is faster.

conda install -c conda-forge mamba
mamba install -c bioconda lexicmap

Or use pixi, which is even faster.

pixi config channels add bioconda
pixi add lexicmap

Linux and macOS (both x86 and ARM CPUs) are supported.

Binary files

  1. Download the binary file.

    OS Arch File
    Linux 64-bit lexicmap_linux_amd64.tar.gz
    Linux arm64 lexicmap_linux_arm64.tar.gz
  2. Decompress it:

     tar -zxvf lexicmap_linux_amd64.tar.gz
    
  3. If you have root privileges, simply copy it to /usr/local/bin:

     sudo cp lexicmap /usr/local/bin/
    
  4. If you don’t have root privileges, copy it to any directory listed in the environment variable PATH:

     mkdir -p $HOME/bin/; cp lexicmap $HOME/bin/
    

    Optionally, add the directory to the environment variable PATH if it is not already included.

     # bash
     echo export PATH=\$PATH:\$HOME/bin/ >> $HOME/.bashrc
     source $HOME/.bashrc # apply the configuration
    
     # zsh
     echo export PATH=\$PATH:\$HOME/bin/ >> $HOME/.zshrc
     source $HOME/.zshrc # apply the configuration
    
  1. Download the binary file.

    OS Arch File
    macOS 64-bit lexicmap_darwin_amd64.tar.gz
    macOS arm64 lexicmap_darwin_arm64.tar.gz
  2. Copy it to any directory in the environment variable PATH:

     mkdir -p $HOME/bin/; cp lexicmap $HOME/bin/
    

    Optionally, add the directory to the environment variable PATH if it is not already included.

     # bash
     echo export PATH=\$PATH:\$HOME/bin/ >> $HOME/.bashrc
     source $HOME/.bashrc # apply the configuration
    
     # zsh
     echo export PATH=\$PATH:\$HOME/bin/ >> $HOME/.zshrc
     source $HOME/.zshrc # apply the configuration
    
  1. Download the binary file.

    OS Arch File
    Windows 64-bit lexicmap_windows_amd64.exe.tar.gz
    Windows arm64 lexicmap_windows_arm64.exe.tar.gz
  2. Decompress it.

  3. Copy lexicmap.exe to C:\WINDOWS\system32.

  1. Download the binary file.
    OS Arch File
    FreeBSD 64-bit lexicmap_freebsd_amd64.tar.gz
    FreeBSD arm64 lexicmap_freebsd_arm64.tar.gz
  1. Download the binary file.
    OS Arch File
    OpenBSD 64-bit lexicmap_openbsd_amd64.tar.gz
    OpenBSD arm64 lexicmap_openbsd_arm64.tar.gz

Compile from the source

  1. Install go (go 1.22 or later versions).

     wget https://go.dev/dl/go1.27.2.linux-amd64.tar.gz
    
     tar -zxf go1.27.2.linux-amd64.tar.gz -C $HOME/
    
     # or
     #   echo "export PATH=$PATH:$HOME/go/bin" >> ~/.bashrc
     #   source ~/.bashrc
     export PATH=$PATH:$HOME/go/bin
    
  2. Compile LexicMap.

     # ------------- the latest stable version -------------
    
     go install -v github.com/shenwei356/LexicMap/lexicmap@latest
    
     # The executable binary file is located in:
     #   ~/go/bin/lexicmap
     # You can also move it to anywhere in the $PATH
     mkdir -p $HOME/bin
     cp ~/go/bin/lexicmap $HOME/bin/
    
    
     # --------------- the latest stable/development version --------------
    
     git clone https://github.com/shenwei356/LexicMap
    
     # Optionally chose a version
     # git check v0.10.0
    
     cd LexicMap/lexicmap/
     go build
    
     # The executable binary file is located in:
     #   ./lexicmap
     # You can also move it to anywhere in the $PATH
     mkdir -p $HOME/bin
     cp ./lexicmap $HOME/bin/
    

Shell-completion

Supported shells: bash|zsh|fish|powershell

Bash:

# generate completion shell
lexicmap autocompletion --shell bash

# configure if never did.
# install bash-completion if the "complete" command is not found.
echo "for bcfile in ~/.bash_completion.d/* ; do source \$bcfile; done" >> ~/.bash_completion
echo "source ~/.bash_completion" >> ~/.bashrc

Zsh:

# generate completion shell
lexicmap autocompletion --shell zsh --file ~/.zfunc/_kmcp

# configure if never did
echo 'fpath=( ~/.zfunc "${fpath[@]}" )' >> ~/.zshrc
echo "autoload -U compinit; compinit" >> ~/.zshrc

fish:

lexicmap autocompletion --shell fish --file ~/.config/fish/completions/lexicmap.fish