Thanks again for the feedback! We compared plain old expect values to
those with the Brendan's discriminant scoring and our samples
performed better with Brendan's scoring. So, now I'm back to figuring
out how fval is calculated.
I'm trying to maually work through calculating the fval for an xtandem
(k-score) result.
My stripped down pep.xml entry looks like this:
<spectrum_query spectrum="010319_f16.00923.00923.1"
<search_result>
<search_hit hit_rank="1" peptide="AISDAMFANPK" >
<search_score name="hyperscore" value="253"/>
<search_score name="nextscore" value="221"/>
<search_score name="expect" value="0.79"/>
<analysis_result analysis="peptideprophet">
<peptideprophet_result probability="0.1732"
all_ntt_prob="(0.0000,0.0000,0.1732)">
<search_score_summary>
<parameter name="fval" value="1.0108"/>
I'm plugging the values into the getDiscriminantScore method in
TandemDiscrimFunction:
double TandemDiscrimFunction::getDiscriminantScore(SearchResult*
result)
{
TandemResult* tresult = (TandemResult*)(result);
double tot = const_;
double disc = score_wt_ * log((double)tresult->hyper_) + expect_wt_
* (0-log((double)tresult->expect_)) + delta_wt_ * (1.0 - (tresult-
>next_ / tresult->hyper_));
if (len_wt_)
disc /= len_wt_ * sqrt((double)strlen(tresult->peptide_));
tot += disc;
if (use_expect_) {
tot = 3 * tot - 8;
}
return tot;
}
I'm initailizing through TandemKscoreDF.cxx with TandemKscoreDF(1,
false)
static double consts[] = {-13.287, -28.708, -31.083, -31.083,
-31.083};
static double score_wts[] = {2.256, 4.91, 4.983, 4.983, 4.983};
static double delta_wts[] = {14.346, 10.882, 18.091, 18.091, 18.091};
if (!use_expect)
{
const_ = consts[charge];
score_wt_ = score_wts[charge];
delta_wt_ = delta_wts[charge];
}
So my manual calculation looks like this:
tot = -28.708
disc = 4.91 * ln(253) + 0 * (0 - ln(0.79)) + 10.882 * (1.0 -
(210/253)) =
4.91 * 5.533 + 0 * 0.236 + 10.882 * 0.169 =
27.169 + 0 + 1.8495 =
29.185
tot = -28.708 + 29.185 = 0.311
But, I'm trying to reproduce the fval of 1.0108. I'm not an
experienced C++ programmer. Am I missing where expect_wt_ and len_wt_
are initaillized? Is ther another step to the calculation?
Thanks,
Bill
On Sep 17, 1:05 pm, David Shteynberg <
dshteynb...@systemsbiology.org>
wrote: