-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ngmerge first commit * main module code * complete module * remove trailing whitespace * fix versions.yml * fix version yml * versions yml * vyml * try vyml again * touch versions yml * vyml
- Loading branch information
1 parent
ae5b64c
commit 11fab33
Showing
6 changed files
with
137 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,52 @@ | ||
process NGMERGE { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "bioconda::ngmerge=0.3" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/ngmerge:0.3--ha92aebf_1': | ||
'biocontainers/ngmerge:0.3--ha92aebf_1' }" | ||
|
||
input: | ||
tuple val(meta), path(reads1), path(reads2) | ||
|
||
output: | ||
tuple val(meta), path("*.merged.fq.gz"), emit: merged_reads | ||
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}" | ||
|
||
""" | ||
NGmerge \\ | ||
-1 $reads1 \\ | ||
-2 $reads2 \\ | ||
-o ${prefix}.merged.fq.gz \\ | ||
-z \\ | ||
-n $task.cpus \\ | ||
$args | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
NGmerge: \$(echo \$(NGmerge --version 2>&1) | sed 's/^.*NGmerge, version //; s/ Copyright.*// ; s/: //g' )) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
|
||
""" | ||
touch ${prefix}.merged.fq.gz | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
NGmerge: \$(echo \$(NGmerge --version 2>&1) | sed 's/^.*NGmerge, version //; s/ Copyright.*// ; s/: //g' )) | ||
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,54 @@ | ||
--- | ||
name: "ngmerge" | ||
|
||
description: Merging paired-end reads and removing sequencing adapters. | ||
keywords: | ||
- sort | ||
- reads merging | ||
- merge mate pairs | ||
tools: | ||
- "ngmerge": | ||
description: "Merging paired-end reads and removing sequencing adapters." | ||
homepage: "https://github.com/jsh58/NGmerge" | ||
documentation: "https://github.com/jsh58/NGmerge" | ||
tool_dev_url: "https://github.com/jsh58/NGmerge" | ||
doi: "10.1186/s12859-018-2579-2" | ||
licence: "['MIT']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- reads1: | ||
type: file | ||
description: fastq file paired end read 1 | ||
pattern: "*.{fa,fasta,fastq,fq,fa.gz,fasta.gz,fastq.gz,fq.gz}" | ||
|
||
- reads2: | ||
type: file | ||
description: fastq file paired end read 2 | ||
pattern: "*.{fa,fasta,fastq,fq,fa.gz,fasta.gz,fastq.gz,fq.gz}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test', single_end:false ]` | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
- merged_reads: | ||
type: file | ||
description: fastq file paired end read 2 | ||
pattern: "*.{fa,fasta,fastq,fq,fa.gz,fasta.gz,fastq.gz,fq.gz}" | ||
|
||
authors: | ||
- "@charlotteanne" | ||
- "@jsh58" |
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
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,15 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { NGMERGE } from '../../../../modules/nf-core/ngmerge/main.nf' | ||
|
||
workflow test_ngmerge { | ||
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)] | ||
] | ||
|
||
NGMERGE ( input ) | ||
} |
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,5 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
} |
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,7 @@ | ||
- name: ngmerge test_ngmerge | ||
command: nextflow run ./tests/modules/nf-core/ngmerge -entry test_ngmerge -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/ngmerge/nextflow.config | ||
tags: | ||
- ngmerge | ||
files: | ||
- path: output/ngmerge/test.merged.fq.gz | ||
- path: output/ngmerge/versions.yml |