A WDL workflow for automated rendering of phylogenetic trees from Newick files using ETE3, supporting customizable image format, font size & resolution in a reproducible Docker environment.
Phylogenetic tree visualization workflow using WDL & ETE3
This WDL-based workflow renders phylogenetic trees from Newick format files using the powerful ETE3 Python library. It supports rendering multiple trees in parallel, with customizable font size, width & image format.
- Supports batch rendering of
.nwk
Newick files - Generates high-resolution tree images (PNG, SVG)
- Customizable width & font size
- Clean render logs for debugging
- Dockerized for reproducibility
- Cromwell
- Docker (or Singularity for HPC environments)
- WDL 1.0 compatible runner
- Input Newick trees
git clone https://github.com/gmboowa/phyloTreeViz-WDL.git
cd phyloTreeViz-WDL
{
"TREE_VISUALIZATION.input_trees": [
"~/core_core_genes.nwk",
"~/accessory_accessory_genes.nwk"
],
"TREE_VISUALIZATION.width": 1200,
"TREE_VISUALIZATION.image_format": "png",
"TREE_VISUALIZATION.font_size": 8
}
java -jar cromwell.jar run phyloTreeViz-WDL.wdl -i inputs.json
Each tree will result in:
- A rendered image (
phylogenetic_tree_<input>.png
) - A detailed log file (
render_<input>.log
)
They will be found in the final_phylogenetic_tree_image/
directory per task.
The workflow uses the pre-built Docker image:
gmboowa/ete3-render:1.14
This image comes with:
- Python 3
- ETE3
- All dependencies pre-installed
.
├── workflows/
│ └── TREE_VISUALIZATION.wdl # Main WDL workflow
├── inputs/
│ └── example_inputs.json # Example JSON input
├── test_data/
│ ├── core_core_genes.nwk # Sample Newick trees
│ └── accessory_accessory_genes.nwk
├── docker/
MIT License – see LICENSE
file for details.
Uses ETE3 for tree rendering.
- Missing Docker? Ensure Docker is installed and accessible to Cromwell.
- Tree not rendered? Check logs in
render_*.log
for Python errors. - No output image? Ensure input
.nwk
file is valid and has correct format.
For questions, suggestions, or contributions, feel free to open an issue or pull request.