Skip to content

Commit f514de8

Browse files
authored
Merge pull request #273 from KwanLab/release-2.1.0
Release 2.1.0
2 parents a80cb22 + 6045c44 commit f514de8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+658
-103
lines changed

.github/workflows/pytest_codecov.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,42 @@ jobs:
3333
name: pytest & codecov
3434
steps:
3535
- uses: actions/checkout@v2
36-
- name: Setup conda
37-
uses: s-weigand/setup-conda@v1
36+
- name: Cache conda
37+
uses: actions/cache@v2
38+
with:
39+
path: ~/conda_pkgs_dir
40+
key: ${{ runner.os }}-conda-py${{ matrix.python-version }}-${{ hashFiles('tests/environment.yml') }}
41+
- name: Cache test data
42+
uses: actions/cache@v2
43+
with:
44+
path: tests/data/test_data.json
45+
key: ${{ runner.os }}-test-data
46+
- name: Setup mamba
47+
uses: conda-incubator/setup-miniconda@v2
3848
with:
39-
update-conda: true
4049
python-version: ${{ matrix.python-version }}
41-
conda-channels: anaconda, conda-forge, bioconda
42-
- run: conda --version
43-
- run: |
44-
conda env update -n $CONDA_DEFAULT_ENV --file=tests/environment.yml
50+
mamba-version: "*"
51+
channels: conda-forge,bioconda,defaults
52+
channel-priority: true
53+
activate-environment: autometa
54+
environment-file: tests/environment.yml
55+
- name: Conda config info
56+
shell: bash -l {0}
57+
run: |
58+
conda info
4559
conda list
46-
gdown https://drive.google.com/uc\?\id=1bSlPldaq3C6Cf9Y5Rm7iwtUDcjxAaeEk -O tests/data/test_data.json
47-
python -m pytest --cov-report=xml --cov=autometa tests/
60+
conda config --show-sources
61+
conda config --show
62+
printenv | sort
63+
- name: Download test data
64+
shell: bash -l {0}
65+
run: gdown https://drive.google.com/uc\?\id=1bSlPldaq3C6Cf9Y5Rm7iwtUDcjxAaeEk -O tests/data/test_data.json
66+
- name: Install Autometa
67+
shell: bash -l {0}
68+
run: python -m pip install . --ignore-installed --no-deps -vv
69+
- name: Run pytest
70+
shell: bash -l {0}
71+
run: python -m pytest --cov-report=xml --cov=autometa tests/
4872
- name: Upload coverage to Codecov
4973
uses: codecov/codecov-action@v2
5074
with:

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 21.7b0
3+
rev: 22.3.0 # This should correspond to the black version listed in tests/environment.yml
44
hooks:
55
- id: black
66
- repo: https://github.com/pre-commit/pre-commit-hooks

CHANGELOG.md

Lines changed: 176 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,187 @@
1-
# nf-core/autometa: Changelog
1+
# Autometa: Changelog
22

33
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
55

6-
## v2.0.0 - [date]
7-
8-
Second release of nf-core/autometa, created with the [nf-core](https://nf-co.re/) template.
6+
## [2.1.0] - 2022-05-11
97

108
### `Added`
119

10+
- Addition of `autometa` entrypoint to retrieve info on citation, version and other commands
11+
- :green_apple: Addition of autometa version written within each autometa-related nextflow process
12+
- :shell: The autometa version is emitted at the beginning of the autometa bash workflow.
13+
1214
### `Fixed`
1315

16+
- :shell::bug: Renamed incorrect variables `$coverage` to `$coverages` and `$clustering_method` to `$cluster_method` in `workflows/autometa.sh`
17+
- :snake::bug: Fix use of `kwargs` in kmers `embed(..., *kwargs)` function
18+
- :snake: Fix passing `n_jobs` to kmers `embed(..., n_jobs=1)` function
19+
1420
### `Dependencies`
1521

16-
### `Deprecated`
22+
- :art: Pinned black version to 22.3.0
23+
- ⬆️:green_heart: upgrade diamond to version 2.0.14
24+
25+
## [2.0.3] - 2022-04-07
26+
27+
### What's Changed
28+
29+
- :memo: Add CITATION file by @shaneroesemann in <https://github.com/KwanLab/Autometa/pull/242>
30+
- :bug::art::green_apple: Allow utf-8-sig sample sheets #250
31+
- :bug::memo::green_apple: Replace incorrect runtime defaults specified in nf-core launch command #252
32+
- :art::green_apple: Continue nextflow workflow (without termination) if bins are not recovered from a particular dataset #253
33+
- :art::bug: `autometa-benchmark` entrypoint, when checking taxid classifications, now converts any taxids of `0` to `1` #254
34+
- :bug: NCBI connection is checked prior to NCBI database files download rather than pinging google DNS #258
35+
- :bug: Fix `autometa-length-filter` bug where specifying a directory when writing to `--output-fasta` was required (now optional) #256
36+
- 💚 ⬆️:whale::green_apple: Bump version to 2.0.3 in `VERSION` and `manifest.version` in `nextflow.config` s.t. autometa docker images used in nextflow workflow correspond to most recent release
37+
38+
### New Contributors
39+
40+
- @shaneroesemann made their first contribution in <https://github.com/KwanLab/Autometa/pull/242>
41+
42+
**Full Changelog**: <https://github.com/KwanLab/Autometa/compare/2.0.2...2.0.3>
43+
44+
## [2.0.2] - 2022-03-15
45+
46+
### What's Changed
47+
48+
- :bug: Fix the NoneType error during initating the LCA object (#246) by @chtsai0105 in <https://github.com/KwanLab/Autometa/pull/247>
49+
50+
### New Contributors
51+
52+
- @chtsai0105 made their first contribution in <https://github.com/KwanLab/Autometa/pull/247>
53+
54+
**Full Changelog**: <https://github.com/KwanLab/Autometa/compare/2.0.1...2.0.2>
55+
56+
## [2.0.1] - 2022-02-24
57+
58+
### What's Changed
59+
60+
- Environment and directory structure updates by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/8>
61+
62+
- resolved #10 Contributors added and copyright year updated to 2020. by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/15>
63+
- Resolving issues #16, #17, #18, #21 and update to Autometa API and Logger by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/25>
64+
- Resolved #19 added docstring, fixed nproc and removed depth function by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/29>
65+
- Documentation by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/34>
66+
- Issue #5 Working conda recipe by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/38>
67+
- 🐛found in coverage by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/49>
68+
- fixes #2 by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/47>
69+
- Contributing Guidelines by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/50>
70+
- Add Markers class documentation. by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/62>
71+
- Add **main**.py documentation (fixes #60) by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/63>
72+
- Add functionality to bin without taxonomy. Update docstrings by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/65>
73+
- Documentation by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/45>
74+
- Remove merge conflict resolution lines (Fixes #68) by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/69>
75+
- :art::bug: Add mock import of modules and link to contribution guidelines (fixes #22) by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/70>
76+
- Resolves #55 Environ by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/76>
77+
- fixes-#54 Metagenome by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/66>
78+
- Update MAG class to MetaBin by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/67>
79+
- hmmer by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/72>
80+
- LCA by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/78>
81+
- Fix writing by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/82>
82+
- Update majority_vote by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/81>
83+
- pre-commit hooks by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/92>
84+
- verbose bug by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/90>
85+
- Recursive DBSCAN by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/84>
86+
- databases and utilities by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/77>
87+
- Rank-specific binning by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/96>
88+
- diamond.py by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/87>
89+
- Add support request issue template. by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/97>
90+
- ncbi.py by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/83>
91+
- Samtools by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/103>
92+
- Binning stats/taxonomy summary by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/99>
93+
- decision tree classifier by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/100>
94+
- Fix config and setup of user project by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/104>
95+
- Update project docstrings by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/108>
96+
- CI/CD by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/101>
97+
- :bug: Change > to >= when calculating N50 by @chasemc in <https://github.com/KwanLab/Autometa/pull/119>
98+
- Fix Dockerfile by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/123>
99+
- Add support for gzipped assemblies by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/129>
100+
- Update bug report template by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/130>
101+
- Remove --multiprocess from autometa-kmers entrypoint by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/127>
102+
- Add GC content std.dev. limit and coverage std. dev. limit Binning metrics by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/120>
103+
- Nextflow implementation template by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/118>
104+
- Update documentation by @Sidduppal in <https://github.com/KwanLab/Autometa/pull/121>
105+
- Add feature to download google drive datasets by @ajlail98 in <https://github.com/KwanLab/Autometa/pull/138>
106+
- Add densmap embed method and fix binning-summary cluster column bug by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/176>
107+
- Classification and Clustering Benchmarking by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/141>
108+
- Nfcore and structuring modules for collaboration by @chasemc in <https://github.com/KwanLab/Autometa/pull/157>
109+
- Delete .gitattribute - there is a .gitattributes by @chasemc in <https://github.com/KwanLab/Autometa/pull/190>
110+
- :fire::green_apple: Remove duplicate standard slurm profiles by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/195>
111+
- Fix import error in databases.py by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/194>
112+
- Fix/Create mock data subworkflow by @chasemc in <https://github.com/KwanLab/Autometa/pull/206>
113+
- 🐳:bug: Docker fix :whale: by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/213>
114+
- :memo: Update Documentation by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/212>
115+
- :art: Add typehints and update kmers docstring by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/208>
116+
- :art::snake: Add specific parsers for domtblout and tblout for hmmscan output formats by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/201>
117+
- :snake::art::bug: Update metagenome.length_filter(...) by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/210>
118+
- Fix bedtools genomecov deprecation (coverage calculation) by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/209>
119+
- :art:🐚 Add bash-implementations of Autometa workflows by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/202>
120+
- Nextflow documentation by @chasemc in <https://github.com/KwanLab/Autometa/pull/184>
121+
- :fire::memo: Reformat benchmarking docs by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/215>
122+
- Refactor autometa-taxonomy-lca by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/211>
123+
- :art::whale: Replace jason-c-kwan with jasonkwan for docker images by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/217>
124+
- Update mock_data_reporter.Dockerfile by @chasemc in <https://github.com/KwanLab/Autometa/pull/220>
125+
- :whale::green_heart::memo: Add docker CI and update links by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/216>
126+
- Simplify Licensing by @chasemc in <https://github.com/KwanLab/Autometa/pull/222>
127+
- Add check for nr.dmnd and nr.gz by @chasemc in <https://github.com/KwanLab/Autometa/pull/221>
128+
- 🍏 Change Nextflow I/O behavior by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/218>
129+
- :green_apple::art: add/update coverage handling by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/223>
130+
- :snake:🐎 Large data mode by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/207>
131+
- Merge main into dev by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/224>
132+
- pytest & codecov CI by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/227>
133+
- Refactor samplesheet by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/228>
134+
- 🐛 🎨 🍏 Fix kingdom-handling and mounting NCBI databases into docker container by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/229>
135+
- Add error handling strategies for nextflow processes by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/231>
136+
- Release 2.0.0 by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/233>
137+
- :memo::art::arrow_up::fire: update build files and respective docs by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/234>
138+
- Add badges and links to README.md by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/235>
139+
- GH action: Add dynamic docker tags by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/236>
140+
- Update nextflow-workflow.rst by @samche42 in <https://github.com/KwanLab/Autometa/pull/238>
141+
- :bug::fire: Fix bedtools coverage calculation bug by @WiscEvan in <https://github.com/KwanLab/Autometa/pull/243>
142+
143+
### New Contributors
144+
145+
- @chasemc made their first contribution in <https://github.com/KwanLab/Autometa/pull/119>
146+
147+
- @samche42 made their first contribution in <https://github.com/KwanLab/Autometa/pull/238>
148+
149+
**Full Changelog**: <https://github.com/KwanLab/Autometa/compare/1.0.3...2.0.1>
150+
151+
## [2.0.0] - 2022-02-09
152+
153+
Second release of Autometa
154+
155+
### `Added`
156+
157+
- 🍏 Created autometa nextflow workflow with the [nf-core](https://nf-co.re/) template.
158+
- :shell: Created autometa bash workflow
159+
- Refactored entire codebase for easy installation using pip and/or bioconda
160+
- Addition of various k-mer embedding parameters:
161+
- k-mer size
162+
- normalization method
163+
- PCA dimensions
164+
- embedding method
165+
- Addition of HDBSCAN clustering method
166+
- Addition of autometa entrypoints
167+
- Easy install with `make` commands in `Makefile`
168+
- Easy installation using `pip`
169+
- Easy installation using `conda install -c bioconda autometa`
170+
- Autometa library of functions available within the python environment
171+
- Granularity between autometa tasks to reduce re-computations on failed tasks
172+
- Configuration to specify paths to required databases
173+
- Added tests for CI/CD
174+
- :whale: Update Dockerfile to conform to new autometa environment & commands
175+
- :memo: Addition of documentation hosted on [autometa.readthedocs.io](https://autometa.readthedocs.io "Autometa documentation")
176+
- Dependencies specified in `autometa-env.yml`
177+
- Dependencies specified in `requirements.txt`
178+
179+
### `Fixed`
180+
181+
- :art::snake: Restructured source code directory to allow installation of autometa console scripts
182+
- :art::snake: Restructured source code scripts to prevent calling code on import
183+
184+
### `Removed`
185+
186+
- python 2.7
187+
- *All* autometa version `1.*` commands

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ RUN echo "Testing autometa import" \
4646

4747
# Check entrypoints are available
4848
RUN echo "Checking autometa entrypoints" \
49+
&& autometa --version > /dev/null \
4950
&& autometa-config -h > /dev/null \
5051
&& autometa-update-databases -h > /dev/null \
5152
&& autometa-length-filter -h > /dev/null \

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ include LICENSE
22
include MANIFEST.in
33
include README.md
44
include setup.py
5+
recursive-include autometa *
6+
prune autometa/__pycache__

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ clean:
3131

3232
## Apply black formatting
3333
black:
34-
black --exclude autometa/validation autometa
34+
black --exclude autometa/validation autometa bin tests autometa/validation/benchmark.py autometa/validation/datasets.py
3535

3636
## Set up python interpreter environment
3737
create_environment: autometa-env.yml
@@ -60,8 +60,8 @@ install: setup.py
6060
python3 -m pip install . --ignore-installed --no-deps -vv
6161

6262
## Install dependencies for test environment
63-
test_environment: tests/requirements.txt
64-
python3 -m pip install --requirement=tests/requirements.txt
63+
test_environment: tests/environment.yml
64+
conda env update -n $(PROJECT_NAME) --file=$<
6565

6666
## Build docker image from Dockerfile (auto-taggged as jasonkwan/autometa:<current-branch>)
6767
image: Dockerfile

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.0.3
1+
2.1.0

autometa/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python
2+
3+
import pkg_resources
4+
5+
dist = pkg_resources.get_distribution("autometa")
6+
7+
__version__ = dist.version
8+
console_scripts = dist.get_entry_map()["console_scripts"].keys()

autometa/__main__.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import sys
2+
from autometa import __version__, console_scripts
3+
4+
import argparse
5+
6+
citation = """
7+
APA:
8+
9+
Miller, I. J., Rees, E. R., Ross, J., Miller, I., Baxa, J., Lopera, J., Kerby, R. L.,
10+
Rey, F. E., & Kwan, J. C. (2019). Autometa: automated extraction of microbial genomes
11+
from individual shotgun metagenomes. Nucleic Acids Research, 47(10).
12+
https://doi.org/10.1093/nar/gkz148
13+
14+
BibTeX:
15+
16+
@article{
17+
Miller_Autometa_automated_extraction_2019,
18+
author = {Miller, Ian J. and Rees, Evan R. and Ross, Jennifer and Miller, Izaak and Baxa, Jared and Lopera, Juan and Kerby, Robert L. and Rey, Federico E. and Kwan, Jason C.},
19+
doi = {10.1093/nar/gkz148},
20+
journal = {Nucleic Acids Research},
21+
number = {10},
22+
title = {{Autometa: automated extraction of microbial genomes from individual shotgun metagenomes}},
23+
url = {https://github.com/KwanLab/Autometa},
24+
volume = {47},
25+
year = {2019}
26+
}
27+
"""
28+
29+
30+
def main():
31+
parser = argparse.ArgumentParser(
32+
description="Describe Autometa citation & version."
33+
"No arguments will list the available autometa commands, docs and code information"
34+
)
35+
parser.add_argument(
36+
"-V", "--version", help="Print autometa version", action="store_true"
37+
)
38+
parser.add_argument(
39+
"-C",
40+
"--citation",
41+
help="Print autometa citation (APA and BibTex)",
42+
action="store_true",
43+
)
44+
args = parser.parse_args()
45+
46+
if args.version:
47+
print(f"autometa: {__version__}")
48+
sys.exit(0)
49+
50+
if args.citation:
51+
print(citation)
52+
sys.exit(0)
53+
54+
print("Autometa Commands")
55+
commands_header = "\t├──> "
56+
commands_body = "\n\t├──> ".join(list(console_scripts)[:-1])
57+
commands_footer = f"└──> {list(console_scripts)[-1]}"
58+
59+
print(f"{commands_header}{commands_body}\n\t{commands_footer}")
60+
print(
61+
"\nRun 'autometa --version' or 'autometa --citation' for respective info"
62+
"\nDocs: https://autometa.readthedocs.io"
63+
"\nCode: https://github.com/KwanLab/Autometa"
64+
)
65+
66+
67+
if __name__ == "__main__":
68+
main()

0 commit comments

Comments
 (0)