2021-10-07 09:06:02 +00:00
|
|
|
// Import generic module functions
|
|
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
|
|
|
|
params.options = [:]
|
|
|
|
options = initOptions(params.options)
|
|
|
|
|
|
|
|
process ISOSEQ3_CLUSTER {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
publishDir "${params.outdir}",
|
|
|
|
mode: params.publish_dir_mode,
|
|
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::isoseq3=3.4.0" : null)
|
|
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
|
|
container "https://depot.galaxyproject.org/singularity/isoseq3:3.4.0--0"
|
|
|
|
} else {
|
|
|
|
container "quay.io/biocontainers/isoseq3:3.4.0--0"
|
|
|
|
}
|
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(bam)
|
|
|
|
|
|
|
|
output:
|
2021-10-14 10:07:53 +00:00
|
|
|
tuple val(meta), path("*.transcripts.bam") , emit: bam
|
|
|
|
tuple val(meta), path("*.transcripts.bam.pbi") , emit: pbi
|
|
|
|
tuple val(meta), path("*.transcripts.cluster") , emit: cluster
|
|
|
|
tuple val(meta), path("*.transcripts.cluster_report.csv"), emit: cluster_report
|
|
|
|
tuple val(meta), path("*.transcripts.transcriptset.xml") , emit: transcriptset
|
|
|
|
path "versions.yml" , emit: versions
|
|
|
|
|
|
|
|
tuple val(meta), path("*.transcripts.hq.bam") , optional: true, emit: hq_bam
|
|
|
|
tuple val(meta), path("*.transcripts.hq.bam.pbi") , optional: true, emit: hq_pbi
|
|
|
|
tuple val(meta), path("*.transcripts.lq.bam") , optional: true, emit: lq_bam
|
|
|
|
tuple val(meta), path("*.transcripts.lq.bam.pbi") , optional: true, emit: lq_pbi
|
|
|
|
tuple val(meta), path("*.transcripts.singletons.bam") , optional: true, emit: singletons_bam
|
|
|
|
tuple val(meta), path("*.transcripts.singletons.bam.pbi"), optional: true, emit: singletons_pbi
|
|
|
|
|
2021-10-07 09:06:02 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
|
|
"""
|
|
|
|
isoseq3 \\
|
|
|
|
cluster \\
|
|
|
|
$bam \\
|
2021-10-14 10:07:53 +00:00
|
|
|
${prefix}.transcripts.bam \\
|
2021-10-07 09:06:02 +00:00
|
|
|
$options.args
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
${getProcessName(task.process)}:
|
|
|
|
isoseq3 cluster: \$( isoseq3 cluster --version|sed 's/isoseq cluster //g'|sed 's/ (.*//g' )
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|