Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mccoy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def create_project(project_name, reference: Path, xml_template: Path, copy_workf
shutil.copyfile(mccoy_dir / "tests.py", project_dir / "tests.py")
(project_dir / 'runs').mkdir()

shutil.copyfile(mccoy_dir / "readme_template.md", project_dir / "README.md")


def get_last_run_id(project_path):
runs = [int(run.split("_")[-1]) for run in glob(f"{project_path}/runs/*") if Path(run).is_dir()]
Expand Down
44 changes: 44 additions & 0 deletions mccoy/readme_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
```
__ __ _____
| \/ | / ____|
| \ / | ___| | ___ _ _
| |\/| |/ __| | / _ \| | | |
| | | | (__| |___| (_) | |_| |
|_| |_|\___|\_____\___/ \__, |
__/ |
|___/
```

This project was created with the [McCoy](https://github.com/mccoy-devs/mccoy) CLI.


# Project layout

Here you will find the following files and directories:

1. `config.yaml`: The configuration file for this project. You can use
this to change the command line arguments and options for your runs. See the
docs for more information.

2. `tests.py`: [Phytest](https://github.com/phytest-devs/phytest) quality
control checks that will be run as part of the pipeline. This will also
need to be adapted to suit your particular usecase and needs.

3. `resources`: This directory contains the reference sequence and BEAST2
template which was provided during project creation.

4. `runs`: This is where each run of McCoy will be stored (see below).


# Running McCoy

To run McCoy from within this directory:

```
mccoy run . --data <PATH TO YOUR FASTA FILE>
```

To see a list of other options which can be passed to McCoy, run
`mccoy run --help`. Any unrecognised arguments will be forwarded on to
Snakemake. A full list of possible snakemake arguments can be found
by running `mccoy run --help-snakemake`.
5 changes: 0 additions & 5 deletions mccoy/resources_registry.txt

This file was deleted.

5 changes: 3 additions & 2 deletions mccoy/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ SCRIPT_DIR = SNAKE_DIR / "scripts"
# overwrite config with project specific file
configfile: Path(config['project_path']) / "config.yaml"


# use the config file to update our default resources
if extra := config["all"].get("update_default_resources", None):
for k, v in extra.items():
workflow.default_resources.set_resource(k, v)
for k, v in extra.items():
workflow.default_resources.set_resource(k, v)

# Ensure log directory exists. Required for cluster job submission.
# TODO(SM): Not sure if this is needed now with the slurm profile...
Expand Down