mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
983ba000c1
* Added fgbio callmolecularconsensusreads and sortbam modules * Fixed naming issue in meta.yml * fix: test.yml and config lint * Revert "fix: test.yml and config lint" This reverts commit 0453bc3a8dc3dab6997442a4349ee2241adcc380, which caused the sortbam tests to fail. * style: Fix test names * style: Remove trailing whitespace * fixed test.yml * fix: test data in sortbam * fix: data format * fix: test data for callmolecularconsensusreads * Corrected with updated test data * Apply suggestions from code review Applied changes from code review, mainly syntactical changes Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: Sruthi Suresh <sps180004@ganymede.utdallas.edu> Co-authored-by: Edmund Miller <edmund.a.miller@protonmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
38 lines
1.2 KiB
Text
38 lines
1.2 KiB
Text
include { initOptions; saveFiles; getSoftwareName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
process FGBIO_CALLMOLECULARCONSENSUSREADS {
|
|
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), publish_id:meta.id) }
|
|
|
|
conda (params.enable_conda ? "bioconda::fgbio=1.3.0" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/fgbio:1.3.0--0"
|
|
} else {
|
|
container "quay.io/biocontainers/fgbio:1.3.0--0"
|
|
}
|
|
|
|
input:
|
|
tuple val(meta), path(bam)
|
|
|
|
output:
|
|
tuple val(meta), path("*.bam"), emit: bam
|
|
path "*.version.txt" , emit: version
|
|
|
|
script:
|
|
def software = getSoftwareName(task.process)
|
|
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
|
|
"""
|
|
fgbio \\
|
|
CallMolecularConsensusReads \\
|
|
-i $bam \\
|
|
$options.args \\
|
|
-o ${prefix}.bam
|
|
fgbio --version | sed -e "s/fgbio v//g" > ${software}.version.txt
|
|
"""
|
|
}
|