Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion pwiz_aux/msrc/utility/vendor_api/Shimadzu/ShimadzuReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,13 @@ class SpectrumImpl : public Spectrum
precursorMz_ = precursorInfo->first;
precursorCharge_ = precursorInfo->second;
}
else

if (spectrum_->PrecursorMzList->Count > 0 && spectrum_->PrecursorMzList[0] > 0)
{
// override with per-spectrum precursor if available
precursorMz_ = (double)spectrum_->PrecursorMzList[0] * MASS_MULTIPLIER;
}
else if (precursorInfo == nullptr)
precursorMz_ = (double)spectrum_->AcqModeMz * MASS_MULTIPLIER;

if (((ShimadzuGeneric::Param::MS::MassEventInfo^) eventInfo_) != nullptr)
Expand Down
3 changes: 2 additions & 1 deletion pwiz_tools/Skyline/Model/Koina/KoinaConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static class KoinaConstants
public static readonly int PEPTIDE_SEQ_LEN = 30;
public static readonly int IONS_PER_RESIDUE = 6;
public static readonly int PRECURSOR_CHARGES = 6;
public static readonly float INTENSITY_CUTOFF = 1.0e-6f; // Koina produces many peaks with intensity < 5e-6 that the older Koina does not
public static readonly int BATCH_SIZE = 1000;
public static readonly int MIN_NCE = 18;
public static readonly int MAX_NCE = 39;
Expand Down Expand Up @@ -77,4 +78,4 @@ public KoinaAA(char aa, int koinaIndex, StaticMod mod = null)
public static readonly Dictionary<int, KoinaAA[]> MODIFICATIONS_REVERSE =
MODIFICATIONS.GroupBy(kvp => kvp.Value.KoinaIndex).ToDictionary(g => g.Key, g => g.Select(kvp => kvp.Value).ToArray());
}
}
}
4 changes: 1 addition & 3 deletions pwiz_tools/Skyline/Model/Koina/Models/KoinaIntensityModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,10 @@ public KoinaPrecursorOutput(ReadOnlySpan<string> annotations, CodedInputStream i

Intensities = new IonTable<float[]>(IonType.y, seqLength);

const float intensityCutoff = 1.0e-6f; // Koina produces many peaks with intensity < 1e-6 that the older Koina does not

for (int i = 0; i < ionTypeNumberCharges.Length; ++i)
{
var ionTypeNumberCharge = ionTypeNumberCharges[i];
if (ionTypeNumberCharge.intensity <= intensityCutoff)
if (ionTypeNumberCharge.intensity <= KoinaConstants.INTENSITY_CUTOFF)
continue;

if (Intensities.GetIonValue(ionTypeNumberCharge.ionType, ionTypeNumberCharge.ionNumber) == null)
Expand Down