-
Notifications
You must be signed in to change notification settings - Fork 735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added new module for Toulligqc #5131
Changes from 21 commits
54d98e9
f8b0e5e
d2f56a1
06bab25
85f8598
c09b0a8
fc83273
1b07601
d3e6d86
8f78d86
4310cd3
f8e3db5
67eaf13
f891afb
f2bc6d1
939aa63
2190de6
486a54c
4557e5d
c5f24db
8680dc5
9bbc2b7
2281f51
efdd607
d61ddd9
c64f776
47eb172
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
name: "toulligqc" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::toulligqc=2.5.4" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
process TOULLIGQC { | ||
label 'process_low' | ||
tag "$meta.id" | ||
|
||
conda "${moduleDir}/environment.yml" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/toulligqc:2.5.4--pyhdfd78af_0': | ||
'biocontainers/toulligqc:2.5.4--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(seq_summary) | ||
tuple val(meta), path(fastq) | ||
tuple val(meta), path(bam) | ||
|
||
output: | ||
tuple val(meta), path("*/*.data") , emit: report_data | ||
path "*/*.html" , emit: report_html, optional: true | ||
path "*/images/*.html" , emit: plots_html | ||
path "*/images/plotly.min.js" , emit: plotly_js | ||
|
||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
def seq_summary_input = seq_summary ? "--sequencing-summary-source ${seq_summary}" : "" | ||
jfy133 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
def fastq_input = fastq ? "--fastq ${fastq}" : "" | ||
def bam_input = bam ? "--bam ${bam}" : "" | ||
|
||
""" | ||
toulligqc ${seq_summary_input} \\ | ||
${fastq_input} \\ | ||
${bam_input} \\ | ||
$args | ||
|
||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
toulligqc: \$(toulligqc --version 2>&1) | ||
END_VERSIONS | ||
Salome-Brunon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "toulligqc" | ||
description: "A post sequencing QC tool for Oxford Nanopore sequencers" | ||
keywords: | ||
- nanopore sequencing | ||
- quality control | ||
- genomics | ||
tools: | ||
- "toulligqc": | ||
description: "A post sequencing QC tool for Oxford Nanopore sequencers" | ||
homepage: https://github.com/GenomiqueENS/toulligQC | ||
documentation: https://github.com/GenomiqueENS/toulligQC | ||
tool_dev_url: https://github.com/GenomiqueENS/toulligQC | ||
licence: ["CECILL-2.1"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- seq_summary: | ||
type: file | ||
description: Basecaller sequencing summary source | ||
pattern: "*.txt" | ||
- fastq: | ||
type: file | ||
description: FASTQ file (necessary if no sequencing summary file) | ||
pattern: "*.{fq,fastq,fq.gz,fastq.gz}" | ||
- bam: | ||
type: file | ||
description: BAM file (necessary if no sequencing summary file) | ||
pattern: "*.bam" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- report_data: | ||
type: file | ||
description: Report data emitted from toulligqc | ||
pattern: "*.data" | ||
- report_html: | ||
type: file | ||
description: Report data in html format | ||
pattern: "*.html" | ||
- plots_html: | ||
type: file | ||
description: Plots emitted in html format | ||
pattern: "*.html" | ||
- plotly_js: | ||
type: file | ||
description: Plots emitted from toulligqc | ||
pattern: "plotly.min.js" | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@Salome-Brunon" | ||
maintainers: | ||
- "@Salome-Brunon" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
nextflow_process { | ||
|
||
name "Test Process TOULLIGQC" | ||
script "../main.nf" | ||
process "TOULLIGQC" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "toulligqc" | ||
|
||
test("sarscov2 - nanopore sequencing_summary") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['nanopore']['test2_sequencing_summary'], checkIfExists: true) | ||
] | ||
input[1] = [ | ||
Salome-Brunon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
[], | ||
[] | ||
] | ||
input[2] = [ | ||
[], | ||
[] | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..74]).match() }, | ||
{ assert process.out.report_html[0] ==~ ".*/report.html"} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - nanopore fastq") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[], | ||
[] | ||
] | ||
input[1] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[], | ||
[] | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..67]).match() }, | ||
{ assert process.out.report_html[0] ==~ ".*/report.html"} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - nanopore bam") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add one test with all three if they are not mutually exclusive There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can do but I will need to upload new data to the nf-core/tets-datasets repo as I don't think the sequencing summary, FASTQ and BAM files come from the same run.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok, that would be a bit awkward... maybe you could do a local test and otherwise I avert my eyes ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay thank you! I'll do a local test this afternoon and will let you know the outcome :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[], | ||
[] | ||
] | ||
input[1] = [ | ||
[], | ||
[] | ||
] | ||
input[2] = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['nanopore']['test_sorted_bam'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.report_data.get(0).get(1)).readLines()[11..74]).match() }, | ||
{ assert process.out.report_html[0] ==~ ".*/report.html"} | ||
) | ||
} | ||
|
||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.