Add peptide_ref column to modification info and PSM info
... | ... |
@@ -101,6 +101,7 @@ Rcpp::DataFrame RcppIdent::getPsmInfo( ) |
101 | 101 |
std::vector<double> experimentalMassToCharge; |
102 | 102 |
std::vector<double> calculatedMassToCharge; |
103 | 103 |
std::vector<std::string> seq; |
104 |
+ std::vector<std::string> peptideRef; |
|
104 | 105 |
std::vector<int> modification; |
105 | 106 |
std::vector<bool> isDecoy; |
106 | 107 |
std::vector<bool> passThreshold; |
... | ... |
@@ -127,6 +128,7 @@ Rcpp::DataFrame RcppIdent::getPsmInfo( ) |
127 | 128 |
experimentalMassToCharge.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->experimentalMassToCharge); |
128 | 129 |
calculatedMassToCharge.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->calculatedMassToCharge); |
129 | 130 |
seq.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->peptidePtr->peptideSequence); |
131 |
+ peptideRef.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->peptidePtr->id); |
|
130 | 132 |
modification.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->peptidePtr->modification.size()); |
131 | 133 |
isDecoy.push_back(spectrumIdResult[i]->spectrumIdentificationItem[j]->peptideEvidencePtr[k]->isDecoy); |
132 | 134 |
pre.push_back(string(1, spectrumIdResult[i]->spectrumIdentificationItem[j]->peptideEvidencePtr[k]->pre)); |
... | ... |
@@ -168,6 +170,7 @@ Rcpp::DataFrame RcppIdent::getPsmInfo( ) |
168 | 170 |
Rcpp::_["experimentalMassToCharge"] = experimentalMassToCharge, |
169 | 171 |
Rcpp::_["calculatedMassToCharge"] = calculatedMassToCharge, |
170 | 172 |
Rcpp::_["sequence"] = seq, |
173 |
+ Rcpp::_["peptideRef"] = peptideRef, |
|
171 | 174 |
Rcpp::_["modNum"] = modification, |
172 | 175 |
Rcpp::_["isDecoy"] = isDecoy, |
173 | 176 |
Rcpp::_["post"] = post, |
... | ... |
@@ -187,6 +190,7 @@ Rcpp::DataFrame RcppIdent::getModInfo( ) |
187 | 190 |
vector<SpectrumIdentificationResultPtr> spectrumIdResult = mzid->analysisCollection.spectrumIdentification[0]->spectrumIdentificationListPtr->spectrumIdentificationResult; |
188 | 191 |
vector<string> spectrumID; |
189 | 192 |
vector<string> seq; |
193 |
+ vector<string> peptideRef; |
|
190 | 194 |
vector<string> name; |
191 | 195 |
vector<double> mass; |
192 | 196 |
vector<int> loc; |
... | ... |
@@ -201,6 +205,7 @@ Rcpp::DataFrame RcppIdent::getModInfo( ) |
201 | 205 |
{ |
202 | 206 |
spectrumID.push_back(spectrumIdResult[i]->spectrumID); |
203 | 207 |
seq.push_back(spectrumIdResult[i]->spectrumIdentificationItem[k]->peptidePtr->peptideSequence); |
208 |
+ peptideRef.push_back(spectrumIdResult[i]->spectrumIdentificationItem[k]->peptidePtr->id); |
|
204 | 209 |
name.push_back(cvTermInfo(spectrumIdResult[i]->spectrumIdentificationItem[k]->peptidePtr->modification[j]->cvParams[0].cvid).name); |
205 | 210 |
mass.push_back(spectrumIdResult[i]->spectrumIdentificationItem[k]->peptidePtr->modification[j]->monoisotopicMassDelta); |
206 | 211 |
loc.push_back(spectrumIdResult[i]->spectrumIdentificationItem[k]->peptidePtr->modification[j]->location); |
... | ... |
@@ -212,6 +217,7 @@ Rcpp::DataFrame RcppIdent::getModInfo( ) |
212 | 217 |
return Rcpp::DataFrame::create( |
213 | 218 |
Rcpp::_["spectrumID"] = spectrumID, |
214 | 219 |
Rcpp::_["sequence"] = seq, |
220 |
+ Rcpp::_["peptideRef"] = peptideRef, |
|
215 | 221 |
Rcpp::_["name"] = name, |
216 | 222 |
Rcpp::_["mass"] = mass, |
217 | 223 |
Rcpp::_["location"] = loc); |
... | ... |
@@ -347,16 +353,16 @@ Rcpp::DataFrame RcppIdent::getSpecParams( ) |
347 | 353 |
} |
348 | 354 |
|
349 | 355 |
Rcpp::List res(score.size() + 1); |
350 |
- |
|
356 |
+ |
|
351 | 357 |
names.insert(names.begin(), "spectrumID"); |
352 |
- |
|
358 |
+ |
|
353 | 359 |
res[0] = Rcpp::wrap(spectrumID); |
354 |
- |
|
360 |
+ |
|
355 | 361 |
for(size_t i = 0; i < score.size(); i++) |
356 | 362 |
{ |
357 | 363 |
res[i + 1] = Rcpp::wrap(score[i]); |
358 | 364 |
} |
359 |
- |
|
365 |
+ |
|
360 | 366 |
res.attr("names") = names; |
361 | 367 |
Rcpp::DataFrame out(res); |
362 | 368 |
|