Metadata-Version: 2.4
Name: taxontabletools2
Version: 3.0.1
Summary: Taxontabletools2 - A comprehensive, platform-independent graphical user interface software to explore and visualise DNA metabarcoding data
Home-page: https://pypi.org/project/taxontabletools2
Author: Till-Hendrik Macher
Author-email: macher@uni-trier.de
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: streamlit<2,>=1.64.0
Requires-Dist: stqdm>=0.2.1
Requires-Dist: streamlit-sortables>=0.3.1
Requires-Dist: watchdog>=6.0.0
Requires-Dist: pandas<3,>=2.3.3
Requires-Dist: numpy<3,>=2.4.2
Requires-Dist: tables>=3.11.1
Requires-Dist: openpyxl>=3.1.5
Requires-Dist: xlsxwriter>=3.2.9
Requires-Dist: biom-format>=2.1.17
Requires-Dist: natsort>=8.4.0
Requires-Dist: biopython>=1.85
Requires-Dist: networkx>=3.0
Requires-Dist: scipy<2,>=1.17.1
Requires-Dist: scikit-learn<2,>=1.9.1
Requires-Dist: scikit-bio<0.8,>=0.7.2
Requires-Dist: statsmodels>=0.14.6
Requires-Dist: pymannkendall>=1.4.3
Requires-Dist: plotly<7,>=6.5.2
Requires-Dist: kaleido<2,>=1.2.0
Requires-Dist: matplotlib<4,>=3.10.8
Requires-Dist: matplotlib-venn>=1.1.2
Requires-Dist: pycirclize>=1.10.1
Requires-Dist: geopandas<2,>=1.1.4
Requires-Dist: shapely<3,>=2.1.2
Requires-Dist: pygbif>=0.6.6
Requires-Dist: requests>=2.32.5
Requires-Dist: psutil>=7.2.2
Requires-Dist: tqdm>=4.67.3
Requires-Dist: update_checker>=1.0.0
Requires-Dist: GitPython>=3.1.46
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TaxonTableTools2 (TTT)

[![Downloads](https://static.pepy.tech/badge/taxontabletools2)](https://pepy.tech/project/taxontabletools2)

Graphical software to analyse and visualise DNA metabarcoding data – no programming required. TTT runs in your browser (Streamlit) and works with the output of [APSCALE](https://github.com/DominikBuchner/apscale) and [APSCALE-blast](https://github.com/TillMacher/apscale_blast), or any other pipeline.

* **Input:** a Taxon Table (`.xlsx`): one row per OTU/ESV with its taxonomy, sequence and reads per sample, plus a Metadata Table (one row per sample)
* **Output:** interactive plots (saved as `.pdf` and `.html`), processed Taxon Tables and result tables (`.xlsx`) in your project folder

TTT2 is a complete redesign of the original TaxonTableTools. It is actively developed – bug reports and feature requests are very welcome.

## Installation

The easiest way is the TTT environment of the [APSCALE installer](https://github.com/TillMacher/apscale_installer), which installs TaxonTableTools2 and all its dependencies.

Alternatively, create the conda environment yourself (Python ≥ 3.11):

1. Install [Miniconda](https://www.anaconda.com/download/success) and open a Miniconda terminal (Windows: "Anaconda Powershell Prompt (Miniconda3)", macOS: Terminal)
2. Download the [environment file](https://github.com/TillMacher/TaxonTableTools2/blob/main/environments/taxontabletools2_env.yml)
3. Create and activate the environment:

```
conda env create -f taxontabletools2_env.yml
conda activate TTT
```

Alternatively, install via pip:

```
pip install taxontabletools2
```

### Optional programs

Some modules use external programs. They are only needed for these modules; TTT checks whether they are installed and tells you what is missing.

| Program | Used for | Installation |
|---|---|---|
| [MAFFT](https://mafft.cbrc.jp/alignment/software/) | Multiple sequence alignment (phylogenetic tree, haplotype network) | `conda install -c bioconda mafft` |
| [IQ-TREE](https://iqtree.github.io/) | Maximum-likelihood trees with model selection and bootstrap values | `conda install -c bioconda iqtree` |
| [R](https://www.r-project.org/) | European Fish Index (EFI), Diathor | `conda install -c conda-forge r-base` |
| [PICRUSt2](https://github.com/picrust/picrust2) | Predicted functions of bacteria (16S rRNA) | separate conda environment, see below |

PICRUSt2 needs pandas < 3 and is therefore installed in its own environment (TTT runs it there automatically):

```
conda create -n picrust2 -c conda-forge -c bioconda "picrust2>=2.6.4"
```

On Apple silicon Macs (M1–M4), some PICRUSt2 dependencies only exist for Intel Macs, so the Intel versions are installed (they run via Rosetta):

```
CONDA_SUBDIR=osx-64 conda create -n picrust2 -c conda-forge -c bioconda "picrust2>=2.6.4"
conda activate picrust2
conda config --env --set subdir osx-64
```

## Usage

```
conda activate TTT
taxontabletools2
```

The graphical interface opens in your browser. Select a working directory, create a project, and load a Taxon Table in the sidebar. All results are saved in the project folder.

### Modules

**Start**
* **Create Taxon Table:** combine a read table and a taxonomy table (e.g. from APSCALE and APSCALE-blast) into a Taxon Table
* **Settings:** plot layout (template, colours, font size, grid lines, export size) with a live example plot

**Taxon Table**
* **Taxon Table Editor:** edit the Taxon and Metadata Table, e.g. add sampling dates or coordinates
* **Basic Stats:** reads, OTUs/ESVs, taxonomic resolution and the most frequent taxa
* **Table Processing:** replicate merging, negative control subtraction, read filter, normalisation (rarefaction), taxonomic filter (incl. similarity and e-value thresholds), sample filter, low-coverage samples, trait filter
* **Table Conversion:** simplify, combine tables, sort and rename samples, export FASTA, ORF check
* **Traits:** add traits from your own tables, from GBIF (accepted name, habitat, IUCN Red List category) or predicted bacterial functions (PICRUSt2). PICRUSt2 results are also saved as Taxon Tables (KEGG orthologs, enzymes, MetaCyc pathways) that can be analysed in TTT

**Analyses**
* **Read Proportions:** read distribution, rarefaction curves, read/ESV auto-correlation
* **Alpha Diversity:** richness, evenness and Shannon diversity, circle diagrams
* **Beta Diversity:** similarity matrices, PCoA, NMDS, nestedness & turnover, RDA (several environmental variables)
* **Sample Comparison:** Venn diagrams and UpSet charts
* **Population Dynamics:** haplotype distribution, phylogenetic trees (Neighbor-Joining or maximum likelihood with IQ-TREE) and haplotype networks
* **Time Series:** richness over time (incl. trends) and animated timelines (`.mp4`/`.gif`)
* **Metadata Comparison:** compare Metadata Table columns as box, violin, scatter or bar plot (with Spearman correlation), or three columns as 3D scatter plot

**External Data & Indices**
* **Biogeography:** sampling site maps
* **GBIF:** convert GBIF occurrences, GBIF validation (synonym check, habitat, occurrence validation per region – same flags as APSCALE-blast), conversion for GBIF upload
* **Ecological Status Classes:** European Fish Index (EFI), Diathor (diatom indices), Perlodes conversion and import of Perlodes results into the Metadata Table

### Taxon Table format

| Hash | Phylum | Class | Order | Family | Genus | Species | Similarity | *traits (optional)* | Seq | Sample 1 | Sample 2 | … |
|---|---|---|---|---|---|---|---|---|---|---|---|---|

The second sheet ("Metadata Table") has the column `Samples` with all sample names, followed by any metadata columns (e.g. site, date, latitude, longitude). Example files are included in the package (`read_table_example.xlsx`, `taxonomy_table_example.xlsx`).

## Citation

If you use TaxonTableTools, please cite:

* **TaxonTableTools:** Macher, Beermann & Leese (2021) Molecular Ecology Resources 21: 1705–1714. https://doi.org/10.1111/1755-0998.13358

Please also cite the programs and data you used:

* **MAFFT:** Katoh & Standley (2013) Molecular Biology and Evolution 30: 772–780. https://doi.org/10.1093/molbev/mst010
* **IQ-TREE:** Wong et al. (2025) IQ-TREE 3, EcoEvoRxiv. https://doi.org/10.32942/X2P62N (and Minh et al. (2020) Molecular Biology and Evolution 37: 1530–1534. https://doi.org/10.1093/molbev/msaa015)
* **PICRUSt2:** Douglas et al. (2020) Nature Biotechnology 38: 685–688. https://doi.org/10.1038/s41587-020-0548-6
* **GBIF:** the DOI of the GBIF occurrence download or GBIF.org (year) GBIF Home Page, https://www.gbif.org
* **EFI:** Pont et al. (2006) Journal of Applied Ecology 43: 70–80. https://doi.org/10.1111/j.1365-2664.2005.01126.x
* **Diathor:** Nicolosi Gelis et al. (2022) Ecological Modelling 465: 109859. https://doi.org/10.1016/j.ecolmodel.2021.109859

## Reporting issues

Please open an [issue](https://github.com/TillMacher/TaxonTableTools2/issues) or contact me via email (macher@uni-trier.de).
