mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Split preseq lcextrap and ccurve (#1440)
* fix(preseq): Update lcextrap file name * chore(preseq): Bump lcextrap image * feat: Initialize preseq c_curve * docs(preseq): Update documentation
This commit is contained in:
parent
a066456735
commit
7111e571cc
9 changed files with 154 additions and 12 deletions
40
modules/preseq/ccurve/main.nf
Normal file
40
modules/preseq/ccurve/main.nf
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
process PRESEQ_CCURVE {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_medium'
|
||||||
|
label 'error_ignore'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2':
|
||||||
|
'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(bam)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.c_curve.txt"), emit: c_curve
|
||||||
|
tuple val(meta), path("*.log") , emit: log
|
||||||
|
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 paired_end = meta.single_end ? '' : '-pe'
|
||||||
|
"""
|
||||||
|
preseq \\
|
||||||
|
c_curve \\
|
||||||
|
$args \\
|
||||||
|
$paired_end \\
|
||||||
|
-output ${prefix}.c_curve.txt \\
|
||||||
|
$bam
|
||||||
|
cp .command.err ${prefix}.command.log
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
preseq: \$(echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//')
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
48
modules/preseq/ccurve/meta.yml
Normal file
48
modules/preseq/ccurve/meta.yml
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: preseq_ccurve
|
||||||
|
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
|
||||||
|
keywords:
|
||||||
|
- preseq
|
||||||
|
- library
|
||||||
|
- complexity
|
||||||
|
tools:
|
||||||
|
- preseq:
|
||||||
|
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
|
||||||
|
homepage: http://smithlabresearch.org/software/preseq/
|
||||||
|
documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf
|
||||||
|
tool_dev_url: https://github.com/smithlabcode/preseq
|
||||||
|
doi: ""
|
||||||
|
licence: ["GPL"]
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- bam:
|
||||||
|
type: file
|
||||||
|
description: BAM/CRAM/SAM file
|
||||||
|
pattern: "*.{bam,cram,sam}"
|
||||||
|
|
||||||
|
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"
|
||||||
|
- ccurve:
|
||||||
|
type: file
|
||||||
|
description: File containing output of Preseq c curve
|
||||||
|
pattern: "*.{c_curve.txt}"
|
||||||
|
- log:
|
||||||
|
type: file
|
||||||
|
description: Log file containing stderr produced by Preseq
|
||||||
|
pattern: "*.{log}"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@drpatelh"
|
||||||
|
- "@Emiller88"
|
|
@ -5,16 +5,16 @@ process PRESEQ_LCEXTRAP {
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null)
|
conda (params.enable_conda ? "bioconda::preseq=3.1.2" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h06ef8b0_1' :
|
'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h445547b_2':
|
||||||
'quay.io/biocontainers/preseq:3.1.2--h06ef8b0_1' }"
|
'quay.io/biocontainers/preseq:3.1.2--h445547b_2' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(bam)
|
tuple val(meta), path(bam)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*.ccurve.txt"), emit: ccurve
|
tuple val(meta), path("*.lc_extrap.txt"), emit: lc_extrap
|
||||||
tuple val(meta), path("*.log") , emit: log
|
tuple val(meta), path("*.log") , emit: log
|
||||||
path "versions.yml" , emit: versions
|
path "versions.yml" , emit: versions
|
||||||
|
|
||||||
when:
|
when:
|
||||||
task.ext.when == null || task.ext.when
|
task.ext.when == null || task.ext.when
|
||||||
|
@ -28,7 +28,7 @@ process PRESEQ_LCEXTRAP {
|
||||||
lc_extrap \\
|
lc_extrap \\
|
||||||
$args \\
|
$args \\
|
||||||
$paired_end \\
|
$paired_end \\
|
||||||
-output ${prefix}.ccurve.txt \\
|
-output ${prefix}.lc_extrap.txt \\
|
||||||
$bam
|
$bam
|
||||||
cp .command.err ${prefix}.command.log
|
cp .command.err ${prefix}.command.log
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,8 @@ tools:
|
||||||
- preseq:
|
- preseq:
|
||||||
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
|
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
|
||||||
homepage: http://smithlabresearch.org/software/preseq/
|
homepage: http://smithlabresearch.org/software/preseq/
|
||||||
documentation: None
|
documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf
|
||||||
tool_dev_url: None
|
tool_dev_url: https://github.com/smithlabcode/preseq
|
||||||
doi: ""
|
doi: ""
|
||||||
licence: ["GPL"]
|
licence: ["GPL"]
|
||||||
|
|
||||||
|
@ -34,10 +34,10 @@ output:
|
||||||
type: file
|
type: file
|
||||||
description: File containing software versions
|
description: File containing software versions
|
||||||
pattern: "versions.yml"
|
pattern: "versions.yml"
|
||||||
- ccurve:
|
- lc_extrap:
|
||||||
type: file
|
type: file
|
||||||
description: File containing output of Preseq lcextrap
|
description: File containing output of Preseq lcextrap
|
||||||
pattern: "*.{ccurve.txt}"
|
pattern: "*.{lc_extrap.txt}"
|
||||||
- log:
|
- log:
|
||||||
type: file
|
type: file
|
||||||
description: Log file containing stderr produced by Preseq
|
description: Log file containing stderr produced by Preseq
|
||||||
|
@ -45,3 +45,4 @@ output:
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- "@drpatelh"
|
- "@drpatelh"
|
||||||
|
- "@Emiller88"
|
||||||
|
|
|
@ -1367,6 +1367,10 @@ porechop:
|
||||||
- modules/porechop/**
|
- modules/porechop/**
|
||||||
- tests/modules/porechop/**
|
- tests/modules/porechop/**
|
||||||
|
|
||||||
|
preseq/ccurve:
|
||||||
|
- modules/preseq/ccurve/**
|
||||||
|
- tests/modules/preseq/ccurve/**
|
||||||
|
|
||||||
preseq/lcextrap:
|
preseq/lcextrap:
|
||||||
- modules/preseq/lcextrap/**
|
- modules/preseq/lcextrap/**
|
||||||
- tests/modules/preseq/lcextrap/**
|
- tests/modules/preseq/lcextrap/**
|
||||||
|
|
25
tests/modules/preseq/ccurve/main.nf
Normal file
25
tests/modules/preseq/ccurve/main.nf
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { PRESEQ_CCURVE } from '../../../../modules/preseq/ccurve/main.nf'
|
||||||
|
|
||||||
|
workflow test_preseq_ccurve_single_end {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
PRESEQ_CCURVE ( input )
|
||||||
|
}
|
||||||
|
|
||||||
|
workflow test_preseq_ccurve_paired_end {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['sarscov2']['illumina']['test_paired_end_bam'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
PRESEQ_CCURVE ( input )
|
||||||
|
}
|
5
tests/modules/preseq/ccurve/nextflow.config
Normal file
5
tests/modules/preseq/ccurve/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
19
tests/modules/preseq/ccurve/test.yml
Normal file
19
tests/modules/preseq/ccurve/test.yml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
- name: preseq ccurve single-end
|
||||||
|
command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve_single_end -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config
|
||||||
|
tags:
|
||||||
|
- preseq
|
||||||
|
- preseq/ccurve
|
||||||
|
files:
|
||||||
|
- path: output/preseq/test.c_curve.txt
|
||||||
|
md5sum: cf4743abdd355595d6ec1fb3f38e66e5
|
||||||
|
- path: output/preseq/test.command.log
|
||||||
|
|
||||||
|
- name: preseq ccurve paired-end
|
||||||
|
command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config
|
||||||
|
tags:
|
||||||
|
- preseq
|
||||||
|
- preseq/ccurve
|
||||||
|
files:
|
||||||
|
- path: output/preseq/test.c_curve.txt
|
||||||
|
md5sum: cf4743abdd355595d6ec1fb3f38e66e5
|
||||||
|
- path: output/preseq/test.command.log
|
|
@ -4,7 +4,7 @@
|
||||||
- preseq
|
- preseq
|
||||||
- preseq/lcextrap
|
- preseq/lcextrap
|
||||||
files:
|
files:
|
||||||
- path: output/preseq/test.ccurve.txt
|
- path: output/preseq/test.lc_extrap.txt
|
||||||
md5sum: 1fa5cdd601079329618f61660bee00de
|
md5sum: 1fa5cdd601079329618f61660bee00de
|
||||||
- path: output/preseq/test.command.log
|
- path: output/preseq/test.command.log
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@
|
||||||
- preseq
|
- preseq
|
||||||
- preseq/lcextrap
|
- preseq/lcextrap
|
||||||
files:
|
files:
|
||||||
- path: output/preseq/test.ccurve.txt
|
- path: output/preseq/test.lc_extrap.txt
|
||||||
md5sum: 10e5ea860e87fb6f5dc10f4f20c62040
|
md5sum: 10e5ea860e87fb6f5dc10f4f20c62040
|
||||||
- path: output/preseq/test.command.log
|
- path: output/preseq/test.command.log
|
||||||
|
|
Loading…
Reference in a new issue