2021-02-17 17:19:47 +00:00
|
|
|
process SEQWISH_INDUCE {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
2022-09-26 16:01:21 +00:00
|
|
|
conda (params.enable_conda ? 'bioconda::seqwish=0.7.6' : null)
|
|
|
|
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-09-26 16:01:21 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/seqwish:0.7.6--h5b5514e_1' :
|
|
|
|
'quay.io/biocontainers/seqwish:0.7.6--h5b5514e_1' }"
|
2021-02-17 17:19:47 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(paf), path(fasta)
|
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("*.gfa"), emit: gfa
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-02-17 17:19:47 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-17 17:19:47 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 12:39:55 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2022-09-26 16:01:21 +00:00
|
|
|
def input = paf.join(',') // this ensures that we can actually input a
|
|
|
|
// comma-separated list of PAF files as required by
|
|
|
|
// https://github.com/nf-core/pangenome. If one wants to use this,
|
|
|
|
// ensure that you put a ".collect()" behind your channel.
|
|
|
|
// See https://github.com/nf-core/pangenome/blob/34149c6cdc19bce3a7b99f97c769d8986a8d429b/main.nf#L543
|
|
|
|
// for an example.
|
2021-02-17 17:19:47 +00:00
|
|
|
"""
|
|
|
|
seqwish \\
|
|
|
|
--threads $task.cpus \\
|
2022-09-26 16:01:21 +00:00
|
|
|
--paf-alns=$input \\
|
2021-02-17 17:19:47 +00:00
|
|
|
--seqs=$fasta \\
|
|
|
|
--gfa=${prefix}.gfa \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args
|
2021-02-17 17:19:47 +00:00
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
2022-09-26 16:01:21 +00:00
|
|
|
seqwish: \$(echo \$(seqwish --version 2>&1) | cut -f 1 -d '-' | cut -f 2 -d 'v')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-02-17 17:19:47 +00:00
|
|
|
"""
|
|
|
|
}
|