Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/nf-core/seqfu/check/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::seqfu=1.22.3
48 changes: 48 additions & 0 deletions modules/nf-core/seqfu/check/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
process SEQFU_CHECK {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/seqfu:1.22.3--hc29b5fc_1':
'biocontainers/seqfu:1.22.3--hc29b5fc_1' }"

input:
tuple val(meta), path(fastq)

output:
tuple val(meta), path("*.tsv") , emit: check
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}"
"""
seqfu \\
check \\
$args \\
$fastq > ${prefix}.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
seqfu: \$(seqfu version)
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo $args

touch ${prefix}.tsv

cat <<-END_VERSIONS > versions.yml
"${task.process}":
seqfu: \$(seqfu version)
END_VERSIONS
"""
}
52 changes: 52 additions & 0 deletions modules/nf-core/seqfu/check/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "seqfu_check"
description: "Evaluates the integrity of DNA FASTQ files."
keywords:
- check
- fastq
- fasta
- qc
- format
tools:
- "seqfu":
description: "DNA sequence utilities for FASTX files"
homepage: "https://telatin.github.io/seqfu2/"
documentation: "https://telatin.github.io/seqfu2/"
tool_dev_url: "https://telatin.github.io/seqfu2/tools/check.html"
doi: "10.3390/bioengineering8050059"
licence: ["GPL v3"]
identifier: biotools:seqfu

input:
- - meta:
type: map
description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]`
- fastas:
type: file
description: Input files (mainly FASTA, FASTQ supported)
pattern: "*.{fq,fastq}[.gz]"
ontologies:
- edam: http://edamontology.org/format_2545 # FASTQ-like
output:
dna_sequence:
- - meta:
type: map
description: Groovy Map containing sample information. e.g. `[ id:'sample1' ]`
- '*.{tsv}':
type: file
description: Output table (TSV format)
pattern: '*.{tsv}'
ontologies:
- edam: http://edamontology.org/format_3475 # TSV

versions:
- versions.yml:
type: file
description: File containing software versions
pattern: versions.yml
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
authors:
- "@georgette-femerling"
maintainers:
- "@georgette-femerling"
74 changes: 74 additions & 0 deletions modules/nf-core/seqfu/check/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// TODO nf-core: Once you have added the required tests, please run the following command to build this file:
// nf-core modules test seqfu/check
nextflow_process {

name "Test Process SEQFU_CHECK"
script "../main.nf"
process "SEQFU_CHECK"

tag "modules"
tag "modules_nfcore"
tag "seqfu"
tag "seqfu/check"

// TODO nf-core: Change the test name preferably indicating the test-data and file-format used
test("sarscov2 - bam") {

// TODO nf-core: If you are created a test for a chained module
// (the module requires running more than one process to generate the required output)
// add the 'setup' method here.
// You can find more information about how to use a 'setup' method in the docs (https://nf-co.re/docs/contributing/modules#steps-for-creating-nf-test-for-chained-modules).

when {
process {
"""
// TODO nf-core: define inputs of the process here. Example:

input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
//TODO nf-core: Add all required assertions to verify the test output.
// See https://nf-co.re/docs/contributing/tutorials/nf-test_assertions for more information and examples.
)
}

}

// TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix.
test("sarscov2 - bam - stub") {

options "-stub"

when {
process {
"""
// TODO nf-core: define inputs of the process here. Example:

input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
//TODO nf-core: Add all required assertions to verify the test output.
)
}

}

}