Skip to content

Commit

Permalink
fix backwards support of retired parameter 'peptide_mass_tolerance' i…
Browse files Browse the repository at this point in the history
…n issue 60
  • Loading branch information
jke000 committed Jul 2, 2024
1 parent d7882a2 commit 23a3901
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CometSearch/CometFragmentIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void CometFragmentIndex::AddFragmentsThreadProc(int iWhichThread,
// each thread will loop through a subset of the g_vRawPeptides
for (size_t iWhichPeptide = iWhichThread; iWhichPeptide < g_vRawPeptides.size(); iWhichPeptide += iNumIndexingThreads)
{
// AddFragments(iWhichPeptide, modNumIdx) for unmodified peptide
// AddFragments for unmodified peptide
// FIX: if require variable mod is set, this would not be called here
AddFragments(g_vRawPeptides, iWhichThread, iWhichPeptide, -1, -1, -1, bCountOnly);

Expand Down
9 changes: 4 additions & 5 deletions CometSearch/CometSearchManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,11 @@ bool CometSearchManager::InitializeStaticParams()
GetParamValue("peptide_mass_tolerance", g_staticParams.tolerances.dInputTolerancePlus);
g_staticParams.tolerances.dInputToleranceMinus = -1.0 * g_staticParams.tolerances.dInputTolerancePlus;

GetParamValue("peptide_mass_tolerance_upper", g_staticParams.tolerances.dInputToleranceMinus);
if (GetParamValue("peptide_mass_tolerance_upper", g_staticParams.tolerances.dInputToleranceMinus))
g_staticParams.tolerances.dInputToleranceMinus *= -1.0;

GetParamValue("peptide_mass_tolerance_lower", g_staticParams.tolerances.dInputTolerancePlus);

g_staticParams.tolerances.dInputToleranceMinus *= -1.0; // hack to address reversing logic in how these were applieed
g_staticParams.tolerances.dInputTolerancePlus *= -1.0;
if (GetParamValue("peptide_mass_tolerance_lower", g_staticParams.tolerances.dInputTolerancePlus))
g_staticParams.tolerances.dInputTolerancePlus *= -1.0;

GetParamValue("precursor_tolerance_type", g_staticParams.tolerances.iMassToleranceType);
if ((g_staticParams.tolerances.iMassToleranceType < 0) || (g_staticParams.tolerances.iMassToleranceType > 1))
Expand Down

0 comments on commit 23a3901

Please sign in to comment.