-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSearchResult.cpp
More file actions
116 lines (105 loc) · 4.17 KB
/
Copy pathSearchResult.cpp
File metadata and controls
116 lines (105 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#include "SearchResult.hpp"
string SearchResult::getHeaderString() {
string header = string("#dtaPath") + "\t"
+ "Score" + "\t"
+ "fracItyExplained" + "\t"
+ "diffSeqDeltaScore" + "\t"
+ "nMatches/nIons" +"\t" // + " " + "additionalMatchInfo"
+ "theo_m_h" + "\t"
+ "ppm" + "\t"
+ "peptide" + "\t"
+ "protein" + "\t"
+ "redun" + "\t"
+ "posInfo" + "\t"
+ "searchType";
return header;
}
PeptideSearchResult::PeptideSearchResult(string &p, const Peptide &pep) {
deltaScore1 = -1;
diffSeqDeltaScore1 = -1;
searchType = "peptide";
pepPtr = &pep;
peptide = p;
}
string PeptideSearchResult::getSequence() {
return pepPtr->_sequence;
}
string PeptideSearchResult::getOutputString() const {
string output = (dtaPath + "\t"
+ toStr(score1) + "\t"
+ toStr(fracItyExplained) + "\t"
// + toStr(deltaScore1) + "\t"
// + toStr(meanFragmentDeviation) + "\t"
+ toStr(diffSeqDeltaScore1) + "\t"
+ toStr(nMatches) + "/" + toStr(nIons) + "\t"
+ toStr(theo_m_h) + "\t"
+ toStr(ppm) + "\t"
+ pepPtr->_flankResNterm + "." + peptide + "." + pepPtr->_flankResCterm + " - \t"
+ pepPtr->getProteinReference() + "\t"
+ toStr(pepPtr->getNumRedundantRefs()) + "\t"
+ toStr(pepPtr->_start) + "\t"
+ searchType);
// output = output + "\n" + peakDeviationInfo; ////
return output;
}
XLinkedSearchResult::XLinkedSearchResult(string &p, string &p2, const Peptide &pep, const Peptide &pep2, string pos_info) {
deltaScore1 = -1;
diffSeqDeltaScore1 = -1;
searchType = DigestOptions::multiSearchOptions[DigestOptions::currentSearchOpt].linkType;
pepPtr = &pep;
pepPtr2 = &pep2;
peptide = p;
peptide2 = p2;
posInfo = pos_info;
}
string XLinkedSearchResult::getSequence() {
return (pepPtr->_sequence + "-" + pepPtr2->_sequence);
}
string XLinkedSearchResult::getOutputString() const {
string output = (dtaPath + "\t"
+ toStr(score1) + "\t"
+ toStr(fracItyExplained) + "\t"
// + toStr(deltaScore1) + "\t"
// + toStr(meanFragmentDeviation) + "\t"
+ toStr(diffSeqDeltaScore1) + "\t"
+ toStr(nMatches) + "/" + toStr(nIons) + " " + addMatchInfo +"\t"
+ toStr(theo_m_h) + "\t"
+ toStr(ppm) + "\t"
+ pepPtr->_flankResNterm + "." + peptide + "." + pepPtr->_flankResCterm + " - "
+ pepPtr2->_flankResNterm + "." + peptide2 + "." + pepPtr2->_flankResCterm + "\t"
+ pepPtr->getProteinReference() + " - " + pepPtr2->getProteinReference() + "\t"
+ toStr(pepPtr->getNumRedundantRefs(DigestOptions::xFilterTopProts)) + "-" + toStr(pepPtr2->getNumRedundantRefs(DigestOptions::xFilterTopProts)) + "\t"
+ posInfo + "\t"
+ searchType);
// output = output + "\n" + peakDeviationInfo; ////
return output;
}
LoopLinkedSearchResult::LoopLinkedSearchResult(string &p, const Peptide &pep, string pos_info) {
deltaScore1 = -1;
diffSeqDeltaScore1 = -1;
searchType = DigestOptions::multiSearchOptions[DigestOptions::currentSearchOpt].linkType + "-loop";
pepPtr = &pep;
peptide = p;
posInfo = pos_info;
}
string LoopLinkedSearchResult::getSequence() {
return pepPtr->_sequence;
}
string LoopLinkedSearchResult::getOutputString() const {
string output = (dtaPath + "\t"
+ toStr(score1) + "\t"
+ toStr(fracItyExplained) + "\t"
// + toStr(deltaScore1) + "\t"
// + toStr(meanFragmentDeviation) + "\t"
+ toStr(diffSeqDeltaScore1) + "\t"
+ toStr(nMatches) + "/" + toStr(nIons) + "\t"
+ toStr(theo_m_h) + "\t"
+ toStr(ppm) + "\t"
+ pepPtr->_flankResNterm + "." + peptide + "." + pepPtr->_flankResCterm + " - \t"
+ pepPtr->getProteinReference() + "\t"
+ toStr(pepPtr->getNumRedundantRefs()) + "\t"
+ posInfo + "\t"
+ searchType);
// output = output + "\n" + peakDeviationInfo; ////
return output;
}