From d162f21ab3f45856092ef68cd4c568c6e1f195f3 Mon Sep 17 00:00:00 2001 From: arontommi Date: Wed, 24 Mar 2021 19:15:30 +0100 Subject: [PATCH] Update samtools modules with config logic (#381) * fixing paths for test * fixing paths for test * fixing pats to tests * fixing paths to tests * fixing paths to tests * fixing paths for tests * fixing paths for tests * fixing paths for tests * fixing paths fro tests * fixing paths for tests * indentation fixes * typo * renaming test results according to new file name * replacing the md5sums * fixing brackets * replacing md5sums * fixing md5sums * fixing md5sums' * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml * Update test.yml Co-authored-by: Ramon Rivera Co-authored-by: Ramon Rivera --- tests/software/samtools/faidx/main.nf | 2 +- tests/software/samtools/faidx/test.yml | 4 ++-- tests/software/samtools/fastq/main.nf | 2 +- tests/software/samtools/fastq/test.yml | 4 ++-- tests/software/samtools/flagstat/main.nf | 6 +++--- tests/software/samtools/idxstats/main.nf | 5 +++-- tests/software/samtools/index/main.nf | 4 ++-- tests/software/samtools/index/test.yml | 6 +++--- tests/software/samtools/merge/main.nf | 10 +++++----- tests/software/samtools/mpileup/main.nf | 4 ++-- tests/software/samtools/sort/main.nf | 2 +- tests/software/samtools/sort/test.yml | 6 +++--- tests/software/samtools/stats/main.nf | 6 +++--- tests/software/samtools/view/main.nf | 3 ++- tests/software/samtools/view/test.yml | 6 +++--- 15 files changed, 36 insertions(+), 34 deletions(-) diff --git a/tests/software/samtools/faidx/main.nf b/tests/software/samtools/faidx/main.nf index e8b4f04b..e977cf0b 100644 --- a/tests/software/samtools/faidx/main.nf +++ b/tests/software/samtools/faidx/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl = 2 include { SAMTOOLS_FAIDX } from '../../../../software/samtools/faidx/main.nf' addParams( options: [:] ) workflow test_samtools_faidx { - fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true) + fasta = file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) SAMTOOLS_FAIDX ( fasta ) } diff --git a/tests/software/samtools/faidx/test.yml b/tests/software/samtools/faidx/test.yml index 48bb15af..912ea8d9 100644 --- a/tests/software/samtools/faidx/test.yml +++ b/tests/software/samtools/faidx/test.yml @@ -1,8 +1,8 @@ - name: Run samtools faidx test workflow - command: nextflow run ./tests/software/samtools/faidx -entry test_samtools_faidx -c tests/config/nextflow.config + command: nextflow run tests/software/samtools/faidx -entry test_samtools_faidx -c tests/config/nextflow.config tags: - samtools - samtools_faidx files: - - path: ./output/samtools/test_genome.fasta.fai + - path: output/samtools/genome.fasta.fai md5sum: 9da2a56e2853dc8c0b86a9e7229c9fe5 diff --git a/tests/software/samtools/fastq/main.nf b/tests/software/samtools/fastq/main.nf index dae2d1de..92c78049 100644 --- a/tests/software/samtools/fastq/main.nf +++ b/tests/software/samtools/fastq/main.nf @@ -6,7 +6,7 @@ include { SAMTOOLS_FASTQ } from '../../../../software/samtools/fastq/main.nf' ad workflow test_samtools_fastq { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] SAMTOOLS_FASTQ ( input ) diff --git a/tests/software/samtools/fastq/test.yml b/tests/software/samtools/fastq/test.yml index a9d2b190..ac89b510 100644 --- a/tests/software/samtools/fastq/test.yml +++ b/tests/software/samtools/fastq/test.yml @@ -5,6 +5,6 @@ - samtools_fastq files: - path: output/samtools/test_2.fastq.gz - md5sum: 42d3afede8c7ef21577fcd3d07edaa83 + md5sum: 229daf1a62d114cae42c65801e8c0114 - path: output/samtools/test_1.fastq.gz - md5sum: 166feed91e5109214b0a7a0d8c53641d + md5sum: 4cab81f76e66361611621377f1b69d1d diff --git a/tests/software/samtools/flagstat/main.nf b/tests/software/samtools/flagstat/main.nf index 77d8436c..b785e2c2 100644 --- a/tests/software/samtools/flagstat/main.nf +++ b/tests/software/samtools/flagstat/main.nf @@ -6,9 +6,9 @@ include { SAMTOOLS_FLAGSTAT } from '../../../../software/samtools/flagstat/main. workflow test_samtools_flagstat { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] - + SAMTOOLS_FLAGSTAT ( input ) } diff --git a/tests/software/samtools/idxstats/main.nf b/tests/software/samtools/idxstats/main.nf index 5b401cfb..5d6def09 100644 --- a/tests/software/samtools/idxstats/main.nf +++ b/tests/software/samtools/idxstats/main.nf @@ -6,8 +6,9 @@ include { SAMTOOLS_IDXSTATS } from '../../../../software/samtools/idxstats/main. workflow test_samtools_idxstats { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai", checkIfExists: true) ] + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) + ] SAMTOOLS_IDXSTATS ( input ) } diff --git a/tests/software/samtools/index/main.nf b/tests/software/samtools/index/main.nf index a1a37cb9..815bd239 100644 --- a/tests/software/samtools/index/main.nf +++ b/tests/software/samtools/index/main.nf @@ -6,8 +6,8 @@ include { SAMTOOLS_INDEX } from '../../../../software/samtools/index/main.nf' ad workflow test_samtools_index { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] - + SAMTOOLS_INDEX ( input ) } diff --git a/tests/software/samtools/index/test.yml b/tests/software/samtools/index/test.yml index 373e0b94..87934bfb 100644 --- a/tests/software/samtools/index/test.yml +++ b/tests/software/samtools/index/test.yml @@ -1,8 +1,8 @@ - name: samtools index - command: nextflow run ./tests/software/samtools/index -entry test_samtools_index -c tests/config/nextflow.config + command: nextflow run tests/software/samtools/index -entry test_samtools_index -c tests/config/nextflow.config tags: - samtools - samtools_index files: - - path: ./output/samtools/test_paired_end.sorted.bam.bai - md5sum: d7ef575848d1d13000317e4763b9e502 + - path: output/samtools/test_paired_end.sorted.bam.bai + md5sum: 704c10dd1326482448ca3073fdebc2f4 diff --git a/tests/software/samtools/merge/main.nf b/tests/software/samtools/merge/main.nf index 5b70e6ca..97e080c3 100644 --- a/tests/software/samtools/merge/main.nf +++ b/tests/software/samtools/merge/main.nf @@ -5,11 +5,11 @@ nextflow.enable.dsl = 2 include { SAMTOOLS_MERGE } from '../../../../software/samtools/merge/main.nf' addParams( options: [:] ) workflow test_samtools_merge { - input = [ [ id: 'test' ], // meta map - [ file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_methylated_paired_end.sorted.bam", checkIfExists: true ), - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_single_end.sorted.bam", checkIfExists: true) ] - ] + input = [ [ id: 'test' ], // meta map + [ file(params.test_data['sarscov2']['illumina']['test_methylated_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_single_end_sorted_bam'], checkIfExists: true)] + ] SAMTOOLS_MERGE ( input ) } diff --git a/tests/software/samtools/mpileup/main.nf b/tests/software/samtools/mpileup/main.nf index fb9299b1..df4f4140 100644 --- a/tests/software/samtools/mpileup/main.nf +++ b/tests/software/samtools/mpileup/main.nf @@ -6,9 +6,9 @@ include { SAMTOOLS_MPILEUP } from '../../../../software/samtools/mpileup/main.nf workflow test_samtools_mpileup { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true) ] fasta = file("${launchDir}/tests/data/genomics/sarscov2/genome/genome.fasta", checkIfExists: true) - + SAMTOOLS_MPILEUP ( input, fasta ) } diff --git a/tests/software/samtools/sort/main.nf b/tests/software/samtools/sort/main.nf index 8e78035c..fd30d7ce 100644 --- a/tests/software/samtools/sort/main.nf +++ b/tests/software/samtools/sort/main.nf @@ -6,7 +6,7 @@ include { SAMTOOLS_SORT } from '../../../../software/samtools/sort/main.nf' addP workflow test_samtools_sort { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.bam", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) ] SAMTOOLS_SORT ( input ) diff --git a/tests/software/samtools/sort/test.yml b/tests/software/samtools/sort/test.yml index c1d5cd52..f9ed2227 100644 --- a/tests/software/samtools/sort/test.yml +++ b/tests/software/samtools/sort/test.yml @@ -1,8 +1,8 @@ - name: samtools sort - command: nextflow run ./tests/software/samtools/sort -entry test_samtools_sort -c tests/config/nextflow.config + command: nextflow run tests/software/samtools/sort -entry test_samtools_sort -c tests/config/nextflow.config tags: - samtools - samtools_sort files: - - path: ./output/samtools/test.bam - md5sum: a10e9a09d887cd3ded9b824a87655b93 + - path: output/samtools/test.bam + md5sum: 7e32f47768f922a73ccec4dc24db1973 diff --git a/tests/software/samtools/stats/main.nf b/tests/software/samtools/stats/main.nf index 89af3c62..1e8677a4 100644 --- a/tests/software/samtools/stats/main.nf +++ b/tests/software/samtools/stats/main.nf @@ -6,9 +6,9 @@ include { SAMTOOLS_STATS } from '../../../../software/samtools/stats/main.nf' ad workflow test_samtools_stats { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam", checkIfExists: true), - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.sorted.bam.bai", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), + file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true) ] - + SAMTOOLS_STATS ( input ) } diff --git a/tests/software/samtools/view/main.nf b/tests/software/samtools/view/main.nf index 60b2e18c..988e984d 100644 --- a/tests/software/samtools/view/main.nf +++ b/tests/software/samtools/view/main.nf @@ -6,7 +6,8 @@ include { SAMTOOLS_VIEW } from '../../../../software/samtools/view/main.nf' addP workflow test_samtools_view { input = [ [ id:'test', single_end:false ], // meta map - file("${launchDir}/tests/data/genomics/sarscov2/illumina/bam/test_paired_end.bam", checkIfExists: true) + file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true) + ] SAMTOOLS_VIEW ( input ) diff --git a/tests/software/samtools/view/test.yml b/tests/software/samtools/view/test.yml index b744107e..308fde3f 100644 --- a/tests/software/samtools/view/test.yml +++ b/tests/software/samtools/view/test.yml @@ -1,8 +1,8 @@ - name: samtools view - command: nextflow run ./tests/software/samtools/view -entry test_samtools_view -c tests/config/nextflow.config + command: nextflow run tests/software/samtools/view -entry test_samtools_view -c tests/config/nextflow.config tags: - samtools - samtools_view files: - - path: ./output/samtools/test.bam - md5sum: 7e0d4c8eeff88e8f318eb2fe07dbdc0a + - path: output/samtools/test.bam + md5sum: 8fb1e82f76416e9e30fc6b2357e2cf13