fastq_align_bamcmp_bwa
Align reads to two different reference genomes using bwa, then use bamcmp to keep only reads that align better to the first genome, then sort with samtools
Description
Align reads to two different reference genomes using bwa, then use bamcmp to keep only reads that align better to the first genome, then sort with samtools
Input
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
Structure: [ val(meta), [ path(reads) ] ]
BWA genome index files for the primary species.
Structure: [ val(meta2), path(primary_index) ]
BWA genome index files for the contamination species.
Structure: [ val(meta3), path(contaminant_index) ]
Output
BAM file of the reads that map better to the contamination genome. Sorted by queryname.
Structure: [ val(meta), path(bam) ]
File containing samtools stats output for primary unfiltered alignment.
Structure: [ val(meta), path(stats) ]
File containing samtools flagstat output for primary unfiltered alignment.
Structure: [ val(meta), path(flagstat) ]
File containing samtools idxstats output for primary unfiltered alignment.
Structure: [ val(meta), path(idxstats) ]