nf-core_modules/modules/variantbam/main.nf

44 lines
1.4 KiB
Text
Raw Permalink Normal View History

Add variantbam (#618) * template created for variantbam (#616) * Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * fix test Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> * fixed autogenerated biocontainter links * variantbam module passing all tests/lints (#616) * Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * removed qcreport output fixes #616 Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com>
2021-07-26 18:07:29 +00:00
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
Add variantbam (#618) * template created for variantbam (#616) * Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * fix test Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> * fixed autogenerated biocontainter links * variantbam module passing all tests/lints (#616) * Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * removed qcreport output fixes #616 Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com>
2021-07-26 18:07:29 +00:00
params.options = [:]
options = initOptions(params.options)
def VERSION = '1.4.4a'
process VARIANTBAM {
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::variantbam=1.4.4a" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/variantbam:1.4.4a--h7d7f7ad_5"
} else {
container "quay.io/biocontainers/variantbam:1.4.4a--h7d7f7ad_5"
}
input:
tuple val(meta), path(bam)
output:
tuple val(meta), path("*.bam") , emit: bam
path "versions.yml" , emit: versions
Add variantbam (#618) * template created for variantbam (#616) * Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * fix test Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> * fixed autogenerated biocontainter links * variantbam module passing all tests/lints (#616) * Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * removed qcreport output fixes #616 Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com>
2021-07-26 18:07:29 +00:00
script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
variant \\
$bam \\
-o ${prefix}.bam \\
$options.args
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$(echo $VERSION)
END_VERSIONS
Add variantbam (#618) * template created for variantbam (#616) * Add bcftools reheader (#585) (#608) * local tests and linting passing (#585) * fix: picard filtersamreads input (#610) * Move readlist into same input channel as bam * Update test reflecting input restructuring * Update tests/modules/picard/filtersamreads/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * fix test Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Added module arriba (#611) * Updated the version of STAR in align and genomegenerate modules * Changes in test.yml * Changes in test.yml * Added module arriba * Changes in test configs * Added module Arriba for fusion detection * Fixed review comments * Added an output option for discarded fusions * Resolved some conflits * conflicts * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * added test for new header * enhance module fastp: add `save_merged` (#598) (#614) * enhance module fastp: add `save_merged` (#598) * removed md5sum checks from log and json * Apply suggestions from code review Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com> * fixed autogenerated biocontainter links * variantbam module passing all tests/lints (#616) * Added an optional output junction channel in STAR (#621) * Added an optional output channel for chimeric junctions * Fix in test.yml * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * removed qcreport output fixes #616 Co-authored-by: James A. Fellows Yates <jfy133@gmail.com> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> Co-authored-by: praveenraj2018 <43108054+praveenraj2018@users.noreply.github.com>
2021-07-26 18:07:29 +00:00
"""
}