DOI: 10.5061/dryad.jdfn2z3ng
title: Selecting a window size for the analysis of whole genome alignments using AIC

description: The variation of evolutionary histories along the genome presents a
 challenge for phylogenomic methods to identify the non-recombining regions
 and reconstruct the phylogenetic tree for each region. To address this
 problem, many studies used the non-overlapping window approach, often with
 an arbitrary selection of fixed window sizes that potentially include
 intra-window recombination events. In this study, we proposed an
 information-theoretic approach to select a window size that best reflects
 the underlying histories of the alignment. First, we simulated chromosome
 alignments that reflected the key characteristics of an empirical dataset
 and found that the AIC is a good predictor of window size accuracy in
 correctly recovering the tree topologies of the alignment. Due to the
 issue of missing data in empirical datasets, we then designed a stepwise
 non-overlapping window approach and applied this method to the genomes of
 erato-sara Heliconius butterflies and great apes. We found that the best
 window sizes for the butterflies’ chromosomes ranged from &lt;125bp to
 250bp, which are much shorter than those used in a previous study, even
 though this difference in window size did not significantly change the
 most common topologies across the genome. On the other hand, the best
 window sizes for great apes’ chromosomes ranged from 500bp to 1kb, with
 the proportion of the major topology (grouping human and chimpanzee)
 falling between 60% and 87%, consistent with previous findings.
 Additionally, we observed a notable impact of stochastic error and
 concatenation when using small and large windows, respectively. For
 instance, the proportion of the major topology for great apes was 50% when
 using 250bp windows, but reached almost 100% for 64kb windows. In
 conclusion, our study highlights the challenges associated with selecting
 a window size in non-overlapping window analyses and proposes the AIC as a
 more objective way to select the optimal window size for whole genome
 alignments.
description: # Selecting a window size for the analysis of whole genome alignments
 using AIC
 [https://doi.org/10.5061/dryad.jdfn2z3ng](https://doi.org/10.5061/dryad.jdfn2z3ng) ## Description of the data and file structure All datasets analysed on the manuscript were either simulated using the codes provided in `SimNOW-main.zip` or available online. The attached `.tsv` files were generated from running the codes on different datasets. ### Files and variables * `simulation_lowILS.tsv`: summary table for simulations with low ILS * `simulation`: simulation run * `r`: recombination rate on `ms` * `window_size`: window size being analysed * `accuracy`: percentage of sites that correctly recovers the true topology * `rmse`: RMSE of the topology distribution from the window trees compared to the true distribution * `aic`: the AIC score from the window trees * `bic`: the BIC score from the window trees * `simulation_midILS.tsv`: summary table for simulations with medium ILS * `simulation_highILS.tsv`: summary table for simulations with high ILS * `eratosara.tsv`: summary table from stepwise non-overlapping windows for *Heliconius erato-sara*' genomes * `chr`: chromosome * `l_wsize`: longer window size being compared * `s_wsize`: shorter window size being compared * `l_aic`: the AIC for the longer window size * `s_aic`: the AIC for the shorter window size * `diff_aic`: `s_aic` - `l_aic` * `fasta_ln`: length of the alignment after removing the trailing positions * `fasta_ln_percent`: percentage of `fasta_ln` compared to the original alignment * `greatapes.tsv`: summary table from stepwise non-overlapping windows for great apes' genomes * `SimNOW-main.zip`: codes to run non-overlapping window analyses on simulated and empirical datasets ## Code/software 1. `SimNOW/codes/` : simulate choromosomal alignments using `ms` and `AliSim`, then run non-overlapping window analysis with various window sizes and generate the window trees using `IQ-TREE2`. 2. `SimNOW/empirical_analyses/`: run non-overlapping window and stepwise non-overlapping window analyses on empirical alignments, with specific examples of *Heliconius erato* (`datasets/heliconius_erato`) and great apes (`datasets/hominidae`). The R pipelines also require some packages to run, listed at `SimNOW/README.md`. The detailed explanation of the workflow, including the input and output files, are available at `SimNOW/codes/README.md` and `SimNOW/empirical_analysis/README.md`. ## Access information * Codes are available at [Github](https://github.com/jeremiasivan/SimNOW)  * Data was derived from the following sources: * *Heliconius erato* ([Dryad](https://datadryad.org/stash/dataset/doi:10.5061/dryad.b7bj832)) * Great apes ([UCSC Genome Browser](https://hgdownload.soe.ucsc.edu/goldenPath/hg38/multiz20way))