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

Uploaded Python 3

File details

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

File metadata

  • Download URL: itrails-0.1.0.tar.gz
  • Upload date:
  • Size: 53.8 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.0.tar.gz
Algorithm Hash digest
SHA256 e95603fe4de88826a749d2dfa65064bddb72185160e96332d17867dbc48f5987
MD5 9578edae12ce2a257dc28150be0ec29a
BLAKE2b-256 85ffc0cb096ee39bc7bf2cfff7503013b97ebb025d3b21e2cd2814ba435b6a9b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: itrails-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e290d45e34696eedfbbc340fe829b431dca3a86c08c03cb149c6c566cc5140
MD5 78d0a89d677e3f0d335b2feef2c1d02b
BLAKE2b-256 4df256614c7db23b15b4ab98ee4651ae5a0dcbe253ec876e1e2c6c962fa82b23

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