Subsample a BAM/CRAM/SAM file using samtools to a given mean depth
Input
name
description
pattern
ch_bam
The input channel containing the BAM/CRAM/SAM files and their indexes and the depth at which to subsample them.
Structure: [ val(meta), path(bam), path(bai), val(depth) ]
*.{bam,cram,sam}
ch_fasta
The reference genome channel containing the fasta files and its index
Structure: [ val(meta), path(fasta), path(fai) ]
*.{fa(sta)?}
Output
name
description
pattern
bam_subsampled
Channel containing subsampled BAM/CRAM/SAM files and their indexes
Structure: [ val(meta), path(bam), path(csi) ]