Skip to content
Merged
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
33 changes: 33 additions & 0 deletions modules/fq/lint/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
process FQ_LINT {
tag "$meta.id"
label 'process_low'

conda (params.enable_conda ? "bioconda::fq=0.9.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/fq:0.9.1--h9ee0642_0':
'quay.io/biocontainers/fq:0.9.1--h9ee0642_0' }"

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

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
fq: \$(echo \$(fq lint --version | sed 's/fq-lint //g'))
END_VERSIONS
"""
}
32 changes: 32 additions & 0 deletions modules/fq/lint/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "fq_lint"
description: write your description here
keywords:
- sort
tools:
- "fq":
description: "fq is a library to generate and validate FASTQ file pairs."
homepage: "https://github.com/stjude-rust-labs/fq"
documentation: "https://github.com/stjude-rust-labs/fq"
tool_dev_url: "https://github.com/stjude-rust-labs/fq"
doi: ""
licence: "['MIT']"

input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fastq:
type: file
description: FASTQ file list
pattern: "*.fastq{,.gz}"

output:
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"

authors:
- "@adamrtalbot"
12 changes: 8 additions & 4 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ flye:
- modules/flye/**
- tests/modules/flye/**

fq/lint:
- modules/fq/lint/**
- tests/modules/fq/lint/**

freebayes:
- modules/freebayes/**
- tests/modules/freebayes/**
Expand Down Expand Up @@ -2223,10 +2227,6 @@ trimmomatic:
- modules/trimmomatic/**
- tests/modules/trimmomatic/**

ucsc/bedtobigbed:
- modules/ucsc/bedtobigbed/**
- tests/modules/ucsc/bedtobigbed/**

ucsc/bedclip:
- modules/ucsc/bedclip/**
- tests/modules/ucsc/bedclip/**
Expand All @@ -2235,6 +2235,10 @@ ucsc/bedgraphtobigwig:
- modules/ucsc/bedgraphtobigwig/**
- tests/modules/ucsc/bedgraphtobigwig/**

ucsc/bedtobigbed:
- modules/ucsc/bedtobigbed/**
- tests/modules/ucsc/bedtobigbed/**

ucsc/bigwigaverageoverbed:
- modules/ucsc/bigwigaverageoverbed/**
- tests/modules/ucsc/bigwigaverageoverbed/**
Expand Down
31 changes: 31 additions & 0 deletions tests/modules/fq/lint/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env nextflow

nextflow.enable.dsl = 2

include { FQ_LINT } from '../../../../modules/fq/lint/main.nf'

workflow test_fq_lint_success {

input = [
[ id:'test', single_end:false ], // meta map
[
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true)
]
]

FQ_LINT ( input )
}

workflow test_fq_lint_fail {

input = [
[ id:'test', single_end:false ], // meta map
[
file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true),
file(params.test_data['candidatus_portiera_aleyrodidarum']['illumina']['test_2_fastq_gz'], checkIfExists: true)
]
]

FQ_LINT ( input )
}
5 changes: 5 additions & 0 deletions tests/modules/fq/lint/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {

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

}
18 changes: 18 additions & 0 deletions tests/modules/fq/lint/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- name: fq lint test_fq_lint_success
command: nextflow run ./tests/modules/fq/lint -entry test_fq_lint_success -c ./tests/config/nextflow.config -c ./tests/modules/fq/lint/nextflow.config
tags:
- fq
- fq/lint
files:
- path: output/fq/test.fq_lint.txt
contains:
- "fq-lint start"
- "read 100 records"
- "fq-lint end"

- name: fq lint test_fq_lint_fail
command: nextflow run ./tests/modules/fq/lint -entry test_fq_lint_fail -c ./tests/config/nextflow.config -c ./tests/modules/fq/lint/nextflow.config
tags:
- fq
- fq/lint
exit_code: 1