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-0.1.2.tar.gz (53.9 kB view details)

Uploaded Source

Built Distribution

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

itrails-0.1.2-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for itrails-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f1719bc89dc2559f71984ba0ce47ee99d707130f5b4ae0b67bbe242ac5806977
MD5 06b8b179d764791c5d8d13f726181d1f
BLAKE2b-256 dc6ba5ffd94dc2eb3abb5a345fbf095c6083dd4196759bb83ced8a0407175d18

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for itrails-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 de890b91574dac542c2b132c447ab4c1826c3ee7135c3acefede2501ce405844
MD5 bb361288f5fb409beb32997591304f24
BLAKE2b-256 23de90bfa3f1b5bb55697f6f2372543d6267009e79ee987eb8c20b4f4a15449a

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