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.1.tar.gz (54.5 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.1-py3-none-any.whl (58.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: itrails-0.1.1.tar.gz
  • Upload date:
  • Size: 54.5 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.1.tar.gz
Algorithm Hash digest
SHA256 4c3e54f4f40e0ef691c5a6087ef01aa835519390d9ec8fe75edde62a094bb79e
MD5 cc636f1a8b60078903ab98b6a41ded78
BLAKE2b-256 8a9b8718063043c1d57cf8473341050bff5034954c4cecd6b5e29d7bda1b3312

See more details on using hashes here.

File details

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

File metadata

  • Download URL: itrails-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07e19d00492e255f329ec565ee8baa0b95763bc2e08681f24c3d50ec8a4a9a44
MD5 7fcd71621d0dba0bdd5583dd8ad1efcd
BLAKE2b-256 729f35a42b7b4892812ed62150215ed413291a44a99f49ae4f0567982010308d

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