Merge pull request #1686 from SusiJo/cnvkit/antitarget

Added module cnvkit/antitarget
This commit is contained in:
SusiJo 2022-05-24 07:48:55 +02:00 committed by GitHub
commit 361b3a458b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,36 @@
process CNVKIT_ANTITARGET {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::cnvkit=0.9.9" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvkit:0.9.9--pyhdfd78af_0':
'quay.io/biocontainers/cnvkit:0.9.9--pyhdfd78af_0' }"
input:
tuple val(meta), path(targets)
output:
tuple val(meta), path("*.bed"), emit: bed
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cnvkit.py \\
antitarget \\
$targets \\
--output ${prefix}.antitarget.bed \\
$args
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
END_VERSIONS
"""
}

View file

@ -0,0 +1,44 @@
name: cnvkit_antitarget
description:
keywords:
- cvnkit
- antitarget
tools:
- cnvkit:
description: |
CNVkit is a Python library and command-line software toolkit to infer and visualize copy number from high-throughput DNA sequencing data.
It is designed for use with hybrid capture, including both whole-exome and custom target panels, and short-read sequencing platforms such as Illumina and Ion Torrent.
homepage: https://cnvkit.readthedocs.io/en/stable/index.html
documentation: https://cnvkit.readthedocs.io/en/stable/index.html
tool_dev_url: "https://github.com/etal/cnvkit"
doi: 10.1371/journal.pcbi.1004873
licence: ["Apache-2.0"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- targets:
type: file
description: File containing genomic regions
pattern: "*.{bed}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- bed:
type: file
description: File containing off-target regions
pattern: "*.{bed}"
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@SusiJo"

View file

@ -447,6 +447,10 @@ cmseq/polymut:
- modules/cmseq/polymut/** - modules/cmseq/polymut/**
- tests/modules/cmseq/polymut/** - tests/modules/cmseq/polymut/**
cnvkit/antitarget:
- modules/cnvkit/antitarget/**
- tests/modules/cnvkit/antitarget/**
cnvkit/batch: cnvkit/batch:
- modules/cnvkit/batch/** - modules/cnvkit/batch/**
- tests/modules/cnvkit/batch/** - tests/modules/cnvkit/batch/**

View file

@ -0,0 +1,16 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { CNVKIT_ANTITARGET } from '../../../../modules/cnvkit/antitarget/main.nf'
workflow test_cnvkit_antitarget {
input = [
[ id:'test' ], // meta map
file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)
]
CNVKIT_ANTITARGET ( input )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,8 @@
- name: cnvkit antitarget test_cnvkit_antitarget
command: nextflow run ./tests/modules/cnvkit/antitarget -entry test_cnvkit_antitarget -c ./tests/config/nextflow.config -c ./tests/modules/cnvkit/antitarget/nextflow.config
tags:
- cnvkit
- cnvkit/antitarget
files:
- path: output/cnvkit/test.antitarget.bed
md5sum: 3d4d20f9f23b39970865d29ef239d20b