Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Encyclopedia formated peptide full sequence including mass shift in brackets" #729

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -929,11 +929,6 @@ public override string ToString()
return FullSequence + string.Join("\t", AllModsOneIsNterminus.Select(m => m.ToString()));
}

public string FullSequenceWithMassShift()
{
return DetermineFullSequenceWithMassShifts();
}

public override bool Equals(object obj)
{
var q = obj as PeptideWithSetModifications;
Expand Down Expand Up @@ -1040,6 +1035,7 @@ private void GetProteinAfterDeserialization(Dictionary<string, Protein> idToProt
{
throw new MzLibUtil.MzLibException("Could not find protein accession after deserialization! " + ProteinAccession);
}

Protein = protein;
}

Expand Down Expand Up @@ -1094,55 +1090,6 @@ private void DetermineFullSequence()

FullSequence = subsequence.ToString();
}
/// <summary>
/// This method returns the full sequence with mass shifts INSTEAD OF PTMs in brackets []
/// Some external tools cannot parse PTMs, instead requiring a numerical input indicating the mass of a PTM in brackets
/// after the position of that modification
/// N-terminal mas shifts are in brackets prior to the first amino acid and apparently missing the + sign
/// </summary>
/// <returns></returns>
private string DetermineFullSequenceWithMassShifts()
{
var subsequence = new StringBuilder();

// modification on peptide N-terminus
if (AllModsOneIsNterminus.TryGetValue(1, out Modification mod))
{
subsequence.Append('[' + mod.MonoisotopicMass.RoundedDouble(6).ToString() + ']');
}

for (int r = 0; r < Length; r++)
{
subsequence.Append(this[r]);

// modification on this residue
if (AllModsOneIsNterminus.TryGetValue(r + 2, out mod))
{
if (mod.MonoisotopicMass > 0)
{
subsequence.Append("[+" + mod.MonoisotopicMass.RoundedDouble(6).ToString() + ']');
}
else
{
subsequence.Append("[" + mod.MonoisotopicMass.RoundedDouble(6).ToString() + ']');
}
}
}

// modification on peptide C-terminus
if (AllModsOneIsNterminus.TryGetValue(Length + 2, out mod))
{
if (mod.MonoisotopicMass > 0)
{
subsequence.Append("[+" + mod.MonoisotopicMass.RoundedDouble(6).ToString() + ']');
}
else
{
subsequence.Append("[" + mod.MonoisotopicMass.RoundedDouble(6).ToString() + ']');
}
}
return subsequence.ToString();
}

private void UpdateCleavageSpecificity()
{
Expand Down
134 changes: 0 additions & 134 deletions mzLib/Test/DatabaseTests/essentialSequences.txt

This file was deleted.

134 changes: 0 additions & 134 deletions mzLib/Test/DatabaseTests/fullSequences.txt

This file was deleted.

134 changes: 0 additions & 134 deletions mzLib/Test/DatabaseTests/fullSequencesWithMassShift.txt

This file was deleted.

Loading
Loading