Data from: Unifying phylogenetic traversal and deep learning to guide tree exploration
Data files
Jul 15, 2026 version files 1.68 GB
-
dpvt_data.tar.gz
1.68 GB
-
empirical_alignments.tar.gz
6.26 KB
-
README.md
6.86 KB
-
simulated_alignments.tar.gz
1.60 MB
Abstract
We present a novel approach that combines deep learning with concepts behind current successful phylogenetic algorithms. Specifically, we give the deep learning algorithm access to the output of a phylogenetic dynamic program on the sequence alignment, rather than the raw sequence alignment. The algorithm then learns features based on these phylogenetically processed versions of the sequence data, providing information to guide local tree search. Our goal is simple: predict for each edge in a tree whether it is in a maximum parsimony tree or not. Our model consists of a recurrent neural network that learns features while traversing the input tree, which are used to classify the edge. This data repository contains both the raw sequence alignments used in this study as well as the pre-processed data that is input to our deep learning model. This in particular includes phylogenetic trees with edges labelled as present or absent in a maximum parsimony tree, allowing to reproduce the results of the manuscript.
This directory contains all datasets for training and testing dpvt models as described in the manuscript Unifying phylogenetic traversal and deep learning to guide tree exploration.
We provide alignments used to generate training and testing data in simulated_alignments/ and empirical_alignments/ and the pickled data with the correct input format for dpvt models in dpvt_data/.
None of the empirical_alignments/ source alignments are included in this upload — they must be downloaded before use with the provided scripts. See Obtaining the empirical alignments below.
Directory structure
data_for_dryad/
├── empirical_alignments.tar.gz/
│ ├── influenzaC_fluC_M/ # populated by download_endemic_viruses.py, see below
│ ├── influenzaC_fluC_NS/ # populated by download_endemic_viruses.py, see below
│ ├── influenzaC_fluC_PB2/ # populated by download_endemic_viruses.py, see below
│ ├── rotavirusA_H_H2/ # populated by download_endemic_viruses.py, see below
│ ├── download_endemic_viruses.py
│ ├── orthomam/ # populated by download_orthomam.py, see below
│ ├── orthomam_train_ids.txt
│ ├── orthomam_test_ids.txt
│ ├── download_orthomam.py
│ ├── pandit/ # populated by download_pandit.py, see below
│ ├── pandit_train_ids.txt
│ ├── pandit_test_ids.txt
│ └── download_pandit.py
├── simulated_alignments.tar.gz/
│ ├── simulated_25_seq_100_sites_200_algnmnts_filtered_0.8_spr/
│ ├── simulated_25_seq_100_sites_500_algnmnts_filtered_0.8_spr/
│ ├── simulated_50_seq_100_sites_200_algnmnts_filtered_0.8_spr/
│ └── simulated_50_seq_100_sites_500_algnmnts_filtered_0.8_spr/
└── dpvt_data.tar.gz/
└── *.p (pickle files)
Obtaining the empirical alignments
empirical_alignments/ ships three download scripts instead of the alignment files themselves. Each fetches data from its original source and lays it out to match the structure shown above.
Requirements: Python 3 with the requests package installed (pip install requests).
cd empirical_alignments
python download_endemic_viruses.py # influenza C (M, NS, PB2) and rotavirus A (H_H2)
python download_orthomam.py # reads orthomam_{train,test}_ids.txt
python download_pandit.py # reads pandit_{train,test}_ids.txt
download_endemic_viruses.pyfetches the aligned FASTA files for influenza C segments M, NS, and PB2, and rotavirus A segment 11 (genotype H2), from the endemic human virus data GitHub repository (Kistler and Bedford, 2023), then cleans them to match the alignments actually used in this project (deduplicating identical sequences, stripping "." from accession-derived names, normalizing ambiguity codes, and, for the influenza segments, adding a consensus "root" sequence), and writes them to<name>/<name>.fasta. Pass--rawto skip the cleaning step and keep the untouched files as fetched from GitHub.download_orthomam.pyfetches each gene's alignment individually from OrthoMaM v12's bulk file server, using the ID lists inorthomam_{train,test}_ids.txt(which record which alignments belong to which split).download_pandit.pyfetches the single ~58MB PANDIT flatfile archive once (cached underempirical_alignments/.cache/), then extracts the DNA alignment for each family listed inpandit_{train,test}_ids.txt. PANDIT has been frozen since 2008 and has no per-family download endpoint, so this is unavoidable, but the file is small.
All scripts skip alignments that are already present, so they can be safely re-run or interrupted and resumed. Pass --force to re-download (for the download scripts), and --split train/--split test to fetch only one split (for the OrthoMaM/PANDIT scripts). Run any of them with --help for the full set of options.
File formats
- Alignments (
empirical_alignments/,simulated_alignments/): FASTA format (.fasta) - dpvt data (
dpvt_data/): Python pickle files (.p), compatible with Python 3. These can be loaded usingpickle.load()and contain the input format required bydpvtmodels.
All datasets in dpvt_data have been generated by the Snakemake pipeline provided in /dpvtex/larch/ of the dpvt-experiments-1 repo.
Citation
If you use this dataset, please cite the accompanying manuscript: Unifying phylogenetic traversal and deep learning to guide tree exploration.
Data sources
Empirical data
Empirical alignments are from three sources (see Obtaining the empirical alignments for how to download each):
- endemic human virus data (Kistler and Bedford, 2023): influenza C segments M, NS, and PB2, and rotavirus segment 11
- orthologous mammalian markers from the OrthoMaM database (Allio et al., 2023)
- coding DNA sequence of a variety of families of homologous protein domains from the PANDIT database (Whelan et al., 2006)
We perform the following preprocessing steps before generating the dpvt_data/ pickle files from the OrthoMaM and PANDIT alignments:
- Remove all sequences where more than 20 % of characters are gaps or ambiguous characters.
- Remove all sites containing gaps or ambiguous characters.
- Remove uninformative sites (sites where all sequences have the same character, or where only one sequence differs).
- Discard alignments that lost too many sites: at least 80 % of original sites must remain for PANDIT, or 50 % for OrthoMaM.
- Split into 80 % training and 20 % testing sets.
For OrthoMaM, we randomly draw 1,000 alignments for training and 200 for testing.
For the endemic human viruses, we generate testing data from a single alignment per virus.
As there can be many maximum parsimony trees for an alignment, we include up to 200 trees per alignment in the dpvt_data/ sets.
Simulated data
Simulated alignments have been generated using this script.
For generating dpvt_data for simulated alignments with 50 sequences, both SPR and random subtree replacements have been used as perturbation methods.
