mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
controlfreec significance (#1451)
* controlfreec significance * move freec files to own subfolder * Fix meta.yml naming * Fix meta.yml naming * Fix linting * Forgot to refactor * forgot more refactoring * Too much refactoring on output paths * Too little refactoring here * update checksum
This commit is contained in:
parent
27936729f2
commit
4efa8da5c5
11 changed files with 187 additions and 23 deletions
30
modules/controlfreec/assesssignificance/main.nf
Normal file
30
modules/controlfreec/assesssignificance/main.nf
Normal file
|
@ -0,0 +1,30 @@
|
|||
process CONTROLFREEC_ASSESSSIGNIFICANCE {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
||||
conda (params.enable_conda ? "bioconda::control-freec=11.6" : null)
|
||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||
'https://depot.galaxyproject.org/singularity/control-freec:11.6--h1b792b2_1':
|
||||
'quay.io/biocontainers/control-freec:11.6--h1b792b2_1' }"
|
||||
|
||||
input:
|
||||
tuple val(meta), path(cnvs), path(ratio)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.p.value.txt"), emit: bam
|
||||
path "versions.yml" , emit: versions
|
||||
|
||||
when:
|
||||
task.ext.when == null || task.ext.when
|
||||
|
||||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
"""
|
||||
cat /usr/local/bin/assess_significance.R | R --slave --args ${cnvs} ${ratio}
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
controlfreec: \$(echo \$(freec -version 2>&1) | sed 's/^.*Control-FREEC //; s/:.*\$//' | sed -e "s/Control-FREEC v//g" )
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
50
modules/controlfreec/assesssignificance/meta.yml
Normal file
50
modules/controlfreec/assesssignificance/meta.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
name: controlfreec_assesssignificance
|
||||
description: Add both Wilcoxon test and Kolmogorov-Smirnov test p-values to each CNV output of FREEC
|
||||
keywords:
|
||||
- cna
|
||||
- cnv
|
||||
- somatic
|
||||
- single
|
||||
- tumor-only
|
||||
tools:
|
||||
- controlfreec/assesssignificance:
|
||||
description: Copy number and genotype annotation from whole genome and whole exome sequencing data.
|
||||
homepage: http://boevalab.inf.ethz.ch/FREEC
|
||||
documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html
|
||||
tool_dev_url: https://github.com/BoevaLab/FREEC/
|
||||
doi: "10.1093/bioinformatics/btq635"
|
||||
licence: ["GPL >=2"]
|
||||
|
||||
input:
|
||||
# Only when we have meta
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- cnvs:
|
||||
type: file
|
||||
description: _CNVs file generated by FREEC
|
||||
pattern: "*._CNVs"
|
||||
- ratio:
|
||||
type: file
|
||||
description: ratio file generated by FREEC
|
||||
pattern: "*.ratio.txt"
|
||||
|
||||
output:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: "versions.yml"
|
||||
- p_value_txt:
|
||||
type: file
|
||||
description: CNV file containing p_values for each call
|
||||
pattern: "*.p.value.txt"
|
||||
|
||||
authors:
|
||||
- "@FriederikeHanssen"
|
|
@ -1,4 +1,4 @@
|
|||
process CONTROLFREEC {
|
||||
process CONTROLFREEC_FREEC {
|
||||
tag "$meta.id"
|
||||
label 'process_low'
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
name: controlfreec
|
||||
name: controlfreec_freec
|
||||
description: Copy number and genotype annotation from whole genome and whole exome sequencing data
|
||||
keywords:
|
||||
- cna
|
||||
|
@ -7,7 +7,7 @@ keywords:
|
|||
- single
|
||||
- tumor-only
|
||||
tools:
|
||||
- controlfreec:
|
||||
- controlfreec/freec:
|
||||
description: Copy number and genotype annotation from whole genome and whole exome sequencing data.
|
||||
homepage: http://boevalab.inf.ethz.ch/FREEC
|
||||
documentation: http://boevalab.inf.ethz.ch/FREEC/tutorial.html
|
|
@ -419,9 +419,13 @@ cnvkit/batch:
|
|||
- modules/cnvkit/batch/**
|
||||
- tests/modules/cnvkit/batch/**
|
||||
|
||||
controlfreec:
|
||||
- modules/controlfreec/**
|
||||
- tests/modules/controlfreec/**
|
||||
controlfreec/assesssignificance:
|
||||
- modules/controlfreec/assesssignificance/**
|
||||
- tests/modules/controlfreec/assesssignificance/**
|
||||
|
||||
controlfreec/freec:
|
||||
- modules/controlfreec/freec/**
|
||||
- tests/modules/controlfreec/freec/**
|
||||
|
||||
cooler/cload:
|
||||
- modules/cooler/cload/**
|
||||
|
|
42
tests/modules/controlfreec/assesssignificance/main.nf
Normal file
42
tests/modules/controlfreec/assesssignificance/main.nf
Normal file
|
@ -0,0 +1,42 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CONTROLFREEC_ASSESSSIGNIFICANCE } from '../../../../modules/controlfreec/assesssignificance/main.nf'
|
||||
include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf'
|
||||
include { UNTAR } from '../../../../modules/untar/main.nf'
|
||||
|
||||
workflow test_controlfreec_assesssignificance {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false, sex:'XX' ], // meta map
|
||||
file(params.test_data['homo_sapiens']['illumina']['test_mpileup'], checkIfExists: true),
|
||||
file(params.test_data['homo_sapiens']['illumina']['test2_mpileup'], checkIfExists: true),
|
||||
[],[],[],[]
|
||||
]
|
||||
|
||||
fasta = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta'], checkIfExists: true)
|
||||
fai = file(params.test_data['homo_sapiens']['genome']['genome_21_fasta_fai'], checkIfExists: true)
|
||||
|
||||
dbsnp = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz'], checkIfExists: true)
|
||||
dbsnp_tbi = file(params.test_data['homo_sapiens']['genome']['dbsnp_138_hg38_21_vcf_gz_tbi'], checkIfExists: true)
|
||||
|
||||
chrfiles = [ [], file(params.test_data['homo_sapiens']['genome']['genome_21_chromosomes_dir'], checkIfExists: true) ]
|
||||
target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)
|
||||
|
||||
UNTAR(chrfiles)
|
||||
CONTROLFREEC_FREEC (input,
|
||||
fasta,
|
||||
fai,
|
||||
[],
|
||||
dbsnp,
|
||||
dbsnp_tbi,
|
||||
UNTAR.out.untar.map{ it[1] },
|
||||
[],
|
||||
target_bed,
|
||||
[]
|
||||
)
|
||||
|
||||
sig_in = CONTROLFREEC_FREEC.out.CNV.join(CONTROLFREEC_FREEC.out.ratio)
|
||||
CONTROLFREEC_ASSESSSIGNIFICANCE ( sig_in )
|
||||
}
|
|
@ -2,7 +2,7 @@ process {
|
|||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName:CONTROLFREEC{
|
||||
withName:CONTROLFREEC_FREEC{
|
||||
ext.args = { [
|
||||
"sample":[
|
||||
inputformat: 'pileup',
|
10
tests/modules/controlfreec/assesssignificance/test.yml
Normal file
10
tests/modules/controlfreec/assesssignificance/test.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
- name: controlfreec assesssignificance test_controlfreec_assesssignificance
|
||||
command: nextflow run tests/modules/controlfreec/assesssignificance -entry test_controlfreec_assesssignificance -c tests/config/nextflow.config
|
||||
tags:
|
||||
- controlfreec/assesssignificance
|
||||
- controlfreec
|
||||
files:
|
||||
- path: output/controlfreec/test2.mpileup.gz_CNVs.p.value.txt
|
||||
md5sum: 44e23b916535fbc1a3f47b57fad292df
|
||||
- path: output/controlfreec/versions.yml
|
||||
md5sum: 0aa42fed10d61e4570fe1e0e83ffe932
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CONTROLFREEC } from '../../../modules/controlfreec/main.nf'
|
||||
include { UNTAR } from '../../../modules/untar/main.nf'
|
||||
workflow test_controlfreec {
|
||||
include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf'
|
||||
include { UNTAR } from '../../../../modules/untar/main.nf'
|
||||
|
||||
workflow test_controlfreec_freec {
|
||||
|
||||
input = [
|
||||
[ id:'test', single_end:false, sex:'XX' ], // meta map
|
||||
|
@ -23,15 +24,15 @@ workflow test_controlfreec {
|
|||
target_bed = file(params.test_data['homo_sapiens']['genome']['genome_21_multi_interval_bed'], checkIfExists: true)
|
||||
|
||||
UNTAR(chrfiles)
|
||||
CONTROLFREEC ( input,
|
||||
fasta,
|
||||
fai,
|
||||
[],
|
||||
dbsnp,
|
||||
dbsnp_tbi,
|
||||
UNTAR.out.untar.map{ it[1] },
|
||||
[],
|
||||
target_bed,
|
||||
[]
|
||||
CONTROLFREEC_FREEC (input,
|
||||
fasta,
|
||||
fai,
|
||||
[],
|
||||
dbsnp,
|
||||
dbsnp_tbi,
|
||||
UNTAR.out.untar.map{ it[1] },
|
||||
[],
|
||||
target_bed,
|
||||
[]
|
||||
)
|
||||
}
|
26
tests/modules/controlfreec/freec/nextflow.config
Normal file
26
tests/modules/controlfreec/freec/nextflow.config
Normal file
|
@ -0,0 +1,26 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName:CONTROLFREEC_FREEC{
|
||||
ext.args = { [
|
||||
"sample":[
|
||||
inputformat: 'pileup',
|
||||
mateorientation: 'FR'
|
||||
],
|
||||
"general" :[
|
||||
bedgraphoutput: "TRUE",
|
||||
noisydata: "TRUE",
|
||||
minexpectedgc: "0",
|
||||
readcountthreshold: "1",
|
||||
sex: meta.sex,
|
||||
window: "10",
|
||||
],
|
||||
"control":[
|
||||
inputformat: "pileup",
|
||||
mateorientation: "FR"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
- name: controlfreec test_controlfreec
|
||||
command: nextflow run tests/modules/controlfreec -entry test_controlfreec -c tests/config/nextflow.config
|
||||
- name: controlfreec test_controlfreec_freec
|
||||
command: nextflow run tests/modules/controlfreec/freec -entry test_controlfreec_freec -c tests/config/nextflow.config
|
||||
tags:
|
||||
- controlfreec
|
||||
- controlfreec/freec
|
||||
files:
|
||||
- path: output/controlfreec/config.txt
|
||||
- path: output/controlfreec/test.mpileup.gz_control.cpn
|
||||
|
@ -19,4 +20,4 @@
|
|||
- path: output/controlfreec/test2.mpileup.gz_sample.cpn
|
||||
md5sum: c80dad58a77b1d7ba6d273999f4b4b4b
|
||||
- path: output/controlfreec/versions.yml
|
||||
md5sum: ff93f6466d4686aab708425782c6c848
|
||||
md5sum: 3ab250a2ab3be22628124c7c65324651
|
Loading…
Reference in a new issue