Skip to content

Commit

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

---------

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 d084304 commit dea181a
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions bio/hisat2/align/environment.yaml
Expand Up @@ -3,5 +3,5 @@ channels:
- bioconda
- nodefaults
dependencies:
- hisat2 =2.1
- samtools =1.15
- hisat2 =2.2.1
- samtools =1.16.1
2 changes: 2 additions & 0 deletions bio/hisat2/align/meta.yaml
@@ -1,4 +1,6 @@
name: hisat2 align
description: Graph-based alignment of next generation sequencing reads to a population of genomes.
url: http://daehwankimlab.github.io/hisat2
authors:
- Wibowo Arindrarto
description: |
Expand Down
12 changes: 6 additions & 6 deletions bio/hisat2/align/test/Snakefile
@@ -1,13 +1,13 @@
rule hisat2_align:
input:
reads=["reads/{sample}_R1.fastq", "reads/{sample}_R2.fastq"]
reads=["reads/{sample}_R1.fastq", "reads/{sample}_R2.fastq"],
idx="index/",
output:
"mapped/{sample}.bam"
"mapped/{sample}.bam",
log:
"logs/hisat2_align_{sample}.log"
"logs/hisat2_align_{sample}.log",
params:
extra="",
idx="index/",
extra="",
threads: 2
wrapper:
"master/bio/hisat2/align"
"master/bio/hisat2/align"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion bio/hisat2/align/wrapper.py
Expand Up @@ -4,6 +4,8 @@
__license__ = "BSD"


import os
from pathlib import Path
from snakemake.shell import shell

# Placeholder for optional parameters
Expand All @@ -24,11 +26,14 @@
"Reads parameter must contain at least 1 and at most 2" " input files."
)

ht2_files = Path(snakemake.input.idx).glob("*.ht2")
idx_prefix = os.path.commonprefix(list(ht2_files)).rstrip(".")

# Executed shell command
shell(
"(hisat2 {extra} "
"--threads {snakemake.threads} "
" -x {snakemake.params.idx} {input_flags} "
" -x {idx_prefix} {input_flags} "
" | samtools view -Sbh -o {snakemake.output[0]} -) "
" {log}"
)

0 comments on commit dea181a

Please sign in to comment.