Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
fgvieira authored Sep 30, 2024
1 parent 8f3e697 commit 15771b9
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions bio/seqkit/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,16 @@


if snakemake.params.get("out_bgzip"):
shell(
"(seqkit {snakemake.params.command}"
" --threads {snakemake.threads}"
" {extra_input}"
" {extra_output}"
" {extra}"
" {input}"
" | bgzip --threads {snakemake.threads}"
" > {snakemake.output[0]}"
") {log}"
)
input = input + " | bgzip --threads {snakemake.threads} > {snakemake.output[0]}"
else:
shell(
"seqkit {snakemake.params.command}"
" --threads {snakemake.threads}"
" {extra_input}"
" {extra_output}"
" {extra}"
" --out-file {snakemake.output[0]}"
" {input}"
" {log}"
)
input = "--out-file {snakemake.output[0]} " + input

shell(
"(seqkit {snakemake.params.command}"
" --threads {snakemake.threads}"
" {extra_input}"
" {extra_output}"
" {extra}"
" {input}"
") {log}"
)

0 comments on commit 15771b9

Please sign in to comment.