Skip to content

Commit

Permalink
perf: autobump bio/rasusa (snakemake#2967)
Browse files Browse the repository at this point in the history
Automatic bump of bio/rasusa.

---------

Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: Filipe G. Vieira <[email protected]>
  • Loading branch information
2 people authored and Vito Zanotelli committed Jun 22, 2024
1 parent 920e8a1 commit 5ce552c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions bio/rasusa/environment.linux-64.pin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# platform: linux-64
@EXPLICIT
https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2#d7c89558ba9fa0495403155b64376d81
https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h807b86a_3.conda#7124cbb46b13d395bdde68f2d215c989
https://conda.anaconda.org/conda-forge/linux-64/libgomp-13.2.0-h77fa898_7.conda#abf3fec87c2563697defa759dec3d639
https://conda.anaconda.org/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2#73aaf86a425cc6e73fcf236a5a46396d
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h807b86a_3.conda#23fdf1fef05baeb7eadc2aed5fb0011f
https://conda.anaconda.org/bioconda/linux-64/rasusa-0.8.0-h031d066_0.tar.bz2#0e86b97fdc0c8ea60b8e5b7b5725eb04
https://conda.anaconda.org/conda-forge/linux-64/libgcc-ng-13.2.0-h77fa898_7.conda#72ec1b1b04c4d15d4204ece1ecea5978
https://conda.anaconda.org/bioconda/linux-64/rasusa-2.0.0-h031d066_0.tar.bz2#59ca5054e6ec09ee5e7ec23c8b010a14
2 changes: 1 addition & 1 deletion bio/rasusa/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- rasusa =0.8.0
- rasusa =2.0.0
4 changes: 2 additions & 2 deletions bio/rasusa/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ params:
Alternatively, a FASTA/Q index file can be provided and the genome size will be set
to the sum of all reference sequences. |nl|
If ``bases`` is not provided, this option and ``coverage`` are required
options: >
Any other options as listed in `the docs <https://github.com/mbhall88/rasusa#usage>`_.
extra: >
Additional program arguments.
14 changes: 8 additions & 6 deletions bio/rasusa/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@

from snakemake.shell import shell


options = snakemake.params.get("options", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
extra = snakemake.params.get("extra", "")

bases = snakemake.params.get("bases")
if bases is not None:
options += " -b {}".format(bases)
if bases:
extra += f" --bases {bases}"
else:
covg = snakemake.params.get("coverage")
gsize = snakemake.params.get("genome_size")
if covg is None or gsize is None:
raise ValueError(
"If `bases` is not given, then `coverage` and `genome_size` must be"
)
options += " -g {gsize} -c {covg}".format(gsize=gsize, covg=covg)
extra += f" --genome-size {gsize} --coverage {covg}"

shell("rasusa {options} -i {snakemake.input} -o {snakemake.output} 2> {snakemake.log}")
shell(
"rasusa reads {extra} --output {snakemake.output[0]} --output {snakemake.output[1]} {snakemake.input} {log}"
)

0 comments on commit 5ce552c

Please sign in to comment.