Skip to content

Commit

Permalink
Update shinyngs, remove na.omit() from proteus (nf-core#3707)
Browse files Browse the repository at this point in the history
* Added log_assays param to shinyngs tests, updated shinyngs containers, removed na.omit() from proteus

* Updated shinyngs containers, added test for plot_exploratory
--log_assays param

* added --log2_assays flag back into nextflow.config

* removed redundant process definition

* prettier, updated proteus tests
  • Loading branch information
WackerO authored Aug 8, 2023
1 parent 8c4542e commit 707c31e
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ for (normfun in unlist(strsplit(opt\$normfuns, ","))) {

# Apply log2 and remove NAs as these will otherwise mess with some of the following modules

proteinGroups.normalized\$tab <- na.omit(log2(proteinGroups.normalized\$tab))
proteinGroups.normalized\$tab <- log2(proteinGroups.normalized\$tab)

png(paste(output_prefix, 'proteus', normfun, 'normalized_distributions.png', sep='.'), width = 5*300, height = 5*300, res = 300, pointsize = 8)
print(
Expand Down Expand Up @@ -317,7 +317,7 @@ for (normfun in unlist(strsplit(opt\$normfuns, ","))) {

# Process and save raw table

proteinGroups\$tab <- na.omit(log2(proteinGroups\$tab))
proteinGroups\$tab <- log2(proteinGroups\$tab)

# Generate raw distribution plot

Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/shinyngs/app/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ process SHINYNGS_APP {
//
// Those values must then be set in your Nextflow secrets.

conda "bioconda::r-shinyngs=1.7.2"
conda "bioconda::r-shinyngs=1.8.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' :
'biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.1--r43hdfd78af_0' :
'biocontainers/r-shinyngs:1.8.1--r43hdfd78af_0' }"

input:
tuple val(meta), path(sample), path(feature_meta), path(assay_files) // Experiment-level info
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/shinyngs/staticdifferential/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process SHINYNGS_STATICDIFFERENTIAL {
tag "$meta.id"
label 'process_single'

conda "bioconda::r-shinyngs=1.7.2"
conda "bioconda::r-shinyngs=1.8.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' :
'biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.1--r43hdfd78af_0' :
'biocontainers/r-shinyngs:1.8.1--r43hdfd78af_0' }"

input:
tuple val(meta), path(differential_result) // Differential info: contrast and differential stats
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/shinyngs/staticexploratory/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process SHINYNGS_STATICEXPLORATORY {
tag "$meta.id"
label 'process_single'

conda "bioconda::r-shinyngs=1.7.2"
conda "bioconda::r-shinyngs=1.8.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' :
'biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.1--r43hdfd78af_0' :
'biocontainers/r-shinyngs:1.8.1--r43hdfd78af_0' }"

input:
tuple val(meta), path(sample), path(feature_meta), path(assay_files)
Expand Down
6 changes: 3 additions & 3 deletions modules/nf-core/shinyngs/validatefomcomponents/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ process SHINYNGS_VALIDATEFOMCOMPONENTS {
tag "$sample"
label 'process_single'

conda "bioconda::r-shinyngs=1.7.2"
conda "bioconda::r-shinyngs=1.8.1"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.7.2--r42hdfd78af_0' :
'biocontainers/r-shinyngs:1.7.2--r42hdfd78af_0' }"
'https://depot.galaxyproject.org/singularity/r-shinyngs:1.8.1--r43hdfd78af_0' :
'biocontainers/r-shinyngs:1.8.1--r43hdfd78af_0' }"

input:
tuple val(meta), path(sample), path(assay_files)
Expand Down
6 changes: 3 additions & 3 deletions tests/modules/nf-core/proteus/readproteingroups/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@
- path: output/proteus/Celltype.proteus.normalizeMedian.normalized_mean_variance_relationship.png
- path: output/proteus/Celltype.proteus.normalizeMedian.normalized_proteingroups.rds
- path: output/proteus/Celltype.proteus.normalizeMedian.normalized_proteingroups_tab.tsv
md5sum: 07290a3ccd10019fb4e147f805b3e279
md5sum: 408db435ce25eef98b82b17c9515c7cb
- path: output/proteus/Celltype.proteus.normalizeQuantiles.normalized_dendrogram.png
- path: output/proteus/Celltype.proteus.normalizeQuantiles.normalized_distributions.png
- path: output/proteus/Celltype.proteus.normalizeQuantiles.normalized_mean_variance_relationship.png
- path: output/proteus/Celltype.proteus.normalizeQuantiles.normalized_proteingroups.rds
- path: output/proteus/Celltype.proteus.normalizeQuantiles.normalized_proteingroups_tab.tsv
md5sum: 590dd593bb00617254964da4adfcffd9
md5sum: 4a0a74febfc6ba921210f465e890ff5b
- path: output/proteus/Celltype.proteus.raw_distributions.png
- path: output/proteus/Celltype.proteus.raw_proteingroups.rds
- path: output/proteus/Celltype.proteus.raw_proteingroups_tab.tsv
md5sum: a0943baaa48ea76bdb8c80a580dc9953
md5sum: af7a556997b82f4ba38bfae8a6b91301
- path: output/proteus/R_sessionInfo.log
contains: ["proteus_0.2.16", "plotly_4.10.2", "ggplot2_3.4.2", "limma_3.54.0 "]
- path: output/proteus/versions.yml
4 changes: 2 additions & 2 deletions tests/modules/nf-core/shinyngs/app/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- path: output/shinyngs/SRP254919/app.R
md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a
- path: output/shinyngs/SRP254919/data.rds
md5sum: e44dcb923603fae634687219e086b4af
md5sum: d6772b22b6e4708ae610fb9ad0b09db0
- path: output/shinyngs/versions.yml

- name: shinyngs app test_shinyngs_app_single_matrix
Expand All @@ -19,5 +19,5 @@
- path: output/shinyngs/SRP254919/app.R
md5sum: bedcfc45b6cdcc2b8fe3627987e2b17a
- path: output/shinyngs/SRP254919/data.rds
md5sum: 40935136af5264cebd85e6d63c95b5f9
md5sum: 2a8c07908642e5273d03e922f4ac56fc
- path: output/shinyngs/versions.yml
3 changes: 2 additions & 1 deletion tests/modules/nf-core/shinyngs/staticdifferential/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@
- shinyngs
files:
- path: output/shinyngs/hND6_vs_mCherry_test/html/volcano.html
contains: ["-4.0303380084,-0.0628302706,-0.3602268157,-0.6082456431", "higher in mCherry"]
contains:
["-4.0303380084000002,-0.062830270600000002,-0.36022681569999998,-0.60824564309999996", "higher in mCherry"]
- path: output/shinyngs/hND6_vs_mCherry_test/png/volcano.png
11 changes: 11 additions & 0 deletions tests/modules/nf-core/shinyngs/staticexploratory/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ workflow test_shinyngs_staticexploratory {
)
}

workflow test_shinyngs_staticexploratory_specify_log {

expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true)
expression_feature_meta = file(params.test_data['mus_musculus']['genome']['rnaseq_genemeta'], checkIfExists: true)
expression_matrix_file = file(params.test_data['mus_musculus']['genome']['rnaseq_matrix'], checkIfExists: true)

SHINYNGS_STATICEXPLORATORY (
[ [ "id":"treatment" ], expression_sample_sheet, expression_feature_meta, [ expression_matrix_file ] ],
)
}

workflow test_shinyngs_staticexploratory_html {

expression_sample_sheet = file(params.test_data['mus_musculus']['genome']['rnaseq_samplesheet'], checkIfExists: true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: 'test_shinyngs_staticexploratory_specify_log:SHINYNGS_STATICEXPLORATORY' {
ext.args = { "--log2_assays '1'" }
}

withName: 'test_shinyngs_staticexploratory_html:SHINYNGS_STATICEXPLORATORY' {
ext.args = { "--write_html" }
}
}
}
17 changes: 15 additions & 2 deletions tests/modules/nf-core/shinyngs/staticexploratory/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
- path: output/shinyngs/treatment/png/pca3d.png
- path: output/shinyngs/treatment/png/sample_dendrogram.png

- name: shinyngs staticexploratory test_shinyngs_staticexploratory_specify_log
command: nextflow run ./tests/modules/nf-core/shinyngs/staticexploratory -entry test_shinyngs_staticexploratory_specify_log -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config
tags:
- shinyngs/staticexploratory
- shinyngs
files:
- path: output/shinyngs/treatment/png/boxplot.png
- path: output/shinyngs/treatment/png/density.png
- path: output/shinyngs/treatment/png/mad_correlation.png
- path: output/shinyngs/treatment/png/pca2d.png
- path: output/shinyngs/treatment/png/pca3d.png
- path: output/shinyngs/treatment/png/sample_dendrogram.png

- name: shinyngs staticexploratory test_shinyngs_staticexploratory_html
command: nextflow run ./tests/modules/nf-core/shinyngs/staticexploratory -entry test_shinyngs_staticexploratory_html -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/shinyngs/staticexploratory/nextflow.config
tags:
Expand All @@ -20,9 +33,9 @@
- path: output/shinyngs/treatment/html/boxplot.html
contains: ["SRX8042381", ' ENSMUSG00000027456","Gm37080']
- path: output/shinyngs/treatment/html/density.html
contains: ["4.34767786283394,4.38328343135943,4.41888899988492"]
contains: ["4.3476778628339403,4.3832834313594287,4.4188889998849188"]
- path: output/shinyngs/treatment/html/mad_correlation.html
contains: ["0,-0.742952800676994,0.674490759476595,-0.674490759476595"]
contains: ["0,-0.74295280067699376,0.67449075947659531,-0.6744907594765952"]
- path: output/shinyngs/treatment/html/pca2d.html
contains: ['SRX8042381","SRX8042382']
- path: output/shinyngs/treatment/html/pca3d.html
Expand Down

0 comments on commit 707c31e

Please sign in to comment.