Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions modules/nf-core/hisat2/align/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::hisat2=2.2.2
- bioconda::samtools=1.23
- bioconda::hisat2=2.2.3
- bioconda::samtools=1.24
Comment thread
maxulysse marked this conversation as resolved.
50 changes: 21 additions & 29 deletions modules/nf-core/hisat2/align/main.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
process HISAT2_ALIGN {
tag "$meta.id"
tag "${meta.id}"
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'oras://community.wave.seqera.io/library/hisat2_samtools:5a258fe6e30b2c20' :
'community.wave.seqera.io/library/hisat2_samtools:6ca0ef72b662d5c8' }"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/92/92f546b522b78597047a54609eefcf35a014de082df0e500bc2adf64d2733669/data'
: 'community.wave.seqera.io/library/hisat2_samtools:a0c9b8ccf8116a89' }"

input:
tuple val(meta), path(reads)
Expand All @@ -14,9 +14,9 @@ process HISAT2_ALIGN {
val save_unaligned

output:
tuple val(meta), path("*.bam") , emit: bam
tuple val(meta), path("*.log") , emit: summary
tuple val(meta), path("*fastq.gz"), optional:true, emit: fastq
tuple val(meta), path("*.bam"), emit: bam
tuple val(meta), path("*.log"), emit: summary
tuple val(meta), path("*fastq.gz"), optional: true, emit: fastq
tuple val("${task.process}"), val('hisat2'), eval("hisat2 --version | sed -n '1s/.*version //p'"), emit: versions_hisat2, topic: versions
tuple val("${task.process}"), val('samtools'), eval("samtools --version | sed -n '1s/samtools //p'"), emit: versions_samtools, topic: versions

Expand All @@ -27,47 +27,40 @@ process HISAT2_ALIGN {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

def strandedness = ''
if (meta.strandedness == 'forward') {
strandedness = meta.single_end ? '--rna-strandness F' : '--rna-strandness FR'
} else if (meta.strandedness == 'reverse') {
strandedness = meta.single_end ? '--rna-strandness R' : '--rna-strandness RF'
}
ss = "$splicesites" ? "--known-splicesite-infile $splicesites" : ''
def ss = "${splicesites}" ? "--known-splicesite-infile ${splicesites}" : ''
def rg = args.contains("--rg-id") ? "" : "--rg-id ${prefix} --rg SM:${prefix}"
if (meta.single_end) {
def unaligned = save_unaligned ? "--un-gz ${prefix}.unmapped.fastq.gz" : ''
"""
INDEX=`find -L ./ -name "*.1.ht2*" | sed 's/\\.1.ht2.*\$//'`
hisat2 \\
-x \$INDEX \\
-U $reads \\
$strandedness \\
$ss \\
-U ${reads} \\
${ss} \\
--summary-file ${prefix}.hisat2.summary.log \\
--threads $task.cpus \\
$rg \\
$unaligned \\
$args \\
--threads ${task.cpus} \\
${rg} \\
${unaligned} \\
${args} \\
| samtools view -bS -F 4 -F 256 - > ${prefix}.bam
"""
} else {
}
else {
def unaligned = save_unaligned ? "--un-conc-gz ${prefix}.unmapped.fastq.gz" : ''
"""
INDEX=`find -L ./ -name "*.1.ht2*" | sed 's/\\.1.ht2.*\$//'`
hisat2 \\
-x \$INDEX \\
-1 ${reads[0]} \\
-2 ${reads[1]} \\
$strandedness \\
$ss \\
${ss} \\
--summary-file ${prefix}.hisat2.summary.log \\
--threads $task.cpus \\
$rg \\
$unaligned \\
--threads ${task.cpus} \\
${rg} \\
${unaligned} \\
--no-mixed \\
--no-discordant \\
$args \\
${args} \\
| samtools view -bS -F 4 -F 8 -F 256 - > ${prefix}.bam

if [ -f ${prefix}.unmapped.fastq.1.gz ]; then
Expand All @@ -88,5 +81,4 @@ process HISAT2_ALIGN {
touch ${prefix}.hisat2.summary.log
touch ${prefix}.bam
"""

}
28 changes: 25 additions & 3 deletions modules/nf-core/hisat2/align/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ keywords:
- reference
tools:
- hisat2:
description: HISAT2 is a fast and sensitive alignment program for mapping next-generation
sequencing reads (both DNA and RNA) to a population of human genomes as well
as to a single reference genome.
description: HISAT2 is a fast and sensitive alignment program for mapping next-generation sequencing reads (both DNA and RNA) to a population of human genomes as well as to a single reference genome.
homepage: https://daehwankimlab.github.io/hisat2/
documentation: https://daehwankimlab.github.io/hisat2/manual/
doi: "10.1038/s41587-019-0201-4"
Expand Down Expand Up @@ -134,3 +132,27 @@ authors:
maintainers:
- "@ntoda03"
- "@ramprasadn"
containers:
docker:
linux/amd64:
name: community.wave.seqera.io/library/hisat2_samtools:a0c9b8ccf8116a89
build_id: bd-a0c9b8ccf8116a89_1
scan_id: sc-886103d0f76f5df6_1
linux/arm64:
name: community.wave.seqera.io/library/hisat2_samtools:2061bdd7bd29b1cd
build_id: bd-2061bdd7bd29b1cd_1
scan_id: sc-184bae2a6fa4d5eb_1
singularity:
linux/amd64:
name: oras://community.wave.seqera.io/library/hisat2_samtools:c8aaaadb7f843dc5
build_id: bd-c8aaaadb7f843dc5_1
https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/92/92f546b522b78597047a54609eefcf35a014de082df0e500bc2adf64d2733669/data
linux/arm64:
name: oras://community.wave.seqera.io/library/hisat2_samtools:85c43579819c7f9c
build_id: bd-85c43579819c7f9c_1
https: https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/0a/0ac773ba54fb01c7ec8666b1347db8c0c5100a8e8b34e5ee5ee3f92abebd8ee7/data
conda:
linux/amd64:
lock_file: modules/nf-core/hisat2/align/.conda-lock/linux_amd64-bd-a0c9b8ccf8116a89_1.txt
linux/arm64:
lock_file: modules/nf-core/hisat2/align/.conda-lock/linux_arm64-bd-2061bdd7bd29b1cd_1.txt
Loading