Description

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

Input

Name (Type)
Description
Pattern

ch_reads

List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
Structure: [ val(meta), [ path(reads) ] ]

ch_index

BWA genome index files
Structure: [ val(meta), path(index) ]

val_sort_bam (boolean)

If true bwa modules sort resulting bam files

true|false

ch_fasta (file)

Optional reference fasta file. This only needs to be given if val_sort_bam = true.
Structure: [ val(meta), path(fasta) ]

Output

Name (Type)
Description
Pattern

bam_orig

BAM file produced by bwa
Structure: [ val(meta), path(bam) ]

bam

BAM file ordered by samtools
Structure: [ val(meta), path(bam) ]

bai

BAI index of the ordered BAM file
Structure: [ val(meta), path(bai) ]

csi

CSI index of the ordered BAM file
Structure: [ val(meta), path(csi) ]

stats

File containing samtools stats output
Structure: [ val(meta), path(stats) ]

flagstat

File containing samtools flagstat output
Structure: [ val(meta), path(flagstat) ]

idxstats

File containing samtools idxstats output
Structure: [ val(meta), path(idxstats) ]

versions

Files containing software versions
Structure: [ path(versions.yml) ]