Description

Align reads to a reference genome using bowtie2 then sort with samtools

Input

name
description
pattern

ch_reads

Channel containing a list of input FastQ files of size 1 and 2 for single-end
and paired-end data, respectively.

Structure: [ val(meta), [ path(reads) ] ]

*.fastq.gz

ch_index

Channel containing the Bowtie2 genome index directory.

Structure: [ val(meta2), path(index) ]

save_unaligned

Save reads that do not map to the reference (true) or discard them (false)
(default: false)

sort_bam

Use samtools sort (true) or samtools view (false)

ch_fasta_fai

Channel containing the reference fasta file and its index.

Structure: [ val(meta3), path(fasta), path(fai) ]

Output

name
description
pattern

bam_orig

BAM file straight out of Bowtie2, before sorting.

Structure: [ val(meta), path(bam) ]

*.bam

log_out

Bowtie2 alignment log.

Structure: [ val(meta), path(log) ]

*.log

fastq

Unaligned FastQ files, emitted when save_unaligned is true.

Structure: [ val(meta), [ path(fastq) ] ]

*.fastq.gz

bam

Sorted BAM file containing read alignments.

Structure: [ val(meta), path(bam) ]

*.bam

index

Index for the sorted BAM file.

Structure: [ val(meta), path(index) ]

*.{bai,csi,crai}

stats

File containing samtools stats output.

Structure: [ val(meta), path(stats) ]

*.stats

flagstat

File containing samtools flagstat output.

Structure: [ val(meta), path(flagstat) ]

*.flagstat

idxstats

File containing samtools idxstats output.

Structure: [ val(meta), path(idxstats) ]

*.idxstats