Skip to main content

No project description provided

Project description

online-BEAST

PyPi tests cov

This command line tool can be used to add sequences to an ongoing analysis in BEAST2 analysis. This framework is called online Bayesian phylodynamic inference (see Gill et al., 2020).

Install

Install online-beast with pip (requires python -V >= 3.6.2).

pip install online-beast

Usage

Give online-beast beast the path to a xml file from an previous BEAST run (i.e. one that have been stopped/killed/crashed) and a fasta of sequence to add to the analysis. Sequences in the fasta file must be aligned and the same length as the other sequences in the XML file. Only new sequences (new descriptors) will be added to the analysis, so new sequences can be append to the fasta file as they are acquired.

online-beast data/testGTR.xml data/samples.fasta

The new sequences will by added to the XML file and the associated .state file (produced automatically by BEAST2).

The analysis can then be resumed (with the additional sequence data) using the BEAST2 resume flag.

beast -resume testGTR.xml

The online analysis can be visualised using Beastiary. The jumps in the trace show where new sequences have been added.

By default the new sequences will be appended to the input XML and Sate files. Output file names can be specified using the --output flag. This will also create a new .state file.

online-beast testGTR.xml samples.fasta --output new_testGTR.xml 

If you use the BEAST2 -statefile flag to specify the filename of the state (i.e. it is not xml_filename + .state). Use the flag --state-file to specify the state file path.

online-beast testGTR.xml samples.fasta --state-file beast.state 

Explanation

Online-beast loosely follows the implementation of Gill et al., 2020 for BEAST1. However, most of the implementation of online-beast is handle by the default state system in BEAST2. Sequences are added to the latest tree in the state file. New sequences are added from the fasta file one at a time. The pairwise distance is calculated between the new sequence and all the other sequences in the XML file. The new sequence is grafted onto the tree in the .state file half way along the branch of the closest sequence in the XML file. The new sequence is append to the BEAST XML file.

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

online-beast-0.3.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

online_beast-0.3.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page