Skip to content

Commit

Permalink
perf: autobump bio/muscle (#612)
Browse files Browse the repository at this point in the history
Automatic update of bio/muscle.

---------

Co-authored-by: snakedeploy-bot[bot] <115615832+snakedeploy-bot[bot]@users.noreply.github.com>
Co-authored-by: Filipe G. Vieira <1151762+fgvieira@users.noreply.github.com>
  • Loading branch information
snakedeploy-bot[bot] and fgvieira committed Mar 21, 2023
1 parent b7d7ed4 commit 659d106
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bio/muscle/environment.yaml
Expand Up @@ -3,4 +3,4 @@ channels:
- bioconda
- nodefaults
dependencies:
- muscle ==3.8.1551
- muscle =5.1
8 changes: 5 additions & 3 deletions bio/muscle/meta.yaml
@@ -1,10 +1,12 @@
name: muscle
description: build multiple sequence alignments using MUSCLE. Documentation found at https://www.drive5.com/muscle/manual/index.html
description: build multiple sequence alignments using MUSCLE.
url: https://drive5.com/muscle5/manual/
authors:
- Nikos Tsardakas Renhuldt
input:
- FASTA file
output:
- Alignment file, with FASTA as default file format
notes: |
* MUSCLE is a single-core program. It cannot utilize more than 1 thread.
params:
- super5: specifies whether to use the Super5 algorithm to align sequences

15 changes: 9 additions & 6 deletions bio/muscle/test/Snakefile
Expand Up @@ -2,23 +2,26 @@ rule muscle_fasta:
input:
fasta="{sample}.fa", # Input fasta file
output:
alignment="{sample}.afa", # Output alignment file
alignment="{sample}.fas", # Output alignment file
log:
"logs/muscle/{sample}.log",
params:
extra="", # Additional arguments
extra="-refineiters 50", # Additional arguments
threads: 2
wrapper:
"master/bio/muscle"


rule muscle_clw:
rule muscle_super5:
input:
fasta="{sample}.fa",
output:
alignment="{sample}.clw",
alignment="{sample}.super5.fas",
log:
"logs/muscle/{sample}.log",
"logs/muscle/{sample}.super5.log",
params:
extra="-clw",
super5 = True,
extra="-refineiters 50",
threads: 2
wrapper:
"master/bio/muscle"
15 changes: 10 additions & 5 deletions bio/muscle/wrapper.py
Expand Up @@ -9,10 +9,15 @@
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
extra = snakemake.params.get("extra", "")

mode = "-align"
if snakemake.params.get("super5"):
mode = "-super5"

shell(
"muscle "
"{extra} "
"-in {snakemake.input.fasta} "
"-out {snakemake.output.alignment} "
"{log}"
"muscle"
" -threads {snakemake.threads}"
" {mode} {snakemake.input.fasta}"
" {extra}"
" -output {snakemake.output.alignment}"
" {log}"
)
8 changes: 4 additions & 4 deletions test.py
Expand Up @@ -2611,18 +2611,18 @@ def test_multiqc_a():


@skip_if_not_modified
def test_muscle_clw():
def test_muscle_super5():
run(
"bio/muscle",
["snakemake", "--cores", "1", "test-proteins.clw", "--use-conda", "-F"],
["snakemake", "--cores", "2", "test-proteins.super5.fas", "--use-conda", "-F"],
)


@skip_if_not_modified
def test_muscle_fa():
def test_muscle_fas():
run(
"bio/muscle",
["snakemake", "--cores", "1", "test-proteins.afa", "--use-conda", "-F"],
["snakemake", "--cores", "2", "test-proteins.fas", "--use-conda", "-F"],
)


Expand Down

0 comments on commit 659d106

Please sign in to comment.