diff --git a/Mosdepth/0.3.3/Mosdepth.nf b/Mosdepth/0.3.3/Mosdepth.nf new file mode 100644 index 00000000..78efea6f --- /dev/null +++ b/Mosdepth/0.3.3/Mosdepth.nf @@ -0,0 +1,19 @@ +process Mosdepth { + tag {"Mosdepth ${sample_id}"} + label 'Mosdepth_0_3_3' + container = 'quay.io/biocontainers/mosdepth:0.3.3--h37c5b7d_2' + shell = ['/bin/bash', '-euo', 'pipefail'] + + input: + tuple(val(sample_id), path(bam_file), path(bai_file)) + + output: + tuple(val(sample_id), path("${sample_id}.mosdepth.summary.txt"), emit: summary_file) + tuple(val(sample_id), path("${sample_id}.mosdepth.*.txt"), emit: txt_files) + tuple(val(sample_id), path("${sample_id}*bed*"), emit: bed_files, optional: true) + + script: + """ + mosdepth -t ${task.cpus} ${params.optional} ${sample_id} ${bam_file} + """ +} diff --git a/Sambamba/0.7.0/ViewSubsample.nf b/Sambamba/0.7.0/ViewSubsample.nf new file mode 100644 index 00000000..b109d219 --- /dev/null +++ b/Sambamba/0.7.0/ViewSubsample.nf @@ -0,0 +1,18 @@ +process Subsample { + tag {"Sambamba Subsample ${sample_id}"} + label 'Sambamba_0_7_0' + label 'Sambamba_0_7_0_ViewSubsample' + container = 'quay.io/biocontainers/sambamba:0.7.0--h89e63da_1' + shell = ['/bin/bash', '-euo', 'pipefail'] + + input: + tuple(sample_id, val(fraction), path(bam_file), path(bai_file)) + + output: + tuple(sample_id, path("${bam_file.baseName}.subsample.bam"), path("${bam_file.baseName}.subsample.bam.bai"), emit: bam_file) + + script: + """ + sambamba view -t ${task.cpus} -f bam -s ${fraction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam + """ +}