mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Add preseq
This commit is contained in:
parent
e94676a2b2
commit
71d7aecf74
2 changed files with 43 additions and 0 deletions
1
software/preseq/lcextrap/functions.nf
Symbolic link
1
software/preseq/lcextrap/functions.nf
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../lib/functions.nf
|
42
software/preseq/lcextrap/main.nf
Normal file
42
software/preseq/lcextrap/main.nf
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Import generic module functions
|
||||
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
||||
|
||||
process PRESEQ_LCEXTRAP {
|
||||
tag "$meta.id"
|
||||
label 'process_medium'
|
||||
label 'error_ignore'
|
||||
publishDir "${params.outdir}",
|
||||
mode: params.publish_dir_mode,
|
||||
saveAs: { filename -> saveFiles(filename:filename, options:options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
|
||||
|
||||
container "quay.io/biocontainers/preseq:2.0.3--hf53bd2b_3"
|
||||
//container "https://depot.galaxyproject.org/singularity/preseq:2.0.3--hf53bd2b_3"
|
||||
|
||||
conda (params.conda ? "bioconda::preseq=2.0.3" : null)
|
||||
|
||||
input:
|
||||
tuple val(meta), path(bam)
|
||||
val options
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.ccurve.txt"), emit: ccurve
|
||||
tuple val(meta), path("*.log"), emit: log
|
||||
path "*.version.txt", emit: version
|
||||
|
||||
script:
|
||||
def software = getSoftwareName(task.process)
|
||||
def ioptions = initOptions(options)
|
||||
def prefix = ioptions.suffix ? "${meta.id}${ioptions.suffix}" : "${meta.id}"
|
||||
def pe = meta.single_end ? '' : '-pe'
|
||||
"""
|
||||
preseq \\
|
||||
lc_extrap \\
|
||||
$ioptions.args \\
|
||||
$pe \\
|
||||
-output ${prefix}.ccurve.txt \\
|
||||
$bam
|
||||
cp .command.err ${prefix}.command.log
|
||||
|
||||
echo \$(preseq 2>&1) | sed 's/^.*Version: //; s/Usage:.*\$//' > ${software}.version.txt
|
||||
"""
|
||||
}
|
Loading…
Reference in a new issue