mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
add freec2circos script (#1454)
* add freec2circos script * remove todo statements
This commit is contained in:
parent
28e5211b35
commit
5acf301ddd
6 changed files with 156 additions and 0 deletions
31
modules/controlfreec/freec2circos/main.nf
Normal file
31
modules/controlfreec/freec2circos/main.nf
Normal file
|
@ -0,0 +1,31 @@
|
|||
process CONTROLFREEC_FREEC2CIRCOS {
|
||||
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(ratio)
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.circos.txt"), emit: circos
|
||||
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}"
|
||||
"""
|
||||
freec2circos.pl -f ${ratio} ${args} > ${prefix}.circos.txt
|
||||
|
||||
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
|
||||
"""
|
||||
}
|
45
modules/controlfreec/freec2circos/meta.yml
Normal file
45
modules/controlfreec/freec2circos/meta.yml
Normal file
|
@ -0,0 +1,45 @@
|
|||
name: controlfreec_freec2circos
|
||||
description: Format Freec output to circos input format
|
||||
keywords:
|
||||
- cna
|
||||
- cnv
|
||||
- somatic
|
||||
- single
|
||||
- tumor-only
|
||||
tools:
|
||||
- controlfreec:
|
||||
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:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- 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"
|
||||
- circos:
|
||||
type: file
|
||||
description: Txt file
|
||||
pattern: "*.circos.txt"
|
||||
|
||||
authors:
|
||||
- "@FriederikeHanssen"
|
|
@ -431,6 +431,10 @@ controlfreec/freec2bed:
|
|||
- modules/controlfreec/freec2bed/**
|
||||
- tests/modules/controlfreec/freec2bed/**
|
||||
|
||||
controlfreec/freec2circos:
|
||||
- modules/controlfreec/freec2circos/**
|
||||
- tests/modules/controlfreec/freec2circos/**
|
||||
|
||||
controlfreec/makegraph:
|
||||
- modules/controlfreec/makegraph/**
|
||||
- tests/modules/controlfreec/makegraph/**
|
||||
|
|
41
tests/modules/controlfreec/freec2circos/main.nf
Normal file
41
tests/modules/controlfreec/freec2circos/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { CONTROLFREEC_FREEC2CIRCOS } from '../../../../modules/controlfreec/freec2circos/main.nf'
|
||||
include { CONTROLFREEC_FREEC } from '../../../../modules/controlfreec/freec/main.nf'
|
||||
include { UNTAR } from '../../../../modules/untar/main.nf'
|
||||
|
||||
workflow test_controlfreec_freec2circos {
|
||||
|
||||
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,
|
||||
[]
|
||||
)
|
||||
|
||||
CONTROLFREEC_FREEC2CIRCOS ( CONTROLFREEC_FREEC.out.ratio )
|
||||
}
|
27
tests/modules/controlfreec/freec2circos/nextflow.config
Normal file
27
tests/modules/controlfreec/freec2circos/nextflow.config
Normal file
|
@ -0,0 +1,27 @@
|
|||
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"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
8
tests/modules/controlfreec/freec2circos/test.yml
Normal file
8
tests/modules/controlfreec/freec2circos/test.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
- name: controlfreec freec2circos test_controlfreec_freec2circos
|
||||
command: nextflow run tests/modules/controlfreec/freec2circos -entry test_controlfreec_freec2circos -c tests/config/nextflow.config
|
||||
tags:
|
||||
- controlfreec
|
||||
- controlfreec/freec2circos
|
||||
files:
|
||||
- path: output/controlfreec/test.circos.txt
|
||||
md5sum: 19cf35f2c36b46f717dc8342b8a5a645
|
Loading…
Reference in a new issue