Skip to main content

GenPhylo generates synthetic alignments on a phylogenetic tree with given branch lengths.

Project description

GenPhylo: Generating Data on Phylogenetic trees

Authors: Marta Casanellas, Martí Cortada, Adrià Diéguez


GenPhylo generates synthetic alignments on a phylogenetic tree with given branch lengths.

The user has two options depending on which arguments are chosen. Both of them need to take as input a tree in the Newick format (with nodes of any degree) with annotated branch lengths.

▶️ Option 1: Generate $N$ FASTA files with alignments of length $L$ given a Newick tree

The program generates a set of transition matrices according to the input tree <tree.txt> and its branch lengths. From these matrices, $N$ different alignments of length $L$ are simulated A root distribution input parameter also needs to be passed: we can impose a random distribution or a specific one. The outputs (a .txt file with the transition matrices and a .tar with the .FASTA files corresponding to the simulated alignments) can be named using the <experiment_name> input parameter and are saved in the output_files directory

An example with $N = 5$ and $L=1000$:

Using a random root distribution:

python3 GenPhylo.py <tree.txt> 5 1000 random <experiment_name>

Using a specific root distribution (note that A,G,C,T must be values that sum up to 1)

python3 GenPhylo.py <tree.txt> 5 1000 "[A,G,C,T]" <experiment_name>

▶️ Option 2: Generate FASTA files with alignments of given lengths $L_1,...,L_d$ given a Newick tree

Working very similarly as the first option, the second one allows to generate aligments of different length. The program generates a set of transition matrices according to the input tree <tree.txt> and its branch lengths and from these matrices, alignments of length $L_1,...,L_d$ are generated (we can add as many lengths as alignments we want to generate. ). The outputs are saved the same way as described for Option 1.

An example, for $L_1 = 500$, $L_2 = 1000$ and $L_3 = 10000$

Using a random root distribution:

python3 GenPhylo.py <tree.txt> L500 L1000 L10000 random <experiment_name>

Using a specific root distribution (note that A,G,C,T must be values that sum up to 1)

python3 GenPhylo.py <tree.txt> L500 L1000 L10000 "[A,G,C,T]" <experiment_name>

⚠️ Note that in this case, sequence lengths are preceeded by an $L$.


This repository includes the file IQ-TREE_analysis.pdf that describes how we verified the precision of our alignments simulator by using the phylogenetic software IQ-TREE.


⚙️ This software is developped under de GNU General Public License v3

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

genphylo-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distributions

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

genphylo-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

GenPhylo-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: genphylo-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for genphylo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f9a6ae34493376b24ef14da0e647ad7d44d74a97163c6d057a80e15f94f7ab9b
MD5 b55c9eb36f475471ef673e982432c5b7
BLAKE2b-256 4451651addbf8f8879a14fb1b9297166aea4fd6b2a005b41a8ba3a61ba85df94

See more details on using hashes here.

File details

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

File metadata

  • Download URL: genphylo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for genphylo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34360ce55c0014d1be5bce87419d49bc623315cd9680c34558ac16d356006690
MD5 1b70db26245d928e14df1f2b7395e8d2
BLAKE2b-256 66532c893c967e303d98955e1b957ad882c5b1fb233d37e40149fe2261c486c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: GenPhylo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for GenPhylo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 814794dc2b282c9cc8fcb8b10d3b864cb13a731ea81e4f8f7dd72e085c3d15c7
MD5 352a720a456e974a87bc3726e237427f
BLAKE2b-256 43d827ccdc193806b85508b57e7441568a77bbfafad084886ef3a38c82fcb56e

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