From a814dafa80deac036a8c881031a0672a40881596 Mon Sep 17 00:00:00 2001 From: melferink Date: Wed, 19 Apr 2023 10:27:01 +0200 Subject: [PATCH 1/7] first commit --- Sambamba/0.7.0/SubSample.nf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Sambamba/0.7.0/SubSample.nf diff --git a/Sambamba/0.7.0/SubSample.nf b/Sambamba/0.7.0/SubSample.nf new file mode 100644 index 00000000..6af816d9 --- /dev/null +++ b/Sambamba/0.7.0/SubSample.nf @@ -0,0 +1,18 @@ +process SubSample { + tag {"Sambamba SubSample ${sample_id}"} + label 'Sambamba_0_7_0' + label 'Sambamba_0_7_0_SubSample' + container = 'quay.io/biocontainers/sambamba:0.7.0--h89e63da_1' + shell = ['/bin/bash', '-euo', 'pipefail'] + + input: + tuple(sample_id, val(faction), path(bam_file), path(bai_file)) + + output: + tuple(sample_id, path("${bam_file.baseName}.subsample.bam"), path("${bam_file.baseName}.subsample.bam.bai"), emit: subsample_bam_file) + + script: + """ + sambamba view -t ${task.cpus} -f bam -s ${faction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam + """ +} From fbe13797f078817d9ca384f84a591be27a788505 Mon Sep 17 00:00:00 2001 From: melferink Date: Wed, 19 Apr 2023 10:27:11 +0200 Subject: [PATCH 2/7] first commit --- Mosdepth/0.3.3/Mosdepth.nf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Mosdepth/0.3.3/Mosdepth.nf diff --git a/Mosdepth/0.3.3/Mosdepth.nf b/Mosdepth/0.3.3/Mosdepth.nf new file mode 100644 index 00000000..4f2aa056 --- /dev/null +++ b/Mosdepth/0.3.3/Mosdepth.nf @@ -0,0 +1,17 @@ +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(sample_id, path("${sample_id}.mosdepth.summary.txt")) + + script: + """ + mosdepth -t ${task.cpus} ${params.optional} ${sample_id} ${bam_file} + """ +} From 84e7c0e29cd6529797cafe625e33ca4368b0cdf0 Mon Sep 17 00:00:00 2001 From: melferink Date: Thu, 20 Apr 2023 12:48:25 +0200 Subject: [PATCH 3/7] renamed --- Sambamba/0.7.0/SubSample.nf | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 Sambamba/0.7.0/SubSample.nf diff --git a/Sambamba/0.7.0/SubSample.nf b/Sambamba/0.7.0/SubSample.nf deleted file mode 100644 index 6af816d9..00000000 --- a/Sambamba/0.7.0/SubSample.nf +++ /dev/null @@ -1,18 +0,0 @@ -process SubSample { - tag {"Sambamba SubSample ${sample_id}"} - label 'Sambamba_0_7_0' - label 'Sambamba_0_7_0_SubSample' - container = 'quay.io/biocontainers/sambamba:0.7.0--h89e63da_1' - shell = ['/bin/bash', '-euo', 'pipefail'] - - input: - tuple(sample_id, val(faction), path(bam_file), path(bai_file)) - - output: - tuple(sample_id, path("${bam_file.baseName}.subsample.bam"), path("${bam_file.baseName}.subsample.bam.bai"), emit: subsample_bam_file) - - script: - """ - sambamba view -t ${task.cpus} -f bam -s ${faction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam - """ -} From de8672a6026cc3234a32ad788199b2273a166ce8 Mon Sep 17 00:00:00 2001 From: melferink Date: Thu, 20 Apr 2023 12:48:35 +0200 Subject: [PATCH 4/7] renamed --- Sambamba/0.7.0/ViewSubsample.nf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Sambamba/0.7.0/ViewSubsample.nf diff --git a/Sambamba/0.7.0/ViewSubsample.nf b/Sambamba/0.7.0/ViewSubsample.nf new file mode 100644 index 00000000..5e87496d --- /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(faction), path(bam_file), path(bai_file)) + + output: + tuple(sample_id, path("${bam_file.baseName}.subsample.bam"), path("${bam_file.baseName}.subsample.bam.bai"), emit: subsample_bam_file) + + script: + """ + sambamba view -t ${task.cpus} -f bam -s ${faction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam + """ +} From 762960fbe10616cda95f73fc5740dde07bb76589 Mon Sep 17 00:00:00 2001 From: melferink Date: Tue, 2 May 2023 13:21:47 +0200 Subject: [PATCH 5/7] fixed typo --- Sambamba/0.7.0/ViewSubsample.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sambamba/0.7.0/ViewSubsample.nf b/Sambamba/0.7.0/ViewSubsample.nf index 5e87496d..88ddf5ad 100644 --- a/Sambamba/0.7.0/ViewSubsample.nf +++ b/Sambamba/0.7.0/ViewSubsample.nf @@ -6,13 +6,13 @@ process Subsample { shell = ['/bin/bash', '-euo', 'pipefail'] input: - tuple(sample_id, val(faction), path(bam_file), path(bai_file)) + 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: subsample_bam_file) script: """ - sambamba view -t ${task.cpus} -f bam -s ${faction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam + sambamba view -t ${task.cpus} -f bam -s ${fraction} ${params.optional} ${bam_file} -o ${bam_file.baseName}.subsample.bam """ } From 5bf79dd2b5f901765a33ce6e1d5c1ddb7803234f Mon Sep 17 00:00:00 2001 From: melferink Date: Thu, 11 May 2023 15:08:03 +0200 Subject: [PATCH 6/7] added new emit options next to summary file --- Mosdepth/0.3.3/Mosdepth.nf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Mosdepth/0.3.3/Mosdepth.nf b/Mosdepth/0.3.3/Mosdepth.nf index 4f2aa056..78efea6f 100644 --- a/Mosdepth/0.3.3/Mosdepth.nf +++ b/Mosdepth/0.3.3/Mosdepth.nf @@ -8,7 +8,9 @@ process Mosdepth { tuple(val(sample_id), path(bam_file), path(bai_file)) output: - tuple(sample_id, path("${sample_id}.mosdepth.summary.txt")) + 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: """ From b6bf5acb71acbf985a2614efbadd8f1aba34921d Mon Sep 17 00:00:00 2001 From: melferink Date: Mon, 15 May 2023 13:13:29 +0200 Subject: [PATCH 7/7] renamed for consistency --- Sambamba/0.7.0/ViewSubsample.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sambamba/0.7.0/ViewSubsample.nf b/Sambamba/0.7.0/ViewSubsample.nf index 88ddf5ad..b109d219 100644 --- a/Sambamba/0.7.0/ViewSubsample.nf +++ b/Sambamba/0.7.0/ViewSubsample.nf @@ -9,7 +9,7 @@ process Subsample { 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: subsample_bam_file) + tuple(sample_id, path("${bam_file.baseName}.subsample.bam"), path("${bam_file.baseName}.subsample.bam.bai"), emit: bam_file) script: """