feat: Initialize preseq c_curve

This commit is contained in:
Edmund Miller 2022-02-17 22:53:51 -06:00
parent 657092db95
commit 4ba9f20527
No known key found for this signature in database
GPG key ID: BD387FF7BC10AA9D
6 changed files with 142 additions and 0 deletions

View 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: ccurve
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
"""
}

View file

@ -0,0 +1,47 @@
name: preseq_ccurve
## TODO nf-core: Add a description of the module and list keywords
description: write your description here
keywords:
- sort
tools:
- preseq:
## TODO nf-core: Add a description and other details for the software below
description: Software for predicting library complexity and genome coverage in high-throughput sequencing
homepage: None
documentation: None
tool_dev_url: None
doi: ""
licence: ['GPL']
## TODO nf-core: Add a description of all of the variables used as input
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
## TODO nf-core: Delete / customise this example input
- bam:
type: file
description: BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
## TODO nf-core: Add a description of all of the variables used as output
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"
## TODO nf-core: Delete / customise this example output
- bam:
type: file
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
authors:
- "@Emiller88"

View file

@ -1193,6 +1193,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/**

View 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 )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,21 @@
- name: preseq ccurve single-end
command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config
tags:
- preseq
- preseq/ccurve
files:
files:
- path: output/preseq/test.lc_extrap.txt
md5sum: 1fa5cdd601079329618f61660bee00de
- path: output/preseq/test.command.log
- name: preseq ccurve paired-end
command: nextflow run ./tests/modules/preseq/ccurve -entry test_preseq_ccurve -c ./tests/config/nextflow.config -c ./tests/modules/preseq/ccurve/nextflow.config
tags:
- preseq
- preseq/ccurve
files:
files:
- path: output/preseq/test.lc_extrap.txt
md5sum: 1fa5cdd601079329618f61660bee00de
- path: output/preseq/test.command.log