PhyloConstructor is a Nextflow DSL2 workflow for building phylogenomic datasets and inferring species trees from publicly available genomic and transcriptomic resources.
Starting from the taxonomic identifier of a clade, the workflow automatically retrieves candidate datasets from multiple public repositories, identifies orthologous genes, applies BUSCO-based filtering strategies, and reconstructs phylogenetic trees using both concatenation and coalescent approaches.
-
Automatic retrieval of public datasets
- UniProt proteomes
- NCBI RefSeq/GenBank proteomes
- NCBI genome assemblies
- TSA transcriptomes
- SRA RNA-seq datasets
-
Integration of user-provided proteomes
-
Automatic BUSCO analysis of every candidate dataset
-
Selection of the best representative dataset for each species
-
Multiple BUSCO filtering strategies
-
Orthogroup inference
-
Construction of phylogenomic matrices
-
Maximum-likelihood phylogenies with IQ-TREE
-
Coalescent species trees with ASTRAL
-
Fully reproducible Nextflow DSL2 workflow
- Nextflow (tested with Nextflow version 25.10.0)
- Singularity
PhyloConstructor supports only the Singularity execution profile.
Clone the repository:
git clone https://github.com/dorinemerlat/phyloconstructor.git
cd phyloconstructorBuild or download all required Singularity containers before running the workflow.
A quick way to verify that the workflow and all containers are correctly installed is to execute a stub run:
nextflow run main.nf \
-profile singularity \
-stub-runNo real analyses are performed, but every workflow component is validated.
Important
Before launching a real analysis, delete the output (
results/) and cache (cache/) directories generated by the stub run.Stub processes create empty placeholder output files. Since Nextflow considers these files as valid outputs, they will not be overwritten during a subsequent real execution, which may lead to incorrect or incomplete results.
Two CSV files are used to describe user datasets.
This file is optional.
It is only used to provide proteomes that are not available in public databases.
Example:
taxid,name,fasta
4950,Torulaspora delbrueckii,/path/to/torulaspora_delbrueckii.faa
If no user proteomes are available, the file may simply contain the header:
taxid,name,fasta
PhyloConstructor will then automatically search public databases.
Outgroups are strongly recommended but remain optional.
Only the taxonomic identifier and species name are required.
Example:
taxid,name,fasta
4932,Saccharomyces cerevisiae,
If a custom proteome should be used instead of downloading public data, simply provide the FASTA path:
taxid,name,fasta
4932,Saccharomyces cerevisiae,/path/to/saccharomyces.faa
Most parameters are defined in nextflow.config.
NCBI taxonomy identifier of the focal taxonomic group to analyse.
This taxid is used to automatically retrieve candidate datasets from public databases (UniProt, NCBI Assembly, TSA and SRA).
Example:
group_taxid = 61985Download reference proteomes from UniProt.
Default:
trueGenerate proteomes from NCBI genome annotations.
If enabled, PhyloConstructor downloads annotated genome assemblies and extracts their predicted protein sequences.
Default:
trueDownload genome assemblies from NCBI.
Genome assemblies are used for BUSCO analyses and can also serve as references when assembling transcriptomes from SRA reads.
Default:
trueDownload transcriptome assemblies from the NCBI Transcriptome Shotgun Assembly (TSA) database.
Downloaded transcriptomes are translated into protein sequences using TransDecoder before being evaluated by BUSCO.
Default:
trueDownload RNA-seq datasets from the NCBI Sequence Read Archive (SRA).
Reads are assembled with RNA-SPAdes and translated into protein sequences using TransDecoder.
Default:
trueBUSCO lineage dataset used to assess dataset completeness.
This lineage should correspond to the taxonomic group being analysed.
Example:
busco_lineage = 'arthropoda_odb10'BUSCO filtering strategy used to retain orthologous sequences.
Available modes:
| Mode | Description |
|---|---|
only_single_copy |
Keep only complete single-copy BUSCO genes. |
all_complete |
Keep all complete BUSCO genes, including duplicated copies. |
both |
Run both filtering strategies independently. |
Default:
params.busco_filtering_mode = 'both'Threshold combinations used to generate phylogenomic datasets.
Each entry consists of:
[minimum BUSCO completeness, minimum orthogroup occupancy]
For example:
params.phylogeny_thresholds = [
[60, 80],
[70, 80],
[80, 90]
]This example generates three independent phylogenomic datasets:
- BUSCO completeness ≥ 60% and orthogroup occupancy ≥ 80%
- BUSCO completeness ≥ 70% and orthogroup occupancy ≥ 80%
- BUSCO completeness ≥ 80% and orthogroup occupancy ≥ 90%
Each dataset is analysed independently by the phylogenetic workflow, resulting in a separate phylogenetic tree.
The repository contains a complete example inside the examples/ directory.
Execute the pipeline with:
nextflow run main.nf \
-profile singularityTo resume an interrupted execution:
nextflow run main.nf \
-profile singularity \
-resumeThree filtering modes are available.
| Mode | Description |
|---|---|
| 1 | Keep complete single-copy BUSCO genes only |
| 2 | Keep all complete BUSCO genes, including duplicated copies |
| 3 | Execute both strategies independently |
Intermediate files are stored inside
cache/
Nextflow working directories are stored inside
work/
Final workflow outputs are written to
results/
At the moment, the principal outputs are:
- IQ-TREE maximum-likelihood trees
- ASTRAL species trees
Originally written by Dorine Merlat (dorine.merlat@etu.unistra.fr). Thanks to Arnaud Kress and Odile Lecompte for assistance.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.
This project is distributed under the MIT License.
