mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Merge pull request #1690 from SusiJo/cnvkit_reference
Add cnvkit/reference module
This commit is contained in:
commit
0e1bbe5b4a
7 changed files with 118 additions and 0 deletions
39
modules/cnvkit/reference/main.nf
Normal file
39
modules/cnvkit/reference/main.nf
Normal file
|
@ -0,0 +1,39 @@
|
|||
process CNVKIT_REFERENCE {
|
||||
tag "$reference"
|
||||
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:
|
||||
path fasta
|
||||
path targets
|
||||
path antitargets
|
||||
|
||||
output:
|
||||
path("*.cnn") , emit: cnn
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
|
||||
"""
|
||||
cnvkit.py \\
|
||||
reference \\
|
||||
--fasta $fasta \\
|
||||
--targets $targets \\
|
||||
--antitargets $antitargets \\
|
||||
--output reference.cnn \\
|
||||
$args
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
cnvkit: \$(cnvkit.py version | sed -e "s/cnvkit v//g")
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
47
modules/cnvkit/reference/meta.yml
Normal file
47
modules/cnvkit/reference/meta.yml
Normal file
|
@ -0,0 +1,47 @@
|
|||
name: cnvkit_reference
|
||||
description:
|
||||
keywords:
|
||||
- cnvkit
|
||||
- reference
|
||||
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:
|
||||
- fasta:
|
||||
type: file
|
||||
description: File containing reference genome
|
||||
pattern: "*.{fasta}"
|
||||
- targets:
|
||||
type: file
|
||||
description: File containing genomic regions
|
||||
pattern: "*.{bed}"
|
||||
- antitargets:
|
||||
type: file
|
||||
description: File containing off-target genomic regions
|
||||
pattern: "*.{bed}"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- reference:
|
||||
type: file
|
||||
description: File containing a copy-number reference (required for CNV calling in tumor_only mode)
|
||||
pattern: "*.{cnn}"
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
|
||||
authors:
|
||||
- "@SusiJo"
|
|
@ -455,6 +455,10 @@ cnvkit/batch:
|
|||
- modules/cnvkit/batch/**
|
||||
- tests/modules/cnvkit/batch/**
|
||||
|
||||
cnvkit/reference:
|
||||
- modules/cnvkit/reference/**
|
||||
- tests/modules/cnvkit/reference/**
|
||||
|
||||
controlfreec/assesssignificance:
|
||||
- modules/controlfreec/assesssignificance/**
|
||||
- tests/modules/controlfreec/assesssignificance/**
|
||||
|
|
|
@ -142,6 +142,7 @@ params {
|
|||
genome_21_sizes = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.sizes"
|
||||
genome_21_interval_list = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/genome.interval_list"
|
||||
genome_21_multi_interval_bed = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed"
|
||||
genome_21_multi_interval_antitarget_bed = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.antitarget.bed"
|
||||
genome_21_multi_interval_bed_gz = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz"
|
||||
genome_21_multi_interval_bed_gz_tbi = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed.gz.tbi"
|
||||
genome_21_chromosomes_dir = "${test_data_dir}/genomics/homo_sapiens/genome/chr21/sequence/chromosomes.tar.gz"
|
||||
|
|
14
tests/modules/cnvkit/reference/main.nf
Normal file
14
tests/modules/cnvkit/reference/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CNVKIT_REFERENCE } from '../../../../modules/cnvkit/reference/main.nf'
|
||||
|
||||
workflow test_cnvkit_reference {
|
||||
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
||||
targets = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)
|
||||
antitargets = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_antitarget_bed'], checkIfExists: true)
|
||||
|
||||
CNVKIT_REFERENCE ( fasta, targets, antitargets )
|
||||
}
|
5
tests/modules/cnvkit/reference/nextflow.config
Normal file
5
tests/modules/cnvkit/reference/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
8
tests/modules/cnvkit/reference/test.yml
Normal file
8
tests/modules/cnvkit/reference/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: cnvkit reference test_cnvkit_reference
|
||||
command: nextflow run ./tests/modules/cnvkit/reference -entry test_cnvkit_reference -c ./tests/config/nextflow.config -c ./tests/modules/cnvkit/reference/nextflow.config
|
||||
tags:
|
||||
- cnvkit/reference
|
||||
- cnvkit
|
||||
files:
|
||||
- path: output/cnvkit/reference.cnn
|
||||
md5sum: 7c4a7902f5ab101b1f9d6038d331b3d9
|
Loading…
Reference in a new issue