Skip to content

Commit c65717e

Browse files
Merge pull request #29 from matt-sd-watson/rename_to_spora
Rename to spora
2 parents 09877eb + 3139f3a commit c65717e

22 files changed

Lines changed: 160 additions & 110 deletions

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: outbreaker
2+
name: spora
33

44
# Controls when the workflow will run
55
on:
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
build:
15-
name: Outbreaker test on ${{ matrix.os }}
15+
name: spora test on ${{ matrix.os }}
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
@@ -22,20 +22,20 @@ jobs:
2222
- uses: conda-incubator/setup-miniconda@v2
2323
with:
2424
environment-file: environments/environment.yml
25-
activate-environment: ncov_outbreaker
25+
activate-environment: ncov_spora
2626
channels: conda-forge,bioconda,defaults,r
2727
mamba-version: "*"
28-
- name: Install outbreaker
28+
- name: Install spora
2929
run: pip install .
30-
- name: Check outbreaker version
30+
- name: Check spora version
3131
shell: bash -l {0}
32-
run: outbreaker -v
33-
- name: Run outbreaker test via CLI
32+
run: spora -v
33+
- name: Run spora test via CLI
3434
shell: bash -l {0}
35-
run: outbreaker -f data/tests/focal_seqs.fa -b data/tests/background_seqs.fa -r data/reference/ncov_reference.gb -o outbreaker_test -p test --snps-only --report --rename --names-csv data/tests/names.csv
36-
- name: Run outbreaker test via config
35+
run: spora -f data/tests/focal_seqs.fa -b data/tests/background_seqs.fa -r data/reference/ncov_reference.gb -o outbreaker_test -p test --snps-only --report --rename --names-csv data/tests/names.csv
36+
- name: Run spora test via config
3737
shell: bash -l {0}
38-
run: outbreaker -c data/test_config.yaml
39-
- name: Run pytest for outbreaker
38+
run: spora -c data/test_config.yaml
39+
- name: Run pytest for spora
4040
shell: bash -l {0}
4141
run: pytest tests/

.github/workflows/publish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish spora to PyPI on release tag
2+
3+
on:
4+
release:
5+
types:
6+
- "published"
7+
jobs:
8+
pypi_publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v4.0.0
14+
with:
15+
python-version: 3.8
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
pip install pandas>=1.1.5 numpy>=1.19 biopython>=1.79 pytest>=7.1.2 snakemake>=7.0.0 pypandoc>=1.8
21+
- name: build package
22+
run: |
23+
pip install pandoc>=2.2
24+
python setup.py sdist bdist_wheel
25+
- name: publish to PyPI
26+
# only create relases from tagged commits to master:
27+
if: startsWith(github.ref, 'refs/tags')
28+
uses: pypa/gh-action-pypi-publish@v1.5.0
29+
with:
30+
# if no "user:" specified use pypi token instead of username/password
31+
password: ${{ secrets.PUBLISH_PYPI_SPORA }} # use secret from github secrets

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# outbreaker Changelog
1+
# spora Changelog
22

33
## Version 0.1.0, 06-10-21
44
- Initial workflow
@@ -66,3 +66,9 @@
6666
- Above fix changes fixes the error in the SNP distance plot in the HTML report when rename is used but no names CSV is supplied
6767
- Addition of pytests in the CI/CD workflow
6868

69+
## Version 0.7.0, 15-06-22
70+
71+
- outbreaker is renamed to spora to be compatible with PyPi
72+
- version change to dplyr dependency for conda env
73+
- Addition of CD GA workflow to pudblish to PyPi on release
74+

README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# outbreaker
1+
# spora: Streamlined Phylogenomic Outbreak Report Analysis
22

3-
![example workflow](https://github.com/matt-sd-watson/outbreaker/actions/workflows/main.yml/badge.svg)
3+
![example workflow](https://github.com/matt-sd-watson/spora/actions/workflows/main.yml/badge.svg)
44

55
snakemake and Python integrated workflow for intermediate file generation for COVID outbreak analysis
66

77
## Installation
88

99
```
10-
git clone https://github.com/matt-sd-watson/outbreaker.git
11-
conda env create -f ncov_outbreaker/environments/environment.yml
12-
conda activate ncov_outbreaker
13-
cd outbreaker
10+
git clone https://github.com/matt-sd-watson/spora.git
11+
conda env create -f ncov_spora/environments/environment.yml
12+
conda activate ncov_spora
13+
cd spora
1414
pip install .
1515
```
1616

1717
## Updating
1818

1919
```
20-
conda activate ncov_outbreaker
21-
cd ~/outbreaker
20+
conda activate ncov_spora
21+
cd ~/spora
2222
git checkout main
2323
git pull
2424
pip install .
@@ -27,11 +27,11 @@ pip install .
2727
## Usage
2828
```
2929
usage:
30-
outbreaker -c <config.yaml>
30+
spora -c <config.yaml>
3131
OR
32-
outbreaker --focal_list ...<input args>
32+
spora --focal_list ...<input args>
3333
34-
Outbreaker: Python and snakemake outbreak workflow for COVID-19
34+
spora: Streamlined Phylogenomic Outbreak Report Analysis
3535
3636
optional arguments:
3737
-h, --help Show the help output and exit.
@@ -42,16 +42,15 @@ optional arguments:
4242
-b BACKGROUND_SEQS, --background-sequences BACKGROUND_SEQS
4343
Optional input .txt list or multi-FASTA background samples to add to analysis
4444
-m MASTER_FASTA, --master-fasta MASTER_FASTA
45-
Master FASTA of genomic sequences to select from. Required if either --focal-sequences or --background-sequences are not supplied in
46-
FASTA format
45+
Master FASTA of genomic sequences to select from. Required if either --focal-sequences or --background-sequences are not supplied in FASTA format
4746
-o OUTDIR, --output-directory OUTDIR
48-
Path to the desired output directory. If none is provided, a new folder named outbreaker will be created in the current directory
47+
Path to the desired output directory. If none is provided, a new folder named spora will be created in the current directory
4948
-r REFERENCE, --reference REFERENCE
5049
.gb file containing the desired COVID-19 reference sequence. Required
5150
-p PREFIX, --prefix PREFIX
5251
Prefix string to label all output files. Default: outbreak
5352
-t NTHREADS, --nthreads NTHREADS
54-
Number of threads to use for processing. Default: 4
53+
Number of threads to use for processing. Default: 2
5554
-s, --snps-only Generate a snps-only FASTA from the input FASTA. Default: False
5655
-rn, --rename Rename the FASTA headers to be compatible with NML standards. Default: False
5756
-nc NAMES_CSV, --names-csv NAMES_CSV
@@ -63,16 +62,16 @@ optional arguments:
6362
Integer for the minimum genome completeness percentage for filtering. Default: 90
6463
-gl GENOME_LENGTH, --genome-length GENOME_LENGTH
6564
Integer for the minimum genome length for filtering. Default: 29500
66-
-rp, --report Generate a summary output report for the outbreaker run. Default: Not enabled
67-
-v, --version Show the current outbreaker version then exit.
65+
-rp, --report Generate a summary output report for the spora run. Default: Not enabled
66+
-v, --version Show the current spora version then exit.
6867
```
6968

7069
## Documentation
7170

72-
More detailed documentation for outbreaker usage and functionality can be found [here](docs/0-OVERVIEW.md)
71+
More detailed documentation for spora usage and functionality can be found [here](docs/0-OVERVIEW.md)
7372

7473
## Acknowledgments
7574

76-
Inspiration for code structure and design for outbreaker was inspired by [pangolin](https://github.com/cov-lineages/pangolin) and [civet](https://github.com/artic-network/civet), and minor code blocks were adopted from these software.
75+
Inspiration for code structure and design for spora was inspired by [pangolin](https://github.com/cov-lineages/pangolin) and [civet](https://github.com/artic-network/civet), and minor code blocks were adopted from these software.
7776

7877
The **Background** section in the documentation describing outbreak definitions was written by Mark Horsman.

data/test_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ background_seqs: tests/background_seqs.fa
44

55
reference: reference/ncov_reference.gb
66

7-
outdir: outbreaker_test_config
7+
outdir: spora_test_config
88

99
snps_only: True
1010

docs/0-OVERVIEW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# outbreaker
1+
# spora
22

33
## Overview
4-
outbreaker is a workflow written in snakemake and Python that aims to facilitate rapid generation of intermediate input files that are required for outbreak analysis for COVID-19 at PHO. The workflow is designed to be flexible with command line inputs, providing users with options that can be toggled depending on the nature of the outbreak request and the input files required for downstream outbreak analysis tools.
5-
At its core, outbreaker is designed to accept only a small number of mandatory inputs from the user, and will use a standard set of bioinformatics tools to produce a number of output files such as alignments, trees, SNP matrices, etc., that are often the required inputs for downstream outbreak tools such as [ggtree](https://github.com/YuLab-SMU/ggtree) and/or [civet/civet3](https://github.com/snake-flu/civet3).
4+
spora is a workflow written in snakemake and Python that aims to facilitate rapid generation of intermediate input files that are required for outbreak analysis for COVID-19 at PHO. The workflow is designed to be flexible with command line inputs, providing users with options that can be toggled depending on the nature of the outbreak request and the input files required for downstream outbreak analysis tools.
5+
At its core, spora is designed to accept only a small number of mandatory inputs from the user, and will use a standard set of bioinformatics tools to produce a number of output files such as alignments, trees, SNP matrices, etc., that are often the required inputs for downstream outbreak tools such as [ggtree](https://github.com/YuLab-SMU/ggtree) and/or [civet/civet3](https://github.com/snake-flu/civet3).
66

77

88
## Background
@@ -13,7 +13,7 @@ At the same time, WGS data from COVID-19 cases known to not be involved in the s
1313
## Workflow
1414

1515
<p align="center">
16-
<img src="images/outbreaker_workflow.png">
16+
<img src="images/spora_workflow.png">
1717
</p>
1818

1919

docs/1-INSTALLATION.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,34 @@ The following tools/packages are required: \
88

99
## Basic installation from source
1010

11-
The basic installation instructions for outbreaker are as follows:
11+
The basic installation instructions for spora are as follows:
1212

1313
```
14-
git clone https://github.com/matt-sd-watson/outbreaker.git
15-
conda env create -f outbreaker/environments/environment.yml
16-
conda activate ncov_outbreaker
17-
cd outbreaker
14+
git clone https://github.com/matt-sd-watson/spora.git
15+
conda env create -f spora/environments/environment.yml
16+
conda activate ncov_spora
17+
cd spora
1818
pip install .
1919
```
2020

2121
## Usage
2222

2323
Test that the installation was successful using the following commands:
2424
```
25-
outbreaker
25+
spora
2626
#OR
27-
outbreaker --help
27+
spora --help
2828
```
2929

3030
which should result in the following output:
3131

3232
```
3333
usage:
34-
outbreaker -c <config.yaml>
34+
spora -c <config.yaml>
3535
OR
36-
outbreaker --focal_list ...<input args>
36+
spora --focal_list ...<input args>
3737
38-
Outbreaker: Python and snakemake outbreak workflow for COVID-19
38+
spora: Python and snakemake outbreak workflow for COVID-19
3939
4040
optional arguments:
4141
-h, --help Show the help output and exit.
@@ -49,7 +49,7 @@ optional arguments:
4949
Master FASTA of genomic sequences to select from. Required if either --focal-sequences or --background-sequences are not supplied in
5050
FASTA format
5151
-o OUTDIR, --output-directory OUTDIR
52-
Path to the desired output directory. If none is provided, a new folder named outbreaker will be created in the current directory
52+
Path to the desired output directory. If none is provided, a new folder named spora will be created in the current directory
5353
-r REFERENCE, --reference REFERENCE
5454
.gb file containing the desired COVID-19 reference sequence. Required
5555
-p PREFIX, --prefix PREFIX
@@ -67,8 +67,8 @@ optional arguments:
6767
Integer for the minimum genome completeness percentage for filtering. Default: 90
6868
-gl GENOME_LENGTH, --genome-length GENOME_LENGTH
6969
Integer for the minimum genome length for filtering. Default: 29500
70-
-rp, --report Generate a summary output report for the outbreaker run. Default: Not enabled
71-
-v, --version Show the current outbreaker version then exit.
70+
-rp, --report Generate a summary output report for the spora run. Default: Not enabled
71+
-v, --version Show the current spora version then exit.
7272
7373
```
7474

0 commit comments

Comments
 (0)