Skip to main content

Tree reconstruction of ancestry using incomplete lineage sorting

Project description

iTRAILS

Software

iTRAILS is a framework to jointly model incomplete lineage sorting (ILS) and gene flow (GF). iTRAILS uses the multispecies coalescent to approximate the ancestral recombination history of three populations and an outgroup. In brief, iTRAILS infers the ancestral tree from a multiple genome alignment, unbiasedly estimating ancestral effective population sizes, speciation times, and introgression time and proportions. iTRAILS also performs posterior decoding.

iTRAILS can be installed as both a PyPi and a conda package, and it's codebase is available at:

https://github.com/trails-phylogeny/itrails

Once the package is installed, iTRAILS is initiaited and controlled through 2 main console commands.

Optimization of Parameters

iTRAILS estimates key demographic parameters—such as speciation times, ancestral effective population sizes (Ne), and recombination rate (ρ)—by maximizing the log-likelihood computed from the coalescent HMM. iTRAILS takes into account the following parameters:

  • Population size parameters:
    • N_AB: Effective size of the ancestral population between the two most closely related species.
    • N_ABC: Effective size of the ancestral population between the three species.
  • Time parameters (generations):
    • T_1: Assuming ultrametric model, time from sample to coalescence of species A and B.
    • T_2: Time between coalescence of species A and B and coalescence of AB ancestral with species C.
    • T_3: Time between coalescence of species ABC and coalescence of ABC ancestral with outgroup species.
    • T_A: Time from sample of species A until coalescence with species B.
    • T_B: Time from sample of species B until coalescence with species A.
    • T_C: Time from sample of species C until coalescence with AB ancestral.
    • T_Upper: Time from start of last discretized time interval in ABC ancestral until coalescence with outgroup.
    • T_Out: Time from sample of outgorup until coalescence with ABC ancestral.
  • Other parameters:
    • Recombination rate (ρ): NUmber of recombinations per site per generation.
    • Mutation rate (μ): Number of mutations per site per generation.

Not all of the previously described parameters are independent from each other. Therefore, definition of parameters should comply with the following restrictions:

  • T_2, N_AB, N_ABC, ρ must always be defined as a fixed parameter os as a parameter to optimize.
  • μ must always be defined as a fixed parameter.
  • T_Upper and T_3: At least one of them should be defined (fixed or optimized). If only one of them is defined, the other one will be automatically calculated.
  • T_out: Can be defined or omitted, if defined it must be fixed, if omitted it will be automatically calculated.
  • T_A, T_B, T_C and T_1 should be defined (fixed or optimized) in the following combinations, the non defined parameters will take values as defined in the following table:
Specified parameters Used T_A Used T_B Used T_C
T_A / T_B / T_C T_A T_B T_C
T_1 / T_A T_A T_1 T_1 + T_2
T_1 / T_B T_1 T_B T_1 + T_2
T_1 / T_C T_1 T_1 T_C
T_A / T_B T_A T_B $\frac{T_A + T_B}{2} + T_2$
T_A / T_C T_A $\frac{T_A + T_C - T_2}{2}$ T_C
T_B / T_C $\frac{T_B + T_C - T_2}{2}$ T_B T_C
T_1 T_1 T_1 T_1 + T_2

In order to run an optimization, iTRAILS needs two input files.

  • A four-way genome alignment (MAF file) between three species and an outgroup.
$ cat alignment.maf

##maf version=1 scoring=none
# generated by Biopython

a score=3.25073e+06
s gorGor5.CYUI01015145v1                           8162515  3382 +         8455952 tcaaaaaactatttcttgagcattcattaagtgcaaa
s hg38.chr1                                       24998515  3414 +       248956422 TCAAAAAACTATTTCTTGAGCATTCATTAAGTGCAAA
s panTro5.chr1                                    24190887  3415 +       228573443 tcaaaaaactatctcttgagcattcattaagtgcaaa
s ponAbe2.chr1                                    24531025  3415 -       229942017 tcaaaaaactctttcttgagcattcattaagtgcaaa

a score=4.56614e+06
  • A configuration file (.yaml) that specifies fixed parameters, parameters to optimize, as well as the alignment file path (optional) and output path (optional). An example configuration file is found in the package and can be seen in console with the following function:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itrails-1.0.0.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

itrails-1.0.0-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file itrails-1.0.0.tar.gz.

File metadata

  • Download URL: itrails-1.0.0.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for itrails-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9f943bd7195237388c72b36591b114a97b6b464ceeddb7d29bd77708a6d3225e
MD5 e46293718af3425329b3083d8150f444
BLAKE2b-256 92fceb008dd1943fa9367ca9ee69f1eee5637a71fdda30c159605582ca29fe78

See more details on using hashes here.

File details

Details for the file itrails-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: itrails-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for itrails-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ec788a72439011fc75622f5cf2be7f455ed63acffbc9b043b3abcf418540a9c
MD5 f6184b5f870112b90acf11a519e034f1
BLAKE2b-256 f72303a71c147998e2f16b6337eb837fd5cfcaea1459634b6fa00d561f905f91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page