Skip to content

Commit

Permalink
rebased onto updated master
Browse files Browse the repository at this point in the history
  • Loading branch information
pcruzparri committed Feb 5, 2025
2 parents 43f525b + 848413d commit 463d65a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mzLib/MzLibUtil/PositionFrequencyAnalysis.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void PeptidePTMOccupancy(List<Tuple<string, string, List<string>, double>

// If the peptide's base sequence has not been seen, add it to the protein's dictionary
if (!protein.Peptides.ContainsKey(baseSeq))
{
{
protein.Peptides[baseSeq] = new UtilPeptide(fullSeq);
protein.Peptides[baseSeq].Intensity = 0;
}
Expand All @@ -156,20 +156,20 @@ public void PeptidePTMOccupancy(List<Tuple<string, string, List<string>, double>
Dictionary<int, List<string>> peptideMods = fullSeq.ParseModifications(modOnNTerminus, modOnCTerminus);
// Go through the modified positions found froum the full sequence
foreach (var modpos in peptideMods)
{
{
// If that position has not been recorded as containing a modification, add it to the base sequence's dictonary
if (!peptide.ModifiedAminoAcidPositions.ContainsKey(modpos.Key))
{
peptide.ModifiedAminoAcidPositions[modpos.Key] = new Dictionary<string, UtilModification>();
}
var modifiedPosition = peptide.ModifiedAminoAcidPositions[modpos.Key];

// Go through the modifications found at a modified amino acid index
foreach (var mod in modpos.Value)
{
//If the name of that modification has not been seen, record that modification in the index's dictionary with an intensity of 0
if (!modifiedPosition.ContainsKey(mod))
{
{
modifiedPosition[mod] = new UtilModification(mod, modpos.Key, 0);
}
// Increase the intensity of the modification by the intensity of the peptide
Expand Down

0 comments on commit 463d65a

Please sign in to comment.