Skip to content

Commit

Permalink
fix: update rasusa usage for latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhall88 committed Jun 12, 2024
1 parent bda8a36 commit 063a756
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand Down
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tbpore/tbpore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 4 additions & 3 deletions tests/test_tbpore_process.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Integration tests"""

import gzip
import subprocess
import sys
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 063a756

Please sign in to comment.