forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add module nanofilt * Add module nanofilt with corrections in meta.yaml and main.nf * Add reviewer suggestions * Add last changes of review
- Loading branch information
1 parent
31aaed8
commit 5f82e67
Showing
6 changed files
with
212 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "nanofilt" | ||
channels: | ||
- conda-forge | ||
- bioconda | ||
- defaults | ||
dependencies: | ||
- "bioconda::nanofilt=2.8.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
process NANOFILT { | ||
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/nanofilt:2.8.0--py_0': | ||
'biocontainers/nanofilt:2.8.0--py_0' }" | ||
|
||
input: | ||
tuple val(meta), path(reads) | ||
path summary_file | ||
|
||
output: | ||
tuple val(meta), path("*.fastq.gz"), emit: filtreads | ||
path "*.log" , optional: true, emit: log_file | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "filtered_${meta.id}" | ||
def sum = summary_file ? "--summary ${summary_file}" : '' | ||
""" | ||
gunzip \\ | ||
-c $reads \\ | ||
| NanoFilt \\ | ||
$sum \\ | ||
$args \\ | ||
| gzip > ${prefix}.fastq.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
nanofilt: \$(NanoFilt -v | sed 's/NanoFilt //') | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "filtered_${meta.id}" | ||
def sum = summary_file ? "--summary ${summary_file}" : '' | ||
""" | ||
touch ${prefix}.fastq.gz | ||
touch ${prefix}.log | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
nanofilt: \$(NanoFilt -v | sed 's/NanoFilt //') | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
name: "nanofilt" | ||
description: Filtering and trimming of Oxford Nanopore Sequencing data | ||
keywords: | ||
- nanopore | ||
- filtering | ||
- QC | ||
tools: | ||
- "nanofilt": | ||
description: "Filtering and trimming of Oxford Nanopore Sequencing data" | ||
homepage: "https://github.com/wdecoster/nanofilt" | ||
documentation: "https://github.com/wdecoster/nanofilt" | ||
tool_dev_url: "https://github.com/wdecoster/nanofilt" | ||
doi: "10.1093/bioinformatics/bty149" | ||
licence: ["GLP-3.0"] | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- reads: | ||
type: file | ||
description: Gunziped fastq files from Oxford Nanopore sequencing. | ||
pattern: "*.fastq.gz" | ||
|
||
- summary_file: | ||
type: file | ||
description: Optional - Albacore or guppy summary file for quality scores | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'sample1', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
- filtreads: | ||
type: file | ||
description: Gunziped fastq files after filtering. | ||
pattern: "*.fastq.gz" | ||
|
||
- log_file: | ||
type: file | ||
description: Log file generated by --logfile option in NanoFilt, the file must end with .log extension. | ||
pattern: "*.log" | ||
|
||
authors: | ||
- "@lfreitasl" | ||
maintainers: | ||
- "@lfreitasl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process NANOFILT" | ||
script "../main.nf" | ||
process "NANOFILT" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "nanofilt" | ||
|
||
test("sarscov2 - fastq") { | ||
|
||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.versions).match() } | ||
|
||
) | ||
} | ||
|
||
} | ||
|
||
|
||
test("sarscov2 - fastq - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test'], // meta map | ||
file(params.test_data['sarscov2']['nanopore']['test_fastq_gz'], checkIfExists: true) | ||
] | ||
input[1] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.versions).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nanofilt: | ||
- "modules/nf-core/nanofilt/**" |