From a812dceb23255f05ae0c109eb2ad052f3b5d7775 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 08:32:29 -0600 Subject: [PATCH 1/9] Updated bam input in module --- software/preseq/lcextrap/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/preseq/lcextrap/main.nf b/software/preseq/lcextrap/main.nf index 7be82eb8..7f746c9f 100644 --- a/software/preseq/lcextrap/main.nf +++ b/software/preseq/lcextrap/main.nf @@ -37,7 +37,7 @@ process PRESEQ_LCEXTRAP { $options.args \\ $paired_end \\ -output ${prefix}.ccurve.txt \\ - $bam + -bam $bam cp .command.err ${prefix}.command.log echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//' > ${software}.version.txt From cb39fcb91540c57bd376fdd7a520c2e89bdebb95 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 08:41:09 -0600 Subject: [PATCH 2/9] Added preseq module and workflow --- .github/workflows/preseq_lcextrap.yml | 40 +++++++++++++++++++++++++++ tests/software/preseq/main.nf | 33 ++++++++++++++++++++++ tests/software/preseq/test.yml | 21 ++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 .github/workflows/preseq_lcextrap.yml create mode 100644 tests/software/preseq/main.nf create mode 100644 tests/software/preseq/test.yml diff --git a/.github/workflows/preseq_lcextrap.yml b/.github/workflows/preseq_lcextrap.yml new file mode 100644 index 00000000..33443f5e --- /dev/null +++ b/.github/workflows/preseq_lcextrap.yml @@ -0,0 +1,40 @@ +name: preseq_lcextrap +on: + push: + paths: + - software/preseq/lcextrap/** + - .github/workflows/preseq_lcextrap.yml + - tests/software/preseq/** + pull_request: + paths: + - software/preseq/lcextrap/** + - .github/workflows/preseq_lcextrap.yml + - tests/software/preseq/** + +jobs: + ci_test: + runs-on: ubuntu-latest + strategy: + matrix: + nxf_version: [20.11.0-edge] + env: + NXF_ANSI_LOG: false + steps: + - uses: actions/checkout@v2 + + - name: Install Nextflow + env: + NXF_VER: ${{ matrix.nxf_version }} + run: | + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: python -m pip install --upgrade pip pytest-workflow + + # Test the module + - run: pytest --tag preseq_lcextrap --symlink --wt 2 diff --git a/tests/software/preseq/main.nf b/tests/software/preseq/main.nf new file mode 100644 index 00000000..421c79ba --- /dev/null +++ b/tests/software/preseq/main.nf @@ -0,0 +1,33 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { PRESEQ_LCEXTRAP as PRESEQ_LCEXTRAP_SE } from '../../../software/preseq/lcextrap/main.nf' addParams( options: [ publish_dir:'test_preseq_single_end' ] ) +include { PRESEQ_LCEXTRAP as PRESEQ_LCEXTRAP_PE } from '../../../software/preseq/lcextrap/main.nf' addParams( options: [ publish_dir:'test_preseq_paired_end' ] ) + +/* + * Test with single-end data + */ + +workflow test_preseq_single_end { + + def input = [] + input = [ [ id:'test', single_end:true ], // meta map + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] + + PRESEQ_LCEXTRAP_SE ( input ) +} + +/* + * Test with paired-end data + */ + +workflow test_preseq_paired_end { + + def input = [] + input = [ [ id:'test', single_end:false ], // meta map + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] + + PRESEQ_LCEXTRAP_PE ( input ) +} + diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml new file mode 100644 index 00000000..67dd27f0 --- /dev/null +++ b/tests/software/preseq/test.yml @@ -0,0 +1,21 @@ +- name: Run preseq single-end lcextrap + command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_single_end -c tests/config/nextflow.config + tags: + - preseq + - preseq_lcextrap + + files: + - path: output/test_preseq_single_end/test.ccurve.txt + - path: output/test_preseq_single_end/test.command.log + md5sum: d41d8cd98f00b204e9800998ecf8427e + +- name: Run preseq paired-end lcextrap + command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config + tags: + - preseq + - preseq_lcextrap + + files: + - path: output/test_preseq_paired_end/test.ccurve.txt + - path: output/test_preseq_paired_end/test.log + md5sum: 66b339780630fc1aa72dcfbd0a4490fd From a2faeb703f4297e7cd5c1ebf858aa34790978707 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 08:50:20 -0600 Subject: [PATCH 3/9] Fixed md5sums --- tests/software/preseq/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml index 67dd27f0..8fb8a47f 100644 --- a/tests/software/preseq/test.yml +++ b/tests/software/preseq/test.yml @@ -6,8 +6,9 @@ files: - path: output/test_preseq_single_end/test.ccurve.txt + md5sum: 5253ffcfd4b6162851631efdbfe16f92 - path: output/test_preseq_single_end/test.command.log - md5sum: d41d8cd98f00b204e9800998ecf8427e + md5sum: ad83871098825d36d267e375c2b46f01 - name: Run preseq paired-end lcextrap command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config @@ -17,5 +18,6 @@ files: - path: output/test_preseq_paired_end/test.ccurve.txt - - path: output/test_preseq_paired_end/test.log md5sum: 66b339780630fc1aa72dcfbd0a4490fd + - path: output/test_preseq_paired_end/test.log + md5sum: d41d8cd98f00b204e9800998ecf8427e From 3b581d1912a4eda615fed3cf366007de1dbbb505 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 08:56:11 -0600 Subject: [PATCH 4/9] Updated test.yml --- tests/software/preseq/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml index 8fb8a47f..b8381438 100644 --- a/tests/software/preseq/test.yml +++ b/tests/software/preseq/test.yml @@ -8,7 +8,6 @@ - path: output/test_preseq_single_end/test.ccurve.txt md5sum: 5253ffcfd4b6162851631efdbfe16f92 - path: output/test_preseq_single_end/test.command.log - md5sum: ad83871098825d36d267e375c2b46f01 - name: Run preseq paired-end lcextrap command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config @@ -19,5 +18,4 @@ files: - path: output/test_preseq_paired_end/test.ccurve.txt md5sum: 66b339780630fc1aa72dcfbd0a4490fd - - path: output/test_preseq_paired_end/test.log - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/test_preseq_paired_end/test.command.log From b297f7aea12da0abcb4df1d257b400959b8a8a6b Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 18:04:12 -0600 Subject: [PATCH 5/9] Fixed test and removed phantompeak tests --- .github/workflows/phantompeakqualtools.yml | 40 -------------------- tests/software/phantompeakqualtools/main.nf | 12 ------ tests/software/phantompeakqualtools/test.yml | 9 ----- tests/software/preseq/test.yml | 4 +- 4 files changed, 3 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/phantompeakqualtools.yml delete mode 100644 tests/software/phantompeakqualtools/main.nf delete mode 100644 tests/software/phantompeakqualtools/test.yml diff --git a/.github/workflows/phantompeakqualtools.yml b/.github/workflows/phantompeakqualtools.yml deleted file mode 100644 index 3663b6ef..00000000 --- a/.github/workflows/phantompeakqualtools.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: phantompeakqualtools -on: - push: - paths: - - software/phantompeakqualtools/** - - .github/workflows/phantompeakqualtools.yml - - tests/software/phantompeakqualtools/** - pull_request: - paths: - - software/phantompeakqualtools/** - - .github/workflows/phantompeakqualtools.yml - - tests/software/phantompeakqualtools/** - -jobs: - ci_test: - runs-on: ubuntu-latest - strategy: - matrix: - nxf_version: [20.07.1, ""] - env: - NXF_ANSI_LOG: false - steps: - - uses: actions/checkout@v2 - - - name: Install Nextflow - env: - NXF_VER: ${{ matrix.nxf_version }} - run: | - wget -qO- get.nextflow.io | bash - sudo mv nextflow /usr/local/bin/ - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Install dependencies - run: python -m pip install --upgrade pip pytest-workflow - - # Test the module - - run: pytest --tag phantompeakqualtools --symlink --wt 2 diff --git a/tests/software/phantompeakqualtools/main.nf b/tests/software/phantompeakqualtools/main.nf deleted file mode 100644 index e7169d80..00000000 --- a/tests/software/phantompeakqualtools/main.nf +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { PHANTOMPEAKQUALTOOLS } from '../../../software/phantompeakqualtools/main.nf' addParams( options: [:] ) - -workflow test_phantompeakqualtools { - def input = [] - input = [ [ id:'test', single_end:true ], // meta map - [ file("${launchDir}/tests/data/bam/test.single_end.sorted.bam", checkIfExists: true) ] ] - PHANTOMPEAKQUALTOOLS ( input ) -} diff --git a/tests/software/phantompeakqualtools/test.yml b/tests/software/phantompeakqualtools/test.yml deleted file mode 100644 index d23f3d94..00000000 --- a/tests/software/phantompeakqualtools/test.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Run phantompeakqualtools test workflow - command: nextflow run ./tests/software/phantompeakqualtools/ -profile docker -entry test_phantompeakqualtools -c tests/config/nextflow.config - tags: - - phantompeakqualtools - files: - - path: output/phantompeakqualtools/test.spp.pdf - - path: output/phantompeakqualtools/test.spp.Rdata - - path: output/phantompeakqualtools/test.spp.out - md5sum: c18220e8082e695995edecc99235ec85 diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml index b8381438..8fb8a47f 100644 --- a/tests/software/preseq/test.yml +++ b/tests/software/preseq/test.yml @@ -8,6 +8,7 @@ - path: output/test_preseq_single_end/test.ccurve.txt md5sum: 5253ffcfd4b6162851631efdbfe16f92 - path: output/test_preseq_single_end/test.command.log + md5sum: ad83871098825d36d267e375c2b46f01 - name: Run preseq paired-end lcextrap command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config @@ -18,4 +19,5 @@ files: - path: output/test_preseq_paired_end/test.ccurve.txt md5sum: 66b339780630fc1aa72dcfbd0a4490fd - - path: output/test_preseq_paired_end/test.command.log + - path: output/test_preseq_paired_end/test.log + md5sum: d41d8cd98f00b204e9800998ecf8427e From 6f3cbfcd9a86e379f37426373231bbeba7483ba6 Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Tue, 12 Jan 2021 18:14:28 -0600 Subject: [PATCH 6/9] Fixed test.yml --- tests/software/preseq/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml index 8fb8a47f..b8381438 100644 --- a/tests/software/preseq/test.yml +++ b/tests/software/preseq/test.yml @@ -8,7 +8,6 @@ - path: output/test_preseq_single_end/test.ccurve.txt md5sum: 5253ffcfd4b6162851631efdbfe16f92 - path: output/test_preseq_single_end/test.command.log - md5sum: ad83871098825d36d267e375c2b46f01 - name: Run preseq paired-end lcextrap command: nextflow run ./tests/software/preseq -profile docker -entry test_preseq_paired_end -c tests/config/nextflow.config @@ -19,5 +18,4 @@ files: - path: output/test_preseq_paired_end/test.ccurve.txt md5sum: 66b339780630fc1aa72dcfbd0a4490fd - - path: output/test_preseq_paired_end/test.log - md5sum: d41d8cd98f00b204e9800998ecf8427e + - path: output/test_preseq_paired_end/test.command.log From 4181a7356c506904f7a2f251e504953f3fd11fb6 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Fri, 15 Jan 2021 09:39:32 -0600 Subject: [PATCH 7/9] Remove -bam flag Co-authored-by: Harshil Patel --- software/preseq/lcextrap/main.nf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/preseq/lcextrap/main.nf b/software/preseq/lcextrap/main.nf index 7f746c9f..7be82eb8 100644 --- a/software/preseq/lcextrap/main.nf +++ b/software/preseq/lcextrap/main.nf @@ -37,7 +37,7 @@ process PRESEQ_LCEXTRAP { $options.args \\ $paired_end \\ -output ${prefix}.ccurve.txt \\ - -bam $bam + $bam cp .command.err ${prefix}.command.log echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//' > ${software}.version.txt From 00ef1d3863e635707b937fe813b6eace08eeef4d Mon Sep 17 00:00:00 2001 From: sruthipsuresh <58604926+sruthipsuresh@users.noreply.github.com> Date: Fri, 15 Jan 2021 16:52:17 -0600 Subject: [PATCH 8/9] Changed input to bed files --- tests/software/preseq/main.nf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/software/preseq/main.nf b/tests/software/preseq/main.nf index 421c79ba..dee9b2d6 100644 --- a/tests/software/preseq/main.nf +++ b/tests/software/preseq/main.nf @@ -13,8 +13,7 @@ workflow test_preseq_single_end { def input = [] input = [ [ id:'test', single_end:true ], // meta map - [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] - + [ file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]] PRESEQ_LCEXTRAP_SE ( input ) } @@ -26,7 +25,7 @@ workflow test_preseq_paired_end { def input = [] input = [ [ id:'test', single_end:false ], // meta map - [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1106616_5M_subset.bam', checkIfExists: true), ] ] + [ file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]] PRESEQ_LCEXTRAP_PE ( input ) } From 09d56efe126f3a9729ce821bd9001a42f932145d Mon Sep 17 00:00:00 2001 From: sruthipsuresh Date: Thu, 14 Jan 2021 02:12:57 -0600 Subject: [PATCH 9/9] Fixed with mr file for size issues --- tests/software/preseq/main.nf | 4 ++-- tests/software/preseq/test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/software/preseq/main.nf b/tests/software/preseq/main.nf index dee9b2d6..2091dcc6 100644 --- a/tests/software/preseq/main.nf +++ b/tests/software/preseq/main.nf @@ -13,7 +13,7 @@ workflow test_preseq_single_end { def input = [] input = [ [ id:'test', single_end:true ], // meta map - [ file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]] + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1003759_5M_subset.mr', checkIfExists: true), ] ] PRESEQ_LCEXTRAP_SE ( input ) } @@ -25,7 +25,7 @@ workflow test_preseq_paired_end { def input = [] input = [ [ id:'test', single_end:false ], // meta map - [ file("${launchDir}/tests/data/bed/A.bed", checkIfExists: true) ]] + [ file('https://github.com/smithlabcode/preseq/raw/master/data/SRR1003759_5M_subset.mr', checkIfExists: true), ] ] PRESEQ_LCEXTRAP_PE ( input ) } diff --git a/tests/software/preseq/test.yml b/tests/software/preseq/test.yml index b8381438..14d940da 100644 --- a/tests/software/preseq/test.yml +++ b/tests/software/preseq/test.yml @@ -6,7 +6,7 @@ files: - path: output/test_preseq_single_end/test.ccurve.txt - md5sum: 5253ffcfd4b6162851631efdbfe16f92 + md5sum: 76ae04c8eaf19c94e3210bb69da38498 - path: output/test_preseq_single_end/test.command.log - name: Run preseq paired-end lcextrap @@ -17,5 +17,5 @@ files: - path: output/test_preseq_paired_end/test.ccurve.txt - md5sum: 66b339780630fc1aa72dcfbd0a4490fd + md5sum: 2836d2fabd2213f097fd7063db550276 - path: output/test_preseq_paired_end/test.command.log