From 0d8bd42cca70ad65f9eee3a9395ccc2ef36be362 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:34:23 +0000 Subject: [PATCH 01/11] Create index in bwa directory --- software/bwa/index/main.nf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/software/bwa/index/main.nf b/software/bwa/index/main.nf index 47d2ec54..5613b86d 100644 --- a/software/bwa/index/main.nf +++ b/software/bwa/index/main.nf @@ -28,7 +28,8 @@ process BWA_INDEX { script: def software = getSoftwareName(task.process) """ - bwa index $options.args $fasta + mkdir bwa + bwa index $options.args bwa/${fasta.baseName} echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt """ } From dcb1dc5cd93077ec751969ae2a9998f4393741e1 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:34:42 +0000 Subject: [PATCH 02/11] Remove fasta requirement from module --- software/bwa/mem/main.nf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/software/bwa/mem/main.nf b/software/bwa/mem/main.nf index 4ce1c578..d2652b62 100644 --- a/software/bwa/mem/main.nf +++ b/software/bwa/mem/main.nf @@ -21,7 +21,6 @@ process BWA_MEM { input: tuple val(meta), path(reads) path index - path fasta output: tuple val(meta), path("*.bam"), emit: bam @@ -32,13 +31,15 @@ process BWA_MEM { def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}" def read_group = meta.read_group ? "-R ${meta.read_group}" : "" """ + INDEX=`find -L ./ -name "*.amb" | sed 's/.amb//'` + bwa mem \\ $options.args \\ $read_group \\ -t $task.cpus \\ - $fasta \\ + \$INDEX \\ $reads \\ - | samtools view $options.args2 -@ $task.cpus -bS -o ${prefix}.bam - + | samtools view $options.args2 -@ $task.cpus -bhS -o ${prefix}.bam - echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt """ From 6df54698d945ef1da932b9983c5e80e121e4261d Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:34:55 +0000 Subject: [PATCH 03/11] Remove fasta from input --- software/bwa/mem/meta.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/software/bwa/mem/meta.yml b/software/bwa/mem/meta.yml index de61798b..2e44951c 100644 --- a/software/bwa/mem/meta.yml +++ b/software/bwa/mem/meta.yml @@ -51,10 +51,7 @@ input: - index: type: file description: BWA genome index files - pattern: "*.{amb,ann,bwt,pac,sa}" - - fasta: - type: file - description: Input genome fasta file + pattern: "Directory containing BWA index *.{amb,ann,bwt,pac,sa}" output: - bam: type: file From ade6124a8442229588adb5281ab8e2889bd8cf38 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:35:06 +0000 Subject: [PATCH 04/11] Change tests --- tests/software/bwa/main.nf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/software/bwa/main.nf b/tests/software/bwa/main.nf index a4dcdbbf..e4b3896e 100644 --- a/tests/software/bwa/main.nf +++ b/tests/software/bwa/main.nf @@ -21,8 +21,7 @@ workflow test_bwa_mem_single_end { BWA_MEM_SE ( input, - file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true), - file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) + file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true) ) } @@ -38,7 +37,6 @@ workflow test_bwa_mem_paired_end { BWA_MEM_PE ( input, - file("${launchDir}/tests/data/index/E_coli/bwa/NC_010473.fa.{amb,ann,bwt,pac,sa}", checkIfExists: true), - file("${launchDir}/tests/data/fasta/E_coli/NC_010473.fa", checkIfExists: true) + file("${launchDir}/tests/data/index/E_coli/bwa/", checkIfExists: true) ) } From d63d40827e4eb2f115471d81919b7da19364a540 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:40:55 +0000 Subject: [PATCH 05/11] Fix bwa index tests --- tests/software/bwa/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/software/bwa/test.yml b/tests/software/bwa/test.yml index 9efefa1d..b92025ec 100644 --- a/tests/software/bwa/test.yml +++ b/tests/software/bwa/test.yml @@ -4,13 +4,13 @@ - bwa - bwa_index files: - - path: output/bwa/NC_010473.fa.amb + - path: output/bwa/bwa/NC_010473.fa.amb md5sum: 942a990ae872f1c0b8d72dda2db405d5 - - path: output/bwa/NC_010473.fa.bwt + - path: output/bwa/bwa/NC_010473.fa.bwt md5sum: 7301b52e2ecb893d429a49fa692447ae - - path: output/bwa/NC_010473.fa.pac + - path: output/bwa/bwa/NC_010473.fa.pac md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad - - path: output/bwa/NC_010473.fa.sa + - path: output/bwa/bwa/NC_010473.fa.sa md5sum: a47dcc92e750e2f16fbd979b8ff9538e - name: Run bwa mem single-end From 05b15df17eb892742db3a1520c7d23774ff034c1 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 12:46:34 +0000 Subject: [PATCH 06/11] Remove file extension --- tests/software/bwa/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/software/bwa/test.yml b/tests/software/bwa/test.yml index b92025ec..818c79a5 100644 --- a/tests/software/bwa/test.yml +++ b/tests/software/bwa/test.yml @@ -4,13 +4,13 @@ - bwa - bwa_index files: - - path: output/bwa/bwa/NC_010473.fa.amb + - path: output/bwa/bwa/NC_010473.amb md5sum: 942a990ae872f1c0b8d72dda2db405d5 - - path: output/bwa/bwa/NC_010473.fa.bwt + - path: output/bwa/bwa/NC_010473.bwt md5sum: 7301b52e2ecb893d429a49fa692447ae - - path: output/bwa/bwa/NC_010473.fa.pac + - path: output/bwa/bwa/NC_010473.pac md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad - - path: output/bwa/bwa/NC_010473.fa.sa + - path: output/bwa/bwa/NC_010473.sa md5sum: a47dcc92e750e2f16fbd979b8ff9538e - name: Run bwa mem single-end From 24370f241b5a6d22805939e053a06c8d827acc84 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 13:24:55 +0000 Subject: [PATCH 07/11] Remove inexplicable @ewels file --- test_import.nf | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 test_import.nf diff --git a/test_import.nf b/test_import.nf deleted file mode 100644 index 3d7ebd23..00000000 --- a/test_import.nf +++ /dev/null @@ -1,2 +0,0 @@ -// This file doesn't do anything, -// but pipelines can attempt to import it to check connection status From 3ccf99d61288ebce63340f8b86509cb5320a6f39 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 13:37:24 +0000 Subject: [PATCH 08/11] Fix module --- software/bwa/index/main.nf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/software/bwa/index/main.nf b/software/bwa/index/main.nf index 5613b86d..915c6623 100644 --- a/software/bwa/index/main.nf +++ b/software/bwa/index/main.nf @@ -22,14 +22,14 @@ process BWA_INDEX { path fasta output: - path "${fasta}.*" , emit: index + path "bwa" , emit: index path "*.version.txt", emit: version script: def software = getSoftwareName(task.process) """ mkdir bwa - bwa index $options.args bwa/${fasta.baseName} + bwa index $options.args $fasta -p bwa/${fasta.baseName} echo \$(bwa 2>&1) | sed 's/^.*Version: //; s/Contact:.*\$//' > ${software}.version.txt """ } From 838defa3506712d8b4c581c28eb5b32296ebe628 Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 13:37:40 +0000 Subject: [PATCH 09/11] Update md5sums --- tests/software/bwa/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/software/bwa/test.yml b/tests/software/bwa/test.yml index 818c79a5..bdd5f218 100644 --- a/tests/software/bwa/test.yml +++ b/tests/software/bwa/test.yml @@ -1,5 +1,5 @@ - name: Run bwa index - command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_index -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_index -c tests/config/nextflow.config tags: - bwa - bwa_index @@ -14,19 +14,19 @@ md5sum: a47dcc92e750e2f16fbd979b8ff9538e - name: Run bwa mem single-end - command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_single_end -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_mem_single_end -c tests/config/nextflow.config tags: - bwa - bwa_mem files: - path: output/test_single_end/test.bam - md5sum: 3ee21210bac387e0335008146e4728bc - + md5sum: 52e81e5bd523d0b27fe533b21a0d80f5 + - name: Run bwa mem paired-end - command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_paired_end -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_mem_paired_end -c tests/config/nextflow.config tags: - bwa - bwa_mem files: - path: output/test_paired_end/test.bam - md5sum: 510d8acc6448c07cdacce8e64ec0904c + md5sum: 86d82fdb68ed384c656cfc62a253052f From 6ac252e40751cd20bf7b656c328a752935cab7bb Mon Sep 17 00:00:00 2001 From: drpatelh Date: Tue, 2 Feb 2021 13:38:34 +0000 Subject: [PATCH 10/11] Change singularity to docker again --- tests/software/bwa/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/software/bwa/test.yml b/tests/software/bwa/test.yml index bdd5f218..b061fa45 100644 --- a/tests/software/bwa/test.yml +++ b/tests/software/bwa/test.yml @@ -1,5 +1,5 @@ - name: Run bwa index - command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_index -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_index -c tests/config/nextflow.config tags: - bwa - bwa_index @@ -14,7 +14,7 @@ md5sum: a47dcc92e750e2f16fbd979b8ff9538e - name: Run bwa mem single-end - command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_mem_single_end -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_single_end -c tests/config/nextflow.config tags: - bwa - bwa_mem @@ -23,7 +23,7 @@ md5sum: 52e81e5bd523d0b27fe533b21a0d80f5 - name: Run bwa mem paired-end - command: nextflow run ./tests/software/bwa -profile singularity -entry test_bwa_mem_paired_end -c tests/config/nextflow.config + command: nextflow run ./tests/software/bwa -profile docker -entry test_bwa_mem_paired_end -c tests/config/nextflow.config tags: - bwa - bwa_mem From 137d00b5239fd4783a565b75616849dac8e7b5ff Mon Sep 17 00:00:00 2001 From: drpatelh Date: Fri, 5 Feb 2021 10:44:08 +0000 Subject: [PATCH 11/11] Fix tests --- tests/software/bwa/index/test.yml | 10 +++++----- tests/software/bwa/mem/test.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/software/bwa/index/test.yml b/tests/software/bwa/index/test.yml index 89fe3f87..0e7decdf 100644 --- a/tests/software/bwa/index/test.yml +++ b/tests/software/bwa/index/test.yml @@ -4,11 +4,11 @@ - bwa - bwa_index files: - - path: output/bwa/NC_010473.fa.amb + - path: output/bwa/bwa/NC_010473.amb md5sum: 942a990ae872f1c0b8d72dda2db405d5 - - path: output/bwa/NC_010473.fa.bwt + - path: output/bwa/bwa/NC_010473.bwt md5sum: 7301b52e2ecb893d429a49fa692447ae - - path: output/bwa/NC_010473.fa.pac + - path: output/bwa/bwa/NC_010473.pac md5sum: 4d5e6fc45bbc968f7f859e9ca2cc89ad - - path: output/bwa/NC_010473.fa.sa - md5sum: a47dcc92e750e2f16fbd979b8ff9538e \ No newline at end of file + - path: output/bwa/bwa/NC_010473.sa + md5sum: a47dcc92e750e2f16fbd979b8ff9538e diff --git a/tests/software/bwa/mem/test.yml b/tests/software/bwa/mem/test.yml index decf2e44..b4c2f4f8 100644 --- a/tests/software/bwa/mem/test.yml +++ b/tests/software/bwa/mem/test.yml @@ -6,7 +6,7 @@ - bwa_mem_single_end files: - path: output/bwa/test.bam - md5sum: 3ee21210bac387e0335008146e4728bc + md5sum: 52e81e5bd523d0b27fe533b21a0d80f5 - name: bwa mem paired-end command: nextflow run ./tests/software/bwa/mem -entry test_bwa_mem_paired_end -c tests/config/nextflow.config @@ -16,4 +16,4 @@ - bwa_mem_paired_end files: - path: output/bwa/test.bam - md5sum: 510d8acc6448c07cdacce8e64ec0904c + md5sum: 86d82fdb68ed384c656cfc62a253052f