Skip to main content

Evolutionary motion analysis tool

Project description

PyEvoMotion

A software to assess the evolution dynamics of a set of related DNA sequences.

(See Goiriz L, et al.)

Installation

Note: PyEvoMotion uses mafft to do the sequence alignment. If it’s not available in your system, on the the first run of PyEvoMotion, it will ask to install it locally.

If so, ensure to restart your shell session or run source ~/.bashrc to update the PATH environment variable, so that the mafft executable is available in your shell.

To install PyEvoMotion you may clone the repository and run pip install, or install it from PyPI:

pip install PyEvoMotion

This will install the package and its dependencies (but not the tests nor the test data). To check if the installation was successful, you can run the following command:

PyEvoMotion

If the installation was successful, you should see the following output:

Welcome to Rodrigolab's
 _____       ______          __  __       _   _
|  __ \     |  ____|        |  \/  |     | | (_)
| |__) |   _| |____   _____ | \  / | ___ | |_ _  ___  _ __
|  ___/ | | |  __\ \ / / _ \| |\/| |/ _ \| __| |/ _ \| '_ \
| |   | |_| | |___\ V / (_) | |  | | (_) | |_| | (_) | | | |
|_|    \__, |______\_/ \___/|_|  |_|\___/ \__|_|\___/|_| |_|
        __/ |
       |___/

usage: PyEvoMotion [-h] [-dt DELTA_T] [-sh] [-ep] [-l LENGTH_FILTER] [-xj] [-ij IMPORT_JSON] [-k {all,total,substitutions,insertions,deletions,indels}] [-f FILTER [FILTER ...]] [-gp GENOME_POSITIONS] [-dr DATE_RANGE]
                   seqs meta out

PyEvoMotion

positional arguments:
  seqs                  Path to the input fasta file containing the sequences.
  meta                  Path to the corresponding metadata file for the sequences.
  out                   Path to the output filename prefix used to save the different results.

options:
  -h, --help            show this help message and exit
  -dt DELTA_T, --delta_t DELTA_T
                        Time interval to calculate the statistics. Default is 7 days (7D).
  -sh, --show           Show the plots of the analysis.
  -ep, --export_plots   Export the plots of the analysis.
  -l LENGTH_FILTER, --length_filter LENGTH_FILTER
                        Length filter for the sequences (removes sequences with length less than the specified value). Default is 0.
  -n N_THRESHOLD, --n_threshold N_THRESHOLD
                        Minimum number of sequences required in a time interval to compute statistics. Default is 2.
  -xj, --export_json    Export the run arguments to a json file.
  -ij IMPORT_JSON, --import_json IMPORT_JSON
                        Import the run arguments from a JSON file. If this argument is passed, the other arguments are ignored. The JSON file must contain the mandatory keys 'seqs', 'meta', and 'out'.
  -k {all,total,substitutions,insertions,deletions,indels}, --kind {all,total,substitutions,insertions,deletions,indels}
                        Kind of mutations to consider for the analysis. Default is 'all'.
  -f FILTER [FILTER ...], --filter FILTER [FILTER ...]
                        Specify filters to be applied on the data with keys followed by values. If the values are multiple, they must be enclosed in square brackets. Example: --filter key1 value1 key2 [value2 value3]
                        key3 value4. If either the keys or values contain spaces, they must be enclosed in quotes. keys must be present in the metadata file as columns for the filter to be applied. Use '*' as a
                        wildcard, for example Bio* to filter all columns starting with 'Bio'.
  -gp GENOME_POSITIONS, --genome_positions GENOME_POSITIONS
                        Genome positions to restrict the analysis. The positions must be separated by two dots. Example: 1..1000. Open start or end positions are allowed by omitting the first or last position,
                        respectively. If not specified, the whole reference genome is considered.
  -dr DATE_RANGE, --date_range DATE_RANGE
                        Date range to filter the data. The date range must be separated by two dots and the format must be YYYY-MM-DD. Example: 2020-01-01..2020-12-31. If not specified, the whole dataset is
                        considered. Note that if the origin is specified, the most restrictive date range is considered.

Error: the following arguments are required: seqs, meta, out

Tests

This package has been developed using pytest for testing. To run the tests, you may install PyEvoMotion from the sdist archive, decompress it, install it and run the tests:

pip download --no-deps --no-binary :all: PyEvoMotion
tar -xvzf pyevomotion-*.tar.gz
cd pyevomotion-*/
pip install .
PyEvoMotion # To trigger mafft installation. Ensure afterwards that mafft is available in your PATH.
pytest

[!WARNING] The first time the tests are run, they will automatically download the test data from https://sourceforge.net/projects/pyevomotion/files/test_data.zip/download and extract it in the appropriate directory.

Given the size of the test data, this may take a while.

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

pyevomotion-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

pyevomotion-0.1.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyevomotion-0.1.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyevomotion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f57de587b4fe324c30d835b20e483231d6cc9a356e1e6e97dba3356c06180a53
MD5 3979868bad940a3bfa895ddf2c4d012e
BLAKE2b-256 f3fdeb8d35122b60d845daedfcd0d4c668b19dc6e1b8dc23b9b33a48090e3bc7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyevomotion-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyevomotion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a4aaa71589755f5c782d40a0ca8e98679f1614619d247e9d6ae5eed51cc331
MD5 3f0d045771118a24a5bb7dc47b76cc97
BLAKE2b-256 ae8c123a49ce963ed2c09b9dda7e5383d1bb87de535befb1d386a0e7d296af44

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