nf-core_modules/software/cnvkit/main.nf

47 lines
1.4 KiB
Text
Raw Normal View History

cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
options = initOptions(params.options)
cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
process CNVKIT {
tag "$meta.id"
label 'process_low'
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']) }
cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
conda (params.enable_conda ? "bioconda::cnvkit=0.9.8" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/cnvkit:0.9.8--py_0"
} else {
container "quay.io/biocontainers/cnvkit:0.9.8--py_0"
}
input:
tuple val(meta), path(tumourbam), path(normalbam)
path fasta
path targetfile
cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
output:
tuple val(meta), path("*.bed"), emit: bed
tuple val(meta), path("*.cnn"), emit: cnn
tuple val(meta), path("*.cnr"), emit: cnr
tuple val(meta), path("*.cns"), emit: cns
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
"""
cnvkit.py \\
batch \\
cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
$tumourbam \\
--normal $normalbam\\
--fasta $fasta \\
--targets $targetfile \\
$options.args
echo \$(cnvkit.py version) | sed -e "s/cnvkit v//g" > ${software}.version.txt
cnvkit module (#173) * Normal bam file added * Normal bam.bai file added * Tumour bam bai files added * human dir added * annotation dir added * cnvkit dir added * cnvkit dir added * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * Update software/cnvkit/main.nf Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> * changed input filenames * edited main.nf * edited main.nf * edited meta.nf * edited test.yml * filters.yml * edited main * edited main * edited meta * edited meta * edited main * removed unwanted lines * edited the path to the main.nf * removed function.nf * added functions.nf * deleted 2 workflows and craeted a common workflow * deleted paths for 2 workflows and created paths for a common workflow * Deleted annotation dir * deleted params.modules * Edited meta.with_normal * deleted normal_280_sub_chr21.bam * deleted normal_280_sub_chr21.bam.bai * deleted tumour_278_sub_chr21.bam * deleted tumour_278_sub_chr21.bam.bai * Edited input and script parts * Edited input part * Added * Edited args * Edited script * Edited input * Changed annotation to annotationfile * Changed description of the tool * edited singularuty container * edited input * line 44 removed trailing whitespace * Edited addParams * Deleted pdf output * Deleted pdf output * edited the path to main.nf * edited path to the main.nf * Added docker image version * Removed extra ../ * added md5sums * added md5sums * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Update software/cnvkit/main.nf Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * Edited the script * Edited the input * Edited main.nf * Edited main.nf * edited md5sum for reference.cnn * removed human fasta * removed human fasta.fai * added GRCh38 fasta * added GRCh38 fasta.fai * added hg19 fasta.fai * added hg19 fasta * Edited fasta file name * Edited bed file names and md5sums * Edited md5sums * edited the input and script section * edited input section * added targetfile * changed the files * changed the output files * added bam files * added bam files * remove files * added md5sums * replace file * added files * edited tests/software/cnvkit files * edited tests/software/cnvkit files * edited authors list * removed files * added files * added files * added files * added files * added file * added file * added file * added file * edited files * edited files * edited files * edited files * edited files * edited files * added new module * added new module * edited files * edited file * edited file * edited file * removed files Co-authored-by: kaurravneet4123 <kaurravneet4123@yahoo.com@users.noreply.github.com> Co-authored-by: Maxime Garcia <maxime.garcia@scilifelab.se> Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
2021-03-22 18:27:30 -04:00
"""
}