diff --git a/modules/gatk4/markduplicates/main.nf b/modules/gatk4/markduplicates/main.nf index 97a8c3e1..68e4a21a 100644 --- a/modules/gatk4/markduplicates/main.nf +++ b/modules/gatk4/markduplicates/main.nf @@ -1,6 +1,6 @@ process GATK4_MARKDUPLICATES { tag "$meta.id" - label 'process_low' + label 'process_medium' conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? diff --git a/modules/maxquant/lfq/main.nf b/modules/maxquant/lfq/main.nf new file mode 100644 index 00000000..3fc45725 --- /dev/null +++ b/modules/maxquant/lfq/main.nf @@ -0,0 +1,37 @@ +process MAXQUANT_LFQ { + tag "$meta.id" + label 'process_long' + conda (params.enable_conda ? "bioconda::maxquant=2.0.3.0=py310hdfd78af_1" : null) + if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { + container "https://depot.galaxyproject.org/singularity/maxquant:2.0.3.0--py310hdfd78af_1" + } else { + container "quay.io/biocontainers/maxquant:2.0.3.0--py310hdfd78af_1" + } + + input: + tuple val(meta), path(fasta), path(paramfile) + path raw + + output: + tuple val(meta), path("*.txt"), emit: maxquant_txt + 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}" + + """ + cat <<-END_VERSIONS > versions.yml + "${task.process}": + maxquant: \$(maxquant --version 2>&1 > /dev/null | cut -f2 -d\" \") + END_VERSIONS + sed \"s_.*_$task.cpus_\" ${paramfile} > mqpar_changed.xml + sed -i \"s|PLACEHOLDER|\$PWD/|g\" mqpar_changed.xml + mkdir temp + maxquant mqpar_changed.xml + mv combined/txt/*.txt . + """ +} diff --git a/modules/maxquant/lfq/meta.yml b/modules/maxquant/lfq/meta.yml new file mode 100644 index 00000000..1078fc7a --- /dev/null +++ b/modules/maxquant/lfq/meta.yml @@ -0,0 +1,52 @@ +name: maxquant_lfq +description: Run standard proteomics data analysis with MaxQuant, mostly dedicated to label-free. Paths to fasta and raw files needs to be marked by "PLACEHOLDER" +keywords: + - sort +tools: + - maxquant: + description: MaxQuant is a quantitative proteomics software package designed for analyzing large mass-spectrometric data sets. License restricted. + homepage: None + documentation: None + tool_dev_url: None + doi: "" + licence: ["http://www.coxdocs.org/lib/exe/fetch.php?media=license_agreement.pdf"] + +input: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + + - raw: + type: file + description: raw files with mass spectra + pattern: "*.{raw,RAW,Raw}" + + - fasta: + type: file + description: fasta file with protein sequences + pattern: "*.{fasta}" + + - parfile: + type: file + description: MaxQuant parameter file (XML) + pattern: "*.{xml}" + +output: + - meta: + type: map + description: | + Groovy Map containing sample information + e.g. [ id:'test', single_end:false ] + - versions: + type: file + description: File containing software version + pattern: "versions.yml" + - maxquant_txt: + type: file + description: tables with peptides and protein information + pattern: "*.{txt}" + +authors: + - "@veitveit" diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index a3f2001f..477da86b 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -1214,6 +1214,10 @@ maxbin2: - modules/maxbin2/** - tests/modules/maxbin2/** +maxquant/lfq: + - modules/maxquant/lfq/** + - tests/modules/maxquant/lfq/** + md5sum: - modules/md5sum/** - tests/modules/md5sum/** diff --git a/tests/config/test_data.config b/tests/config/test_data.config index aaab2243..5937e869 100644 --- a/tests/config/test_data.config +++ b/tests/config/test_data.config @@ -430,5 +430,17 @@ params { ncbi_user_settings = "${test_data_dir}/generic/config/ncbi_user_settings.mkfg" } } + 'proteomics' { + 'msspectra' { + ups_file1 = "${test_data_dir}/proteomics/msspectra/OVEMB150205_12.raw" + ups_file2 = "${test_data_dir}/proteomics/msspectra/OVEMB150205_14.raw" + } + 'database' { + yeast_ups = "${test_data_dir}/proteomics/database/yeast_UPS.fasta" + } + 'parameter' { + maxquant = "${test_data_dir}/proteomics/parameter/mqpar.xml" + } + } } } diff --git a/tests/modules/maxquant/lfq/main.nf b/tests/modules/maxquant/lfq/main.nf new file mode 100644 index 00000000..bb9b7976 --- /dev/null +++ b/tests/modules/maxquant/lfq/main.nf @@ -0,0 +1,17 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { MAXQUANT_LFQ } from '../../../../modules/maxquant/lfq/main.nf' addParams( options: [:] ) + +workflow test_maxquant_lfq { + + input = [ [ id:'test' ], // meta map + file(params.test_data['proteomics']['database']['yeast_ups'], checkIfExists: true), file(params.test_data['proteomics']['parameter']['maxquant'] , checkIfExists: true) + ] + + + rawfiles = [file(params.test_data['proteomics']['msspectra']['ups_file1']) , file(params.test_data['proteomics']['msspectra']['ups_file2'])] + + MAXQUANT_LFQ ( input, rawfiles.collect() ) +} diff --git a/tests/modules/maxquant/lfq/nextflow.config b/tests/modules/maxquant/lfq/nextflow.config new file mode 100644 index 00000000..19934e76 --- /dev/null +++ b/tests/modules/maxquant/lfq/nextflow.config @@ -0,0 +1,5 @@ +process { + + publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } + +} \ No newline at end of file diff --git a/tests/modules/maxquant/lfq/test.yml b/tests/modules/maxquant/lfq/test.yml new file mode 100644 index 00000000..2b6a2c14 --- /dev/null +++ b/tests/modules/maxquant/lfq/test.yml @@ -0,0 +1,8 @@ +- name: maxquant lfq + command: nextflow run ./tests/modules/maxquant/lfq -entry test_maxquant_lfq -c tests/config/nextflow.config + tags: + - maxquant + - maxquant/lfq + files: + - path: output/maxquant/proteinGroups.txt + md5sum: 0d0f6aab54fe6dc717d1307bbc207324