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

[FEATURE] Option to specify the type of peptide main scores #3615

Merged

Conversation

Projects
None yet
4 participants
@sophiamersmann
Copy link
Contributor

commented Jul 11, 2018

Allow the user to specify which variable is set as main score for peptide hits. Valid scores to choose from are q-value, posterior error probability (PEP), and posterior probability (1 - PEP).

@jpfeuffer

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2018

Great. I think though that both PP and PEP are not necessary. We usually have automatic conversions in place where needed. Instead I would also allow the svm_score as it is now.

@timosachsenberg timosachsenberg requested a review from grosenberger Jul 12, 2018

@@ -229,6 +229,8 @@ class PercolatorAdapter :
registerFlag_("peptide-level-fdrs", "Calculate peptide-level FDRs instead of PSM-level FDRs.");
registerFlag_("protein-level-fdrs", "Use the picked protein-level FDR to infer protein probabilities. Use the -fasta option and -decoy-pattern to set the Fasta file and decoy pattern.");
registerStringOption_("osw_level", "<osw_level>", "ms2", "OSW: Either \"ms1\", \"ms2\" or \"transition\"; the data level selected for scoring.", !is_required);
registerStringOption_("score_type", "<type>", "q-value", "Type of the peptide main score", false);
setValidStrings_("score_type", ListUtils::create<String>("q-value,Posterior Error Probability,SVM Score"));

This comment has been minimized.

Copy link
@grosenberger

grosenberger Jul 12, 2018

Member

Maybe the input options would be better without spaces? E.g. "qvalue", "pep", "svm"? This makes it easier to pass the parameters via CLI.

}
else if (scoreType == "SVM Score")
{
hit->setScore(0.0); // set SVM score to 0.0 if hit not found in results

This comment has been minimized.

Copy link
@grosenberger

grosenberger Jul 12, 2018

Member

Is it possible that Percolator produces scores between -1.0 and 1.0? I'm not sure if I remember correctly, but in that case we should set the SVM score to the lower boundary.

This comment has been minimized.

Copy link
@sophiamersmann

sophiamersmann Jul 13, 2018

Author Contributor

SVM scores can be negative indeed but they are not constrained to lie in a (-1,1) interval. The absolute value of an SVM score corresponds to the distance to the SVM's margin. So, I am not really sure what to use as a lower boundary here. Just a high negative number, e.g. 1000?

This comment has been minimized.

Copy link
@sophiamersmann

sophiamersmann Jul 13, 2018

Author Contributor

Sry, -1000 of course...

This comment has been minimized.

Copy link
@jpfeuffer

jpfeuffer Jul 16, 2018

Contributor

I think he meant the minimum in the rest of the dataset. But imho you could even throw an Exception. Or does it happen often and can be explained when a score is missing?

This comment has been minimized.

Copy link
@sophiamersmann

sophiamersmann Jul 16, 2018

Author Contributor

Apparently, it happens quite a lot - at least for the test data set I used (over 500 times). Not sure why though.

This comment has been minimized.

Copy link
@timosachsenberg

timosachsenberg Jul 19, 2018

Contributor

I am not sure if that is the same reason for the missing scores but I fixed it for my data in:
#3630
The reason in my case was, that terminal modifications with bracket notation e.g. PEPTIDE.[1.2345] was removed and the peptide not properly mapped to the PercolatorResult.

@timosachsenberg timosachsenberg merged commit 37a847b into OpenMS:develop Jul 24, 2018

5 of 6 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
openms_pr_ci/compiler=appleclang-9.0.0,os_label=highsierra merge run ended
Details
openms_pr_ci/compiler=g++-7,os_label=ubuntu_1804 merge run ended
Details
openms_pr_ci/compiler=msvc-15,os_label=win10_64 merge run ended
Details
openms_pr_docker_pyopenms merge run ended
Details

@sophiamersmann sophiamersmann deleted the sophiamersmann:feature/percolator_pep_access branch Jul 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.