Skip to main content

Episodic

A complete pipeline for fitting and testing Fixed Local Clock (FLC) molecular clock models for episodic evolution.

PyPI - Version PyPI - Python Version


About

Episodic is a tool for fitting and testing Fixed Local Clock (FLC) molecular clock models for episodic evolution. The package is built on top of SNK, and provides a complete pipeline for fitting and testing models of episodic evolution using BEAST.

Episodic implements the ideas of Tay et al. (2022 and 2023) and detects episodic evolution through Bayesian inference of molecular clock models.

Given a multiple sequence alignment and a list of groups to test for episodic evolution, episodic will:

  • Configure BEAST analyses for strict, relaxed (UCGD) and fixed local clock models.
  • Configure marginal likelihood analyses for each clock model.
  • Run all the BEAST and marginal likelihood analyses.
  • Plot and summarise the results.
  • Compute and plot Bayes factors for the marginal likelihood analyses.
  • Produce maximum clade credibility (MCC) trees for each clock model.
  • Compute bayes factor on effect size for the FLC models (foreground vs background).
  • Run rank and quantile tests on the relaxed clock models.
  • Handel the execution of the pipeline on a HPC cluster via snakemake profiles.
  • Produce a report of the results (TBD).

Features

  • Complete pipeline - episodic provides a complete pipeline for fitting and testing FLC models of episodic evolution.
  • Flexible - episodic is built on top of SNK, and provides a flexible framework for fitting and testing FLC models of episodic evolution.
  • Easy to use - episodic is easy to use, and provides a simple interface for fitting and testing FLC models of episodic evolution.
  • robust - episodic is robust, and provides a robust framework for fitting and testing FLC models of episodic evolution.

Installation

pip install episodic

CLI

Multiple alignment partitions can be supplied by repeating --alignment.

episodic run \
    --alignment partition1.fasta \
    --alignment partition2.fasta \
    --group BA.2.86

Outputs

Episodic produces BEAST logs, trees, summary tables and plots under output.dir (optionally timestamped when output.dated: true).

For the complete output file reference (all targets, side-effect files, and optional branches), see:

Main output categories include:

  • BEAST log files - episodic will produce a BEAST log file for each clock model. These files can be analysed with Beastiary.

  • BEAST trees - episodic will produce a BEAST tree file for each clock model.

  • MCC trees - episodic will produce a MCC tree for each clock model.

  • MCC tree plots - episodic will produce a MCC tree plot for each clock model.

  • Marginal likelihoods - episodic will produce a marginal likelihood plot for each clock model.

  • Bayes factors on effect size - episodic will calculate a Bayes factors on effect size for each local clock model.

    Rate Column p_p p_odds pos_p pos_odds bf
    BA.2.86.rate 0.5034996111543162 1.0140971134481986 1.0 inf inf
  • Rank and quantile tests - episodic will produce a rank and quantile test plot for each relaxed clock model.

  • Partition local-rate posterior plots (FLC clocks) - overlaid background vs local posterior densities per partition.

  • Clock rate plots - episodic will produce a rate plot for each clock model.

DAG

License

episodic is distributed under the terms of the MIT license.

Metadata

Release files for episodic 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for episodic 0.8.1
File Size Uploaded
episodic-0.8.1.tar.gz 68.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for episodic 0.8.1
File Interpreter ABI Platform
episodic-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 126.1 kB

Release files / episodic-0.8.1.tar.gz

Download URL episodic-0.8.1.tar.gz
Size 68.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ec5e84fc658cc61875ded75dd4e7fa2a04a29153ceb503854f1fd8d50ceb26b2
BLAKE2b-256 checksum
How to use checksums
c69a62fe2aa4bbbb3fed3bbb9c3672cb17ac4470df1fae206ec14b924bcd9850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / episodic-0.8.1-py3-none-any.whl

Download URL episodic-0.8.1-py3-none-any.whl
Size 57.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0183c77bd31afb7c2260d4ad63290709fc29237ce23d2cc1eb61a726df030782
BLAKE2b-256 checksum
How to use checksums
542917b23d1be3b19082f13afd32850edb4960f9602c20fbd6241798398f6f0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page