Skip to content

Commit

Permalink
Merge pull request #187 from nf-core/fix/FDRusageAndNaming
Browse files Browse the repository at this point in the history
[FIX/FEATURE] Add exp. wide PSM-FDR. Rename FDR params. Slightly change usage.
  • Loading branch information
jpfeuffer authored May 20, 2022
2 parents 462deea + bc65327 commit 15a5379
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 126 deletions.
20 changes: 18 additions & 2 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,20 @@ if (params.enable_mod_localization) {
}
}

process {
// FDRCONSENSUSID
withName: '.*:FDRCONSENSUSID' {
ext.args = "-PSM true -protein false"
}
}

process {
// FDRIDPEP
withName: '.*:FDRIDPEP' {
ext.args = "-PSM true -protein false"
}
}

process {
// ISOBARICANALYZER
withName: '.*:TMT:.*:ISOBARICANALYZER' {
Expand All @@ -161,9 +175,11 @@ process {
}

// IDFILTER on PROTEIN LEVEL
level = params.protein_quant == 'strictly_unique_peptides' ? 'prot' : 'protgroup'
withName: '.*:TMT:PROTEININFERENCE:IDFILTER' {
ext.args = [
"-score:prot \"$params.protein_level_fdr_cutoff\"",
"-score:${level} \"$params.protein_level_fdr_cutoff\"",
"-score:pep \"$params.psm_level_fdr_cutoff\"",
"-delete_unreferenced_peptide_hits",
"-remove_decoys"
].join(' ').trim()
Expand Down Expand Up @@ -218,7 +234,7 @@ process {

// IDFILTER
withName: '.*:ID:PSMFDRCONTROL:IDFILTER' {
ext.args = "-score:pep \"$params.psm_pep_fdr_cutoff\""
ext.args = "-score:pep \"$params.run_fdr_cutoff\""
ext.suffix = '.idXML'
publishDir = [
path: { "${params.outdir}/idfilter" },
Expand Down
1 change: 1 addition & 0 deletions conf/test_lfq.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ params {
enable_qc = true
add_triqler_output = true
protein_level_fdr_cutoff = 1.0
psm_level_fdr_cutoff = 1.0
acquisition_method = "dda"
}
2 changes: 2 additions & 0 deletions conf/test_localize.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ params {
enable_mod_localization = true
search_engines = 'comet,msgf'
enable_qc = true
protein_level_fdr_cutoff = 0.05
psm_level_fdr_cutoff = 1.0
skip_post_msstats = true
}
3 changes: 1 addition & 2 deletions conf/test_tmt.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ params {
database = 'https://raw.githubusercontent.com/nf-core/test-datasets/quantms/testdata/tmt_ci/erwinia_carotovora.fasta'
posterior_probabilities = "percolator"
search_engines = "comet,msgf"
protein_level_fdr_cutoff = 0.01
psm_pep_fdr_cutoff = 0.01
psm_level_fdr_cutoff = 1.0
decoy_affix = "rev"
label = 'tmt6plex'
fragment_method = 'HCD'
Expand Down
1 change: 0 additions & 1 deletion modules/local/openms/falsediscoveryrate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ process FALSEDISCOVERYRATE {
-in ${id_file} \\
-out ${id_file.baseName}_fdr.idXML \\
-threads $task.cpus \\
-protein $params.protein \\
-algorithm:add_decoy_peptides \\
-algorithm:add_decoy_proteins \\
$args \\
Expand Down
11 changes: 6 additions & 5 deletions modules/local/openms/proteomicslfq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ process PROTEOMICSLFQ {

"""
ProteomicsLFQ \\
-threads ${task.cpus} \\
-in ${(mzmls as List).join(' ')} \\
-ids ${(id_files as List).join(' ')} \\
-design ${expdes} \\
Expand All @@ -46,14 +47,14 @@ process PROTEOMICSLFQ {
-transfer_ids ${params.transfer_ids} \\
-protein_quantification ${params.protein_quant} \\
-alignment_order ${params.alignment_order} \\
-picked_proteinFDR true \\
${decoys_present} \\
-psmFDR ${params.psm_level_fdr_cutoff} \\
-proteinFDR ${params.protein_level_fdr_cutoff} \\
-picked_proteinFDR ${params.picked_fdr} \\
-out_cxml ${expdes.baseName - ~/_design$/}.consensusXML \\
-out ${expdes.baseName - ~/_design$/}.mzTab \\
-threads ${task.cpus} \\
${msstats_present} \\
${triqler_present} \\
${decoys_present} \\
-out_cxml ${expdes.baseName - ~/_design$/}.consensusXML \\
-proteinFDR ${params.protein_level_fdr_cutoff} \\
$args \\
|& tee proteomicslfq.log
Expand Down
8 changes: 3 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ params {
add_decoys = false
enable_pmultiqc = true
search_engines = 'comet'
psm_pep_fdr_cutoff = 0.10
protein_level_fdr_cutoff = 0.05
run_fdr_cutoff = 0.10
protein_level_fdr_cutoff = 0.01
psm_level_fdr_cutoff = 0.01

// Debug level
decoydatabase_debug = 0
Expand Down Expand Up @@ -93,9 +94,6 @@ params {
// IDPEP flags
outlier_handling = "none"

// Falsediscoveryrate
protein = false

// Percolator flags
train_FDR = 0.05
test_FDR = 0.05
Expand Down
223 changes: 112 additions & 111 deletions nextflow_schema.json

Large diffs are not rendered by default.

0 comments on commit 15a5379

Please sign in to comment.