Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major refactoring of PLFQ to a probabilistic approach #300

Merged
merged 8 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions modules/local/openms/proteomicslfq/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ process PROTEOMICSLFQ {
script:
def args = task.ext.args ?: ''
def msstats_present = params.quantification_method == "feature_intensity" ? "-out_msstats ${expdes.baseName}_msstats_in.csv" : ""
def id_transfer_threshold = (params.quantification_method == "feature_intensity") && (params.transfer_ids != "off") ? "-id_transfer_threshold ${params.id_transfer_threshold}" : ""
def triqler_present = (params.quantification_method == "feature_intensity") && (params.add_triqler_output) ? "-out_triqler ${expdes.baseName}_triqler_in.tsv" : ""
def decoys_present = (params.quantify_decoys || ((params.quantification_method == "feature_intensity") && params.add_triqler_output)) ? '-PeptideQuantification:quantify_decoys' : ''
def mzml_sorted = mzmls.collect().sort{ a, b -> a.name <=> b.name}
def id_sorted = id_files.collect().sort{ a, b -> a.name <=> b.name}
def feature_with_id_min_score = "-feature_with_id_min_score ${params.feature_with_id_min_score}"
def feature_without_id_min_score = params.targeted_only == false ? "-feature_without_id_min_score ${params.feature_without_id_min_score}" : ""

"""
ProteomicsLFQ \\
Expand All @@ -47,9 +48,10 @@ process PROTEOMICSLFQ {
-protein_inference ${params.protein_inference_method} \\
-quantification_method ${params.quantification_method} \\
-targeted_only ${params.targeted_only} \\
${feature_with_id_min_score} \\
${feature_without_id_min_score} \\
-mass_recalibration ${params.mass_recalibration} \\
-transfer_ids ${params.transfer_ids == 'off' ? 'false' : params.transfer_ids} \\
${id_transfer_threshold} \\
-Seeding:intThreshold ${params.lfq_intensity_threshold} \\
-protein_quantification ${params.protein_quant} \\
-alignment_order ${params.alignment_order} \\
${decoys_present} \\
Expand Down
11 changes: 7 additions & 4 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,16 @@ params {
protein_inference_method = 'aggregation'
protein_quant = 'unique_peptides'
quantification_method = 'feature_intensity'
targeted_only = true
mass_recalibration = false
transfer_ids = 'off'
alignment_order = 'star'
add_triqler_output = false
quantify_decoys = false
id_transfer_threshold = 0.50 // only used if targeted_only is set to false (default)

// ProteomicsLFQ MBR parameters
targeted_only = true // If false MBR will be applied for quantification of all proteins
feature_with_id_min_score = 0.10
feature_without_id_min_score = 0.75
lfq_intensity_threshold = 1000

// Bruker data
convert_dotd = false
Expand All @@ -170,7 +173,7 @@ params {
pg_level = 2
species_genes = false
diann_normalize = true
diann_speclib = ''
diann_speclib = null

// MSstats general options
msstats_remove_one_feat_prot = true
Expand Down
30 changes: 19 additions & 11 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -827,24 +827,32 @@
"description": "Recalibrates masses based on precursor mass deviations to correct for instrument biases. (default: 'false')",
"fa_icon": "far fa-check-square"
},
"transfer_ids": {
"type": "string",
"description": "Tries a targeted requantification in files where an ID is missing, based on aggregate properties (i.e. RT) of the features in other aligned files (e.g. 'mean' of RT). (**WARNING:** increased memory consumption and runtime). 'off' turns this feature off. (default: 'off')",
"default": "off",
"enum": ["off", "mean"],
"fa_icon": "fas fa-list-ol"
},
"targeted_only": {
"type": "boolean",
"description": "Only looks for quantifiable features at locations with an identified spectrum. Set to false to include unidentified features so they can be linked and matched to identified ones (= match between runs). (default: 'true')",
"default": true,
"fa_icon": "far fa-check-square"
},
"id_transfer_threshold": {
"feature_with_id_min_score": {
"type": "number",
"description": "The maximum percentage of samples that will be accepted for matching between runs (default: 0.5)",
"default": 0.5,
"fa_icon": "fas fa-filter"
"description": "The minimum probability (e.g.: 0.25) an identified (=id targeted) feature must have to be kept for alignment and linking (0=no filter).",
"default": 0.0,
"fa_icon": "fas fa-filter",
"help_text": "The minimum probability (e.g.: 0.25) an identified (=id targeted) feature must have to be kept for alignment and linking (0=no filter). (default: '0.0') (min: '0.0' max: '1.0')"
},
"feature_without_id_min_score": {
"type": "number",
"description": "The minimum probability (e.g.: 0.75) an unidentified feature must have to be kept for alignment and linking (0=no filter).",
"default": 0.0,
"fa_icon": "fas fa-filter",
"help_text": "The minimum probability (e.g.: 0.75) an unidentified feature must have to be kept for alignment and linking (0=no filter). (default: '0.0') (min: '0.0' max: '1.0')"
},
"lfq_intensity_threshold": {
"type": "number",
"description": "The minimum intensity for a feature to be considered for quantification. (default: '10000')",
"default": 10000,
"fa_icon": "fas fa-filter",
"help_text": "The minimum intensity for a feature to be considered for quantification. (default: '10000')"
},
"alignment_order": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion workflows/dia.nf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ workflow DIA {
//
// MODULE: SILICOLIBRARYGENERATION
//
if (params.diann_speclib) {
if (params.diann_speclib != null) {
speclib = Channel.fromPath(params.diann_speclib)
} else {
SILICOLIBRARYGENERATION(ch_searchdb, DIANNCFG.out.diann_cfg)
Expand Down
Loading