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

Add support for pepxml files with search_engine = Percolator #3278

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 12 additions & 3 deletions pwiz_tools/BiblioSpec/src/PepXMLreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ void PepXMLreader::startElement(const XML_Char* name, const XML_Char** attr)
else if (state == STATE_PROPHET_SUMMARY && isElement("inputfile", name)) {
// Count files for use in reporting percent complete
numFiles++;
} else if(isElement("msms_run_summary",name)) {
}
else if(isElement("msms_run_summary",name)) {
fileroot_ = getRequiredAttrValue("base_name",attr);
Verbosity::comment(V_DEBUG, "PepXML base_name is %s", fileroot_.c_str());

Expand All @@ -154,7 +155,8 @@ void PepXMLreader::startElement(const XML_Char* name, const XML_Char** attr)
Verbosity::comment(V_DEBUG, "Pepxml file is from Proteome Discoverer.");
analysisType_ = PROTEOME_DISCOVERER_ANALYSIS;
}
} else if (isElement("parameter", name)) {
}
else if (isElement("parameter", name)) {
string paramName = bal::to_lower_copy(string(getAttrValue("name", attr)));
string paramValue = bal::to_lower_copy(string(getAttrValue("value", attr)));
if (paramName == "post-processor" && paramValue == "percolator")
Expand Down Expand Up @@ -245,6 +247,11 @@ void PepXMLreader::startElement(const XML_Char* name, const XML_Char** attr)
analysisType_ = COMET_ANALYSIS;
setScoreType(TANDEM_EXPECTATION_VALUE); // expect values should be compatible with X!Tandem
probCutOff = getScoreThreshold(TANDEM);
} else if(search_engine.find("Percolator") == 0){
Verbosity::comment(V_DEBUG, "Pepxml file is from Percolator.");
analysisType_ = PERCOLATOR_ANALYSIS;
setScoreType(PERCOLATOR_QVALUE);
probCutOff = getScoreThreshold(SQT);
}// else assume peptide prophet or inter prophet

if (analysisType_ == PROTEOME_DISCOVERER_ANALYSIS &&
Expand Down Expand Up @@ -419,7 +426,8 @@ void PepXMLreader::startElement(const XML_Char* name, const XML_Char** attr)
(analysisType_ == PROTEOME_DISCOVERER_ANALYSIS && scoreType_ == MASCOT_IONS_SCORE && score_name == "exp-value") ||
(analysisType_ == MORPHEUS_ANALYSIS && score_name == "psm q-value") ||
(analysisType_ == MSGF_ANALYSIS && score_name == "qvalue") ||
(analysisType_ == CRUX_ANALYSIS && score_name == "percolator_qvalue")) {
(analysisType_ == CRUX_ANALYSIS && score_name == "percolator_qvalue")
(analysisType_ == PERCOLATOR_ANALYSIS)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a missing || operator? How did this work?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this is why I shouldnt push changes on a friday afternoon. Fixed.

pepProb = getDoubleRequiredAttrValue("value", attr);
} else if (analysisType_ == PEAKS_ANALYSIS && score_name == "-10lgp") {
pepProb = getDoubleRequiredAttrValue("value", attr);
Expand Down Expand Up @@ -614,6 +622,7 @@ bool PepXMLreader::scorePasses(double score){
case PEAKS_ANALYSIS:
case CRUX_ANALYSIS:
case COMET_ANALYSIS:
case PERCOLATOR_ANALYSIS:
case MSFRAGGER_ANALYSIS:
if(score <= probCutOff){
return true;
Expand Down
1 change: 1 addition & 0 deletions pwiz_tools/BiblioSpec/src/PepXMLreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class PepXMLreader : public BuildParser{
XTANDEM_ANALYSIS,
CRUX_ANALYSIS,
COMET_ANALYSIS,
PERCOLATOR_ANALYSIS,
MSFRAGGER_ANALYSIS};

vector<SeqMod> mods; ///< mods for the current spectrum being parsed
Expand Down