Skip to main content

Supermatrix phylogenetics using complete mitochondrial genomes

Project description

phylomito

A python script for mitochondrial supermatrix phylogenomics.

usage: phylomito.py [-h] -i [INPATH] [-o [OUTPATH]]
                    [-e [EXTENSION [EXTENSION ...]]] [-b [BOOTSTRAP]]
                    [-p [PROTEIN]] [-g [GENE_TREE]] [-d [DLOOP]]

This program is licensed under GPLv3.

Quick start:

  • Save your genebank files in a folder (for example, ./genebank/) and create a folder for the output (./output/).
  • Make sure your genebank files have the extension '.gbk' or '.gb'.
  • Run the command:
python phylomito.py -i ./genebank/ -o ./outpath/
  • Your results will be in the ./outpath/ folder. The final tree file will be named all_nuc.phy_phyml_tree.txt by default.

Requisites:

You need to install PhyML, Clustal Omega, python 3 and the Biopython library to run this program.

This program was tested on a Linux machine.

How does it work:

This program finds all genebank files (mitogenomes) in a folder and saves, in a multifasta file, each gene that is present in all mitogenomes. These files are aligned with CLUSTALW and the alignment is concatenated in a single file (all_nuc.aln, by default) that contains all aligned genes from all mitogenomes. Phyml uses this file to generate a Maximum Likelihood tree.

Advanced features:

  • You can generate an amino acid alignment and phylogeny using the -p (or --protein) flag. The default is nucleotidic alignment and phylogeny.
  • Running the program with the -g (or --gene_tree) flag will generate a tree for every gene.
  • Using -g along with -d (or --dloop) will generate a tree of the DLOOP region. The supermatrix tree will also include this region. Do not use the -d flag with the -p flag, as it will translate the DLOOP region, generating gibberish.
  • Default number of bootstrap resamples is 100. You can change this with the -b (or --bootstrap) flag. Changing this will affect how long it takes to run the phylogeny.

Common errors:

The most common problem is bad formatted genebank files. The error will look like this:

mitochondria1.gb
mitochondria2.gb
mitochondria3.gb
COX_1 is not a known gene. Replace the CDS gene id with one of the following:
ND1  ND2  COX1  COX2  ATP8  ATP6  ND3  ND4L  ND4  ND5  CYTB  ND6  COX3
Traceback (most recent call last):
  File "/path/phylomito/phylomito.py", line 315, in <module>
    main(args)
  File "/path/phylomito/phylomito.py", line 70, in main
    split_seqs(inpath, outpath, protein, extension, dloop)
  File "/path/phylomito/phylomito.py", line 140, in split_seqs
    gene_key = gene_dict[header]
KeyError: 'COX_1'

Where mitochondria3.gb is the file where the error was found. In this case the solution is to edit your file and replace all occurrences of COX_1 with COX1.

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

phylomito-0.1.0.tar.gz (992.0 kB view details)

Uploaded Source

Built Distribution

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

phylomito-0.1.0-py3-none-any.whl (991.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: phylomito-0.1.0.tar.gz
  • Upload date:
  • Size: 992.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

File hashes

Hashes for phylomito-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a2014a58a2be38f86dc274ef9ed61a25961dadf1b65175e9815c58fc59e91f81
MD5 fc9cf312d9c9e8a48afda671f102043b
BLAKE2b-256 716a12fc7436d5339fe06795fadc88aa9d0b5c2992920147c6cb82b308789409

See more details on using hashes here.

File details

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

File metadata

  • Download URL: phylomito-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 991.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

File hashes

Hashes for phylomito-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dbd6917b8acc7aafed2cffc8b5c6e457cbe8d358c1e1384868c28a3e8c2a581c
MD5 6c2acbd034ce472216eddecf529d7871
BLAKE2b-256 93ba829a3e2c5d75ae6f2883f1daa940cc96273813f9690239e97f0308cacbec

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