Skip to main content

ANIclustermap

Python3 OS License Latest PyPI version Bioconda

Overview

ANIclustermap is easy-to-use tool for drawing ANI(Average Nucleotide Identity) clustermap between all-vs-all microbial genomes. ANI between all-vs-all genomes are calculated by fastANI (or skani) and clustermap is drawn using seaborn.

ANIclustermap.png
Fig1. ANI clustermap between all-vs-all 33 genomes.

ANIclustermap.png
Fig2. ANI clustermap between all-vs-all 18 genomes. If no similarity detected by fastANI, filled in gray.

Installation

Python 3.9 or later is required for installation. fastANI or skani is required to calculate ANI.

Install bioconda package:

conda install -c conda-forge -c bioconda aniclustermap

Install PyPI stable package:

pip install aniclustermap

Workflow

Description of ANIclustermap's automated workflow.

  1. Calculate ANI between all-vs-all microbial genomes by fastANI (or skani).
    If no similarity detected by fastANI, NA is output. In that case, NA is replaced by 0.0.
    If previous result available at the time of re-run, reuse previous result.
  2. Clustering ANI matrix by scipy UPGMA method.
  3. Using clustered matrix, draw ANI clustermap by seaborn.

Usage

Basic Command

ANIclustermap -i [Genome fasta directory] -o [output directory]

Options

$ ANIclustermap --help
                                                                                                                      
Usage: ANIclustermap [OPTIONS]                                                                                       
                                                                                                                      
Draw ANI(Average Nucleotide Identity) clustermap                                                                     
                                                                                                                      
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────╮
│ *  --indir             -i        Input genome fasta directory (*.fa|*.fna[.gz]|*.fasta) [required]   │
│ *  --outdir            -o        Output directory [required]                                         │
│    --mode                        ANI calculation tool (fastani|skani) [default: fastani]             │
│    --thread_num        -t        Thread number parameter [default: MaxThread - 1]                    │
│    --overwrite                   Overwrite previous ANI calculation result                           │
│    --fig_width                   Figure width [default: 10]                                          │
│    --fig_height                  Figure height [default: 10]                                         │
│    --dendrogram_ratio            Dendrogram ratio to figsize [default: 0.15]                         │
│    --cmap_colors                 cmap interpolation colors parameter [default: lime,yellow,red]      │
│    --cmap_gamma                  cmap gamma parameter [default: 1.0]                                 │
│    --cmap_ranges                 Range values (e.g. 80,90,95,100) for discrete cmap                  │
│    --cbar_pos                    Colorbar position [default: 0.02, 0.85, 0.04, 0.15]                 │
│    --annotation                  Show ANI value annotation                                           │
│    --annotation_fmt              Annotation value format [default: .3g]                              │
│    --quiet                       No print log on screen                                              │
│    --version           -v        Print version information                                           │
│    --help              -h        Show this message and exit.                                         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯

Example Command

7 genomes minimal dataset. Click here to download dataset.

ANIclustermap -i ./minimal_dataset/ -o ./ANIclustermap_result

Output Contents

ANIclustermap outputs 3 types of result files.

  • ANIclustermap.[png|svg] (example1, example2)
    ANI clustermap result figure.

  • ANIclustermap_matrix.tsv (example)
    Clustered all-vs-all ANI matrix.

  • ANIclustermap_dendrogram.nwk (example)
    Newick format clustering dendrogram.

Gallery

Example gallery of 33 genomes normal dataset.
If you want to try it for yourself, click here to donwload dataset.

Normal parameter:

ANIclustermap -i ./normal_dataset -o ./ANIclustermap_result01 \
              --fig_width 15

ANIclustermap.png

Change cmap_gamma parameter:

ANIclustermap -i ./normal_dataset -o ./ANIclustermap_result02 \
              --fig_width 15 --cmap_gamma 0.5

ANIclustermap.png

Change cmap_colors(=white,orange,red) paramter:

ANIclustermap -i ./normal_dataset -o ./ANIclustermap_result03 \
              --fig_width 15 --cmap_colors white,orange,red

ANIclustermap.png

Change cmap_ranges paramter:

ANIclustermap -i ./normal_dataset -o ./ANIclustermap_result04 \
              --fig_width 15 --cmap_ranges 80,85,90,92.5,95,97.5,100

See this issue for more details.

ANIclustermap.png

Add ANI value annotation parameter:

ANIclustermap -i ./normal_dataset -o ./ANIclustermap_result05 \
              --fig_width 20 --fig_height 15 --annotation

ANIclustermap.png

Metadata

Release files for aniclustermap 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aniclustermap 2.0.1
File Size Uploaded
aniclustermap-2.0.1.tar.gz 3.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for aniclustermap 2.0.1
File Interpreter ABI Platform
aniclustermap-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.8 MB

Release files / aniclustermap-2.0.1.tar.gz

Download URL aniclustermap-2.0.1.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
2826beb6898e4871bc7153ab9da15deca849f83668893ddbeb985e0e4718cd52
BLAKE2b-256 checksum
How to use checksums
82463f29146324cc114d0f264ddd2a61b67c140780c0a024e4b3bedcb4c4e1f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.9

Release files / aniclustermap-2.0.1-py3-none-any.whl

Download URL aniclustermap-2.0.1-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
19c868d89f66ec39c61652aacb2dc70c0481b844f4f0bf114175b22b66a53ac3
BLAKE2b-256 checksum
How to use checksums
4aec27dca3e3bdde639fa7d78f2c9e294ec591b796919b52b0cd064e9434d57c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.9

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page