From 750bd8c3e3a2cdd36d6bf71399f725cbdc84245b Mon Sep 17 00:00:00 2001 From: Jose Espinosa-Carrasco Date: Tue, 13 Apr 2021 22:48:43 +0200 Subject: [PATCH] Finish deeptools modules (#442) * Adding bigWig and deeptools computeMatrix files to config * Adding meta.yml for deeptools modules * Add test for deeptools modules * Fixing and reordering tags * Fixing conda test that worked in local... * Apply suggestions from code review * Changing bigwig file pattern to include bigwig extension * Saving after last change is a good practice Co-authored-by: Harshil Patel --- software/deeptools/computematrix/meta.yml | 58 ++++++++++++++++++ software/deeptools/plotfingerprint/meta.yml | 61 +++++++++++++++++++ software/deeptools/plotheatmap/meta.yml | 55 +++++++++++++++++ software/deeptools/plotprofile/meta.yml | 55 +++++++++++++++++ tests/config/pytest_software.yml | 16 +++++ tests/config/test_data.config | 3 + .../software/deeptools/computematrix/main.nf | 16 +++++ .../software/deeptools/computematrix/test.yml | 9 +++ .../deeptools/plotfingerprint/main.nf | 17 ++++++ .../deeptools/plotfingerprint/test.yml | 13 ++++ tests/software/deeptools/plotheatmap/main.nf | 14 +++++ tests/software/deeptools/plotheatmap/test.yml | 9 +++ tests/software/deeptools/plotprofile/main.nf | 14 +++++ tests/software/deeptools/plotprofile/test.yml | 9 +++ 14 files changed, 349 insertions(+) create mode 100644 software/deeptools/computematrix/meta.yml create mode 100644 software/deeptools/plotfingerprint/meta.yml create mode 100644 software/deeptools/plotheatmap/meta.yml create mode 100644 software/deeptools/plotprofile/meta.yml create mode 100644 tests/software/deeptools/computematrix/main.nf create mode 100644 tests/software/deeptools/computematrix/test.yml create mode 100644 tests/software/deeptools/plotfingerprint/main.nf create mode 100644 tests/software/deeptools/plotfingerprint/test.yml create mode 100644 tests/software/deeptools/plotheatmap/main.nf create mode 100644 tests/software/deeptools/plotheatmap/test.yml create mode 100644 tests/software/deeptools/plotprofile/main.nf create mode 100644 tests/software/deeptools/plotprofile/test.yml diff --git a/software/deeptools/computematrix/meta.yml b/software/deeptools/computematrix/meta.yml new file mode 100644 index 00000000..d6fd78c7 --- /dev/null +++ b/software/deeptools/computematrix/meta.yml @@ -0,0 +1,58 @@ +name: deeptools_computematrix +description: calculates scores per genome regions for other deeptools plotting utilities +keywords: + - genome + - regions + - scores + - matrix +tools: + - deeptools: + description: A set of user-friendly tools for normalization and visualization of deep-sequencing data + homepage: + documentation: https://deeptools.readthedocs.io/en/develop/index.html + tool_dev_url: https://github.com/deeptools/deepTools + doi: "10.1093/nar/gku365" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bigwig: + type: file + description: bigwig file containing genomic scores + pattern: "*.{bw,bigwig}" + - bed: + type: file + description: bed file containing genomic regions + pattern: "*.{bed}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - matrix: + type: file + description: | + gzipped matrix file needed by the plotHeatmap and plotProfile + deeptools utilities + pattern: "*.{computeMatrix.mat.gz}" + - table: + type: file + description: | + tabular file containing the scores of the generated matrix + pattern: "*.{computeMatrix.vals.mat.tab}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@jeremy1805" + - "@emiller88" + - "@drpatelh" + - "@joseespinosa" diff --git a/software/deeptools/plotfingerprint/meta.yml b/software/deeptools/plotfingerprint/meta.yml new file mode 100644 index 00000000..6b6f9d8e --- /dev/null +++ b/software/deeptools/plotfingerprint/meta.yml @@ -0,0 +1,61 @@ +name: deeptools_plotfingerprint +description: plots cumulative reads coverages by BAM file +keywords: + - plot + - fingerprint + - cumulative coverage + - bam +tools: + - deeptools: + description: A set of user-friendly tools for normalization and visualization of deep-sequencing data + homepage: + documentation: https://deeptools.readthedocs.io/en/develop/index.html + tool_dev_url: https://github.com/deeptools/deepTools + doi: "10.1093/nar/gku365" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - bam: + type: file + description: One or more BAM files + pattern: "*.{bam}" + - bais: + type: file + description: Corresponding BAM file indexes + pattern: "*.bam.bai" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pdf: + type: file + description: | + Output figure containing resulting plot + pattern: "*.{plotFingerprint.pdf}" + - matrix: + type: file + description: | + Output file summarizing the read counts per bin + pattern: "*.{plotFingerprint.raw.txt}" + - metrics: + type: file + description: | + file containing BAM file quality metrics + pattern: "*.{qcmetrics.txt}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@emiller88" + - "@drpatelh" + - "@joseespinosa" diff --git a/software/deeptools/plotheatmap/meta.yml b/software/deeptools/plotheatmap/meta.yml new file mode 100644 index 00000000..14311332 --- /dev/null +++ b/software/deeptools/plotheatmap/meta.yml @@ -0,0 +1,55 @@ +name: deeptools_plotheatmap +description: plots values produced by deeptools_computematrix as a heatmap +keywords: + - plot + - heatmap + - scores + - matrix +tools: + - deeptools: + description: A set of user-friendly tools for normalization and visualization of deep-sequencing data + homepage: + documentation: https://deeptools.readthedocs.io/en/develop/index.html + tool_dev_url: https://github.com/deeptools/deepTools + doi: "10.1093/nar/gku365" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - matrix: + type: file + description: | + gzipped matrix file produced by deeptools_ + computematrix deeptools utility + pattern: "*.{mat.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pdf: + type: file + description: | + Output figure containing resulting plot + pattern: "*.{plotHeatmap.pdf}" + - matrix: + type: file + description: | + File containing the matrix of values + used to generate the heatmap + pattern: "*.{plotHeatmap.mat.tab}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@emiller88" + - "@drpatelh" + - "@joseespinosa" diff --git a/software/deeptools/plotprofile/meta.yml b/software/deeptools/plotprofile/meta.yml new file mode 100644 index 00000000..120280de --- /dev/null +++ b/software/deeptools/plotprofile/meta.yml @@ -0,0 +1,55 @@ +name: deeptools_plotprofile +description: plots values produced by deeptools_computematrix as a profile plot +keywords: + - plot + - profile + - scores + - matrix +tools: + - deeptools: + description: A set of user-friendly tools for normalization and visualization of deep-sequencing data + homepage: + documentation: https://deeptools.readthedocs.io/en/develop/index.html + tool_dev_url: https://github.com/deeptools/deepTools + doi: "10.1093/nar/gku365" + licence: ['GPL v3'] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test' ] + - matrix: + type: file + description: | + gzipped matrix file produced by deeptools_ + computematrix deeptools utility + pattern: "*.{mat.gz}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - pdf: + type: file + description: | + Output figure containing resulting plot + pattern: "*.{plotProfile.pdf}" + - matrix: + type: file + description: | + File containing the matrix of values + used to generate the profile + pattern: "*.{plotProfile.mat.tab}" + - version: + type: file + description: File containing software version + pattern: "*.{version.txt}" + +authors: + - "@emiller88" + - "@drpatelh" + - "@joseespinosa" diff --git a/tests/config/pytest_software.yml b/tests/config/pytest_software.yml index 259c3378..85381054 100644 --- a/tests/config/pytest_software.yml +++ b/tests/config/pytest_software.yml @@ -166,6 +166,22 @@ cutadapt: - software/cutadapt/** - tests/software/cutadapt/** +deeptools/computematrix: + - software/deeptools/computematrix/** + - tests/software/deeptools/computematrix/** + +deeptools/plotfingerprint: + - software/deeptools/plotfingerprint/** + - tests/software/deeptools/plotfingerprint/** + +deeptools/plotheatmap: + - software/deeptools/plotheatmap/** + - tests/software/deeptools/plotheatmap/** + +deeptools/plotprofile: + - software/deeptools/plotprofile/** + - tests/software/deeptools/plotprofile/** + dsh/filterbed: - software/dsh/filterbed/** - tests/software/dsh/filterbed/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index a393d021..2a979881 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -47,10 +47,13 @@ params { test_methylated_2_fastq_gz = "${test_data_dir}/genomics/sarscov2/illumina/fastq/test_methylated_2.fastq.gz" test_bedgraph = "${test_data_dir}/genomics/sarscov2/illumina/bedgraph/test.bedgraph" + test_bigwig = "${test_data_dir}/genomics/sarscov2/illumina/bigwig/test.bigwig" test_wig_gz = "${test_data_dir}/genomics/sarscov2/illumina/wig/test.wig.gz" test_baserecalibrator_table = "${test_data_dir}/genomics/sarscov2/illumina/gatk/test.baserecalibrator.table" + test_computematrix_mat_gz = "${test_data_dir}/genomics/sarscov2/illumina/deeptools/test.computeMatrix.mat.gz" + test_vcf = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf" test_vcf_gz = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz" test_vcf_gz_tbi = "${test_data_dir}/genomics/sarscov2/illumina/vcf/test.vcf.gz.tbi" diff --git a/tests/software/deeptools/computematrix/main.nf b/tests/software/deeptools/computematrix/main.nf new file mode 100644 index 00000000..61a2e6d3 --- /dev/null +++ b/tests/software/deeptools/computematrix/main.nf @@ -0,0 +1,16 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPTOOLS_COMPUTEMATRIX } from '../../../../software/deeptools/computematrix/main.nf' addParams( options: ['args' : 'scale-regions -b 1000'] ) + +workflow test_deeptools_computematrix { + + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_bigwig'], checkIfExists: true) + ] + + bed = file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) + + DEEPTOOLS_COMPUTEMATRIX ( input, bed ) +} diff --git a/tests/software/deeptools/computematrix/test.yml b/tests/software/deeptools/computematrix/test.yml new file mode 100644 index 00000000..910bd336 --- /dev/null +++ b/tests/software/deeptools/computematrix/test.yml @@ -0,0 +1,9 @@ +- name: deeptools computematrix + command: nextflow run tests/software/deeptools/computematrix -entry test_deeptools_computematrix -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/computematrix + files: + - path: output/deeptools/test.computeMatrix.mat.gz + - path: output/deeptools/test.computeMatrix.vals.mat.tab + md5sum: 19e22051cc44edb7db3e0f8345330d90 diff --git a/tests/software/deeptools/plotfingerprint/main.nf b/tests/software/deeptools/plotfingerprint/main.nf new file mode 100644 index 00000000..31e2e536 --- /dev/null +++ b/tests/software/deeptools/plotfingerprint/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +params.fragment_size = 1000 + +include { DEEPTOOLS_PLOTFINGERPRINT } from '../../../../software/deeptools/plotfingerprint/main.nf' addParams( options: [:] ) + +workflow test_deeptools_plotfingerprint { + + input = [ [ id:'test' ], // meta map + 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) + ] + + DEEPTOOLS_PLOTFINGERPRINT ( input ) +} diff --git a/tests/software/deeptools/plotfingerprint/test.yml b/tests/software/deeptools/plotfingerprint/test.yml new file mode 100644 index 00000000..f01e349f --- /dev/null +++ b/tests/software/deeptools/plotfingerprint/test.yml @@ -0,0 +1,13 @@ +- name: deeptools plotfingerprint + command: nextflow run tests/software/deeptools/plotfingerprint -entry test_deeptools_plotfingerprint -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/plotfingerprint + files: + - path: output/deeptools/test.plotFingerprint.pdf + - path: output/deeptools/test.plotFingerprint.qcmetrics.txt + contains: + - "AUC" + - "0.24184576629880325" + - path: output/deeptools/test.plotFingerprint.raw.txt + md5sum: e2a9ff341a315f49e7c8387a3323bdfb diff --git a/tests/software/deeptools/plotheatmap/main.nf b/tests/software/deeptools/plotheatmap/main.nf new file mode 100644 index 00000000..9cd0e497 --- /dev/null +++ b/tests/software/deeptools/plotheatmap/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPTOOLS_PLOTHEATMAP } from '../../../../software/deeptools/plotheatmap/main.nf' addParams( options: [:] ) + +workflow test_deeptools_plotheatmap { + + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_computematrix_mat_gz'], checkIfExists: true) + ] + + DEEPTOOLS_PLOTHEATMAP ( input ) +} diff --git a/tests/software/deeptools/plotheatmap/test.yml b/tests/software/deeptools/plotheatmap/test.yml new file mode 100644 index 00000000..4d852c10 --- /dev/null +++ b/tests/software/deeptools/plotheatmap/test.yml @@ -0,0 +1,9 @@ +- name: deeptools plotheatmap + command: nextflow run tests/software/deeptools/plotheatmap -entry test_deeptools_plotheatmap -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/plotheatmap + files: + - path: output/deeptools/test.plotHeatmap.mat.tab + - path: output/deeptools/test.plotHeatmap.pdf + diff --git a/tests/software/deeptools/plotprofile/main.nf b/tests/software/deeptools/plotprofile/main.nf new file mode 100644 index 00000000..aa888d52 --- /dev/null +++ b/tests/software/deeptools/plotprofile/main.nf @@ -0,0 +1,14 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { DEEPTOOLS_PLOTPROFILE } from '../../../../software/deeptools/plotprofile/main.nf' addParams( options: [:] ) + +workflow test_deeptools_plotprofile { + + input = [ [ id:'test' ], // meta map + file(params.test_data['sarscov2']['illumina']['test_computematrix_mat_gz'], checkIfExists: true) + ] + + DEEPTOOLS_PLOTPROFILE ( input ) +} diff --git a/tests/software/deeptools/plotprofile/test.yml b/tests/software/deeptools/plotprofile/test.yml new file mode 100644 index 00000000..413fe5b6 --- /dev/null +++ b/tests/software/deeptools/plotprofile/test.yml @@ -0,0 +1,9 @@ +- name: deeptools plotprofile + command: nextflow run tests/software/deeptools/plotprofile -entry test_deeptools_plotprofile -c tests/config/nextflow.config + tags: + - deeptools + - deeptools/plotprofile + files: + - path: output/deeptools/test.plotProfile.pdf + - path: output/deeptools/test.plotProfile.tab + md5sum: d561cb659a292cef973ea631c7d440cb