Skip to content

mccoy-devs/mccoy

Repository files navigation

McCoy


a complete workflow for close-to-real-time bayesian phylodynamic analyses

pypo tests docs pre-commit.ci status

Quickstart

For a complete quickstart guide, check out the docs.

Prerequisites

Ensure you have mamba installed (conda will work too, but mamba is strongly preferred). McCoy wraps Snakemake and installs all required third-party tools (e.g. Beast2, IQ-TREE, etc.) into isolated environments using one of these tools. For more information see the installation page of the docs.

Install McCoy

pip install mccoy

Create a McCoy project

First begin by creating a new McCoy project (called test_project in this example):

mccoy create test_project --reference reference.fasta --template template.xml

The reference and template options are required. For testing purposes you can use the reference.fasta and template.xml files provided as part of our test suite here.

Configure the project

Configure the project by editing the newly created file test_project/config.yaml. See the docs for more information.

Run the project

To run the newly created project:

mccoy run test --data data.fasta

This command will create a new directory in test/runs with the workflow results and output. Again, the data option here is required and for testing purposes, the data.fasta file from our test suite can be used.

Step 4 - Add new data

Subsequent calls to mccoy run will result in a whole new run of the pipeline from start-to-finsh unless the --inherit or --inherit-last flags are used. See mccoy run --help and the docs for more information. Inheriting from a previous run will use its data and MCMC state as a starting point for the new run.

mccoy run test --data data2.fasta --inherit-last

As well as directly altering a project's config.yaml, config variables can be overridden on the command line. e.g.:

mccoy run --data resources/omicron_test-original.fasta --config align='{mafft: ["--6merpair", "--addfragments"]}'

Any options passed to mccoy run that are not listed in mccoy run --help will be directly forwarded on to Snakemake. See mccoy run --help-snakemake for a list of all available options.

Finally, a local copy of the workflow can be created by passing --copy-workflow to mccoy create when initialising a new project. This local copy will be automatically used by any subsequent calls to mccoy run, allowing the workflow to be fully altered and customised as required.

Next steps

The full documentation can be found here.