nf-core_modules/modules/ichorcna/createpon/main.nf
Simon Pearce 78e2e76b24
New module: ichorCNA (#1182)
* hmmcopy/mapCounter

* update test

* Remove bam tag

* Remove /tmp/ path from test.yml

* Update modules/hmmcopy/mapcounter/meta.yml

Incorporate formatting changes

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update modules/hmmcopy/mapcounter/meta.yml

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* Update tests/modules/hmmcopy/mapcounter/main.nf

Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>

* ichorCNA run

* Add panel of normals code

* Try and fix tests

* Edit string detection in tests

* Fix linting issues

* Just failing END_VERSIONS

* Fixed versions.yml

* Added DOI

* Optional name for file

* Add when command

* Updated when

* Update modules/ichorcna/createpon/main.nf

Co-authored-by: Simon Pearce <simon.pearce@cruk.manchester.ac.uk>
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
2022-02-11 16:56:13 +01:00

48 lines
1.2 KiB
Text

def VERSION = '0.3.2' // Version information not provided by tool on CLI
process ICHORCNA_CREATEPON {
label 'process_low'
conda (params.enable_conda ? "bioconda::r-ichorcna=0.3.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/r-ichorcna:0.3.2--r41hdfd78af_0' :
'quay.io/biocontainers/r-ichorcna:0.3.2--r41hdfd78af_0' }"
input:
path wigs
path gc_wig
path map_wig
path centromere
output:
path "*.rds" , emit: rds
path "*.txt" , emit: txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def centro = centromere ? "--centromere ${centromere}" : ''
def prefix = task.ext.prefix ?: "PoN"
"""
echo ${wigs} | tr " " "\\n" > wig_files.txt
createPanelOfNormals.R \\
--filelist wig_files.txt \\
--gcWig ${gc_wig} \\
--mapWig ${map_wig} \\
${centro} \\
${args} \\
--outfile ${prefix}
rm wig_files.txt
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ichorcna: $VERSION
END_VERSIONS
"""
}