diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b040f48..6966c2b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest name: check conventional commit compliance steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 # pick the pr HEAD instead of the merge commitonly if it's a PR, otherwise use the default @@ -27,7 +27,7 @@ jobs: python-version: [ 3.8 ] os: [ ubuntu-latest, macos-latest ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v2 with: python-version: ${{ matrix.python-version }} @@ -52,7 +52,7 @@ jobs: shell: bash -l {0} run: just test-ci - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v4 with: file: ./coverage.xml flags: unittests diff --git a/README.md b/README.md index 47b0a9c..beb865b 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,28 @@ # Table of Contents -- [Synopsis](#synopsis) -- [Citation](#citation) -- [Installation](#installation) -- [Configuring the decontamination database index](#configuring-the-decontamination-database-index) -- [Performance](#performance) -- [Usage](#usage) - -# Synopsis +- [TBpore](#tbpore) +- [Table of Contents](#table-of-contents) + - [Synopsis](#synopsis) + - [Citation](#citation) + - [Installation](#installation) + - [conda](#conda) + - [pip](#pip) + - [Dependencies](#dependencies) + - [Container](#container) + - [`singularity`](#singularity) + - [`docker`](#docker) + - [Configuring the decontamination database index](#configuring-the-decontamination-database-index) + - [Performance](#performance) + - [`tbpore process`](#tbpore-process) + - [`tbpore cluster`](#tbpore-cluster) + - [Usage](#usage) + - [General usage](#general-usage) + - [process](#process) + - [cluster](#cluster) + - [download](#download) + +## Synopsis `tbpore` is a tool with two main goals. First is to process Nanopore Mycobacterium tuberculosis sequencing data to describe @@ -75,7 +89,7 @@ installed through PyPI. #### Dependencies -* [`rasusa`](https://github.com/mbhall88/rasusa) +* [`rasusa`](https://github.com/mbhall88/rasusa) version 2.x * [`psdm`](https://github.com/mbhall88/psdm) version 0.1.x * [`samtools`](https://github.com/samtools/samtools) version 1.13 * [`bcftools`](https://github.com/samtools/bcftools) version 1.13 diff --git a/environment.yaml b/environment.yaml index b6b654e..e8ab3b8 100644 --- a/environment.yaml +++ b/environment.yaml @@ -9,7 +9,7 @@ dependencies: - ripgrep - poetry=1.3 - mykrobe=0.12 - - rasusa + - "rasusa>=2.0,<3.0" - nanoq=0.9 - samtools=1.13 - bcftools=1.13 diff --git a/tbpore/tbpore.py b/tbpore/tbpore.py index 4536424..a6239de 100644 --- a/tbpore/tbpore.py +++ b/tbpore/tbpore.py @@ -356,9 +356,9 @@ def process( subsampled_reads = f"{tmp}/{name}.subsampled.fastq.gz" rasusa = ExternalTool( tool="rasusa", - input=f"-i {sorted_fastq}", + input=f"{sorted_fastq}", output=f"-o {subsampled_reads}", - params=f'-c {coverage} {config["rasusa"]["params"]}', + params=f'reads -c {coverage} {config["rasusa"]["params"]}', logdir=logdir, ) else: diff --git a/tests/test_tbpore_process.py b/tests/test_tbpore_process.py index 1eec3ef..3a9af31 100644 --- a/tests/test_tbpore_process.py +++ b/tests/test_tbpore_process.py @@ -1,4 +1,5 @@ """Integration tests""" + import gzip import subprocess import sys @@ -94,7 +95,7 @@ def test_whole_execution___minimum_params___check_all_external_tools_are_called_ rasusa_cl = self.get_command_line_from_mock(run_core_mock, 6) assert ( rasusa_cl - == f"rasusa -c 150 -g 4411532 -s 88 -o {td}/{TMP_NAME}/in.subsampled.fastq.gz -i {td}/{TMP_NAME}/in.sorted.fastq.gz" + == f"rasusa reads -c 150 -g 4411532 -s 88 -o {td}/{TMP_NAME}/in.subsampled.fastq.gz {td}/{TMP_NAME}/in.sorted.fastq.gz" ) nanoq_cl = self.get_command_line_from_mock(run_core_mock, 7) @@ -480,8 +481,8 @@ def test_whole_execution___several_params_affecting_tools_command_lines___check_ rasusa_cl = self.get_command_line_from_mock(run_core_mock, 6) assert ( rasusa_cl - == f"rasusa -c 150 -g 4411532 -s 88 -o {td}/custom_tmp/custom_name.subsampled.fastq.gz " - f"-i {td}/custom_tmp/custom_name.sorted.fastq.gz" + == f"rasusa reads -c 150 -g 4411532 -s 88 -o {td}/custom_tmp/custom_name.subsampled.fastq.gz " + f"{td}/custom_tmp/custom_name.sorted.fastq.gz" ) nanoq_cl = self.get_command_line_from_mock(run_core_mock, 7)