nf-core_modules/modules/isoseq3/cluster/main.nf

54 lines
2.1 KiB
Text
Raw Normal View History

New module: `isoseq3/cluster` (#801) * 📦 NEW: Add isoseq3/cluster module * 🐛FIX: Fix reports channel and add .pbi to it * 🐛FIX: Fix report channel definition * 👌IMPROVE: Move .pbi file into reports channel * 👌IMPROVE: remove --use_qvs option from command line * 👌 IMPROVE: Add in addParams removed options from command line * 👌 IMPROVE: Add some pacbio test files * 🐛 FIX: Add Pacbio index to test_data.config * 👌 IMPROVE: Re add 10000 data test * 👌 IMPROVE: Add some pbindex * 🐛 FIX: Add pbi extension to files * 👌 IMPROVE: The module accept one channel (primers moved into the first channel) * 📦 NEW: Add galgal6 chr30 test data * 📦 NEW: Add bamtools module * 👌 IMPROVE: Ignore test data * 👌 IMPROVE: Update to last templates version * 👌 IMPROVE: Update to last templates version * 👌 IMPROVE: add singletons parameter and improve outputs * 🐛 FIX: Update test with last module model * 👌 IMPROVE: Add test tag * 👌 IMPROVE: Update module to last template version * 👌 IMPROVE: Update module to last template version * 👌 IMPROVE: Update test data config * 👌 IMPROVE: Remove pbi from input files * 👌 IMPROVE: Remove unused index * 👌 IMPROVE: Final version of test datasets config * 👌 IMPROVE: Final version of test datasets config * 👌 IMPROVE: Remove useless index + Fix Typos * 👌 IMPROVE: Remove useless index + Fix Typos * 👌 IMPROVE: Fill contains args * 📦 NEW: Add isoseq3/cluster module * 🐛FIX: Fix reports channel and add .pbi to it * 🐛FIX: Fix report channel definition * 👌IMPROVE: Move .pbi file into reports channel * 👌IMPROVE: remove --use_qvs option from command line * 👌 IMPROVE: Add in addParams removed options from command line * 👌 IMPROVE: Add some pacbio test files * 🐛 FIX: Add Pacbio index to test_data.config * 👌 IMPROVE: Re add 10000 data test * 👌 IMPROVE: Add some pbindex * 🐛 FIX: Add pbi extension to files * 👌 IMPROVE: The module accept one channel (primers moved into the first channel) * 👌 IMPROVE: Update to last templates version * 👌 IMPROVE: add singletons parameter and improve outputs * 🐛 FIX: Update test with last module model * 👌 IMPROVE: Add test tag * 👌 IMPROVE: Update test data config * 👌 IMPROVE: Remove pbi from input files * 👌 IMPROVE: Remove unused index * 👌 IMPROVE: Final version of test datasets config * 👌 IMPROVE: Remove useless index + Fix Typos * 👌 IMPROVE: Fill contains args * 👌 IMPROVE: Add some pacbio test files * 🐛 FIX: Add Pacbio index to test_data.config * 👌 IMPROVE: Re add 10000 data test * 👌 IMPROVE: Add some pbindex * 🐛 FIX: Add pbi extension to files * 📦 NEW: Add galgal6 chr30 test data * 📦 NEW: Add bamtools module * 👌 IMPROVE: Ignore test data * 👌 IMPROVE: Update to last templates version * 👌 IMPROVE: Update module to last template version * 👌 IMPROVE: Update module to last template version * 👌 IMPROVE: Final version of test datasets config * 👌 IMPROVE: Remove useless index + Fix Typos * 👌 IMPROVE: Update code to new versions capture + better output channels * 👌 IMPROVE: Update with new versions.yml file * 🐛 FIX: Update meta.yml + correct typos * 👌 IMPROVE: Clean output file names + correct typo * 🐛 FIX: Remove bamtools/split module from isoseq3/cluster
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:
tuple val(meta), path("*.bam") , emit: bam
tuple val(meta), path("*.bam.pbi") , emit: pbi
tuple val(meta), path("*.cluster") , emit: cluster
tuple val(meta), path("*.cluster_report.csv"), emit: cluster_report
tuple val(meta), path("*.transcriptset.xml") , emit: transcriptset
tuple val(meta), path("*.hq.bam") , emit: hq_bam
tuple val(meta), path("*.hq.bam.pbi") , emit: hq_pbi
tuple val(meta), path("*.lq.bam") , emit: lq_bam
tuple val(meta), path("*.lq.bam.pbi") , emit: lq_pbi
path "versions.yml" , emit: versions
tuple val(meta), path("*.singletons.bam") , optional: true, emit: singletons_bam
tuple val(meta), path("*.singletons.bam.pbi"), optional: true, emit: singletons_pbi
script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
isoseq3 \\
cluster \\
$bam \\
${prefix}.bam \\
$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
"""
}