mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +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)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/preseq:3.1.2--h06ef8b0_1' :
|
||||
'quay.io/biocontainers/preseq:3.1.2--h06ef8b0_1' }"
|
||||
'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("*.ccurve.txt"), emit: ccurve
|
||||
tuple val(meta), path("*.log") , emit: log
|
||||
path "versions.yml" , emit: versions
|
||||
tuple val(meta), path("*.lc_extrap.txt"), emit: lc_extrap
|
||||
tuple val(meta), path("*.log") , emit: log
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
@ -28,7 +28,7 @@ process PRESEQ_LCEXTRAP {
|
|||
lc_extrap \\
|
||||
$args \\
|
||||
$paired_end \\
|
||||
-output ${prefix}.ccurve.txt \\
|
||||
-output ${prefix}.lc_extrap.txt \\
|
||||
$bam
|
||||
cp .command.err ${prefix}.command.log
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ tools:
|
|||
- preseq:
|
||||
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
|
||||
homepage: http://smithlabresearch.org/software/preseq/
|
||||
documentation: None
|
||||
tool_dev_url: None
|
||||
documentation: http://smithlabresearch.org/wp-content/uploads/manual.pdf
|
||||
tool_dev_url: https://github.com/smithlabcode/preseq
|
||||
doi: ""
|
||||
licence: ["GPL"]
|
||||
|
||||
|
@ -34,10 +34,10 @@ output:
|
|||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- ccurve:
|
||||
- lc_extrap:
|
||||
type: file
|
||||
description: File containing output of Preseq lcextrap
|
||||
pattern: "*.{ccurve.txt}"
|
||||
pattern: "*.{lc_extrap.txt}"
|
||||
- log:
|
||||
type: file
|
||||
description: Log file containing stderr produced by Preseq
|
||||
|
@ -45,3 +45,4 @@ output:
|
|||
|
||||
authors:
|
||||
- "@drpatelh"
|
||||
- "@Emiller88"
|
||||
|
|
|
@ -1367,6 +1367,10 @@ porechop:
|
|||
- modules/porechop/**
|
||||
- tests/modules/porechop/**
|
||||
|
||||
preseq/ccurve:
|
||||
- modules/preseq/ccurve/**
|
||||
- tests/modules/preseq/ccurve/**
|
||||
|
||||
preseq/lcextrap:
|
||||
- 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/lcextrap
|
||||
files:
|
||||
- path: output/preseq/test.ccurve.txt
|
||||
- path: output/preseq/test.lc_extrap.txt
|
||||
md5sum: 1fa5cdd601079329618f61660bee00de
|
||||
- path: output/preseq/test.command.log
|
||||
|
||||
|
@ -14,6 +14,6 @@
|
|||
- preseq
|
||||
- preseq/lcextrap
|
||||
files:
|
||||
- path: output/preseq/test.ccurve.txt
|
||||
- path: output/preseq/test.lc_extrap.txt
|
||||
md5sum: 10e5ea860e87fb6f5dc10f4f20c62040
|
||||
- path: output/preseq/test.command.log
|
||||
|
|
Loading…
Reference in a new issue