nf-core_modules/modules/maxquant/lfq/main.nf

45 lines
1.5 KiB
Text
Raw Normal View History

2021-11-16 12:26:55 +00:00
// Import generic module functions
include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
options = initOptions(params.options)
process MAXQUANT_LFQ {
tag "$meta.id"
label 'process_long'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
conda (params.enable_conda ? "bioconda::maxquant=2.0.1.0" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
2021-11-21 09:47:16 +00:00
container "https://depot.galaxyproject.org/singularity/maxquant:2.0.1.0--py39hdfd78af_2"
2021-11-16 12:26:55 +00:00
} else {
2022-01-12 15:44:28 +00:00
# container "wombatp/maxquant-pipeline:dev"
container "quay.io/biocontainers/maxquant:2.0.1.0
2021-11-16 12:26:55 +00:00
}
input:
2021-11-21 09:47:16 +00:00
tuple val(meta), path(fasta), path(paramfile)
path raw
2021-11-16 12:26:55 +00:00
output:
2021-12-17 11:34:28 +00:00
tuple val(meta), path("*.txt"), emit: maxquant_txt
2021-11-16 12:26:55 +00:00
path "*.version.txt" , emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
2021-11-21 09:47:16 +00:00
2021-11-16 12:26:55 +00:00
"""
2021-11-21 09:47:16 +00:00
maxquant --version | head -n1 - > maxquant.version.txt
sed \"s_<numThreads>.*_<numThreads>$task.cpus</numThreads>_\" ${paramfile} > mqpar_changed.xml
sed -i \"s|PLACEHOLDER|\$PWD/|g\" mqpar_changed.xml
2021-11-16 12:26:55 +00:00
mkdir temp
2021-11-21 09:47:16 +00:00
maxquant mqpar_changed.xml
2021-12-17 11:34:28 +00:00
mv combined/txt/*.txt .
2021-11-16 12:26:55 +00:00
"""
}