//FChunk is now the input mzML / RAW without suffix
OutAccession=OutAccession.Split('|')[1];
//Scan numbers are fine as is
//Remove the sequence context characters (and double-quotes) from N-terminus
if(Seq[1]=='.')
Seq=Seq.Substring(2);
else
Seq=Seq.Substring(3);
//Remove the sequence context characters from C-terminus
if(Seq[Seq.Length-2]=='.')
Seq=Seq.Substring(0,Seq.Length-2);
else
Seq=Seq.Substring(0,Seq.Length-3);
StringBuilderOutSeqBuilder=newStringBuilder();
StringBuilderUnkPTMLabel;
floatObsMass;
PTMThesePTMs=newPTM();
// THIS CODE ASSOCIATES EACH PTM WITH THE LAST SEQUENCE LETTER IN THE RANGE TO WHICH IT MIGHT BE ATTACHED; LOCALIZATION INFORMATION IS DESTROYED HERE.
// Note that TopMG results frequently include multiple PTMs in the same ambiguous sequence range; all PTMs for that range are attributed to the last residue in it.
// I feel guilty for dumping garbage collection on the interpreter.
ThesePTMs.Next=null;
//If a named PTM has ambiguous localization, mark specific AAs that might hit it: "(KRGLKIVSLKMVKMSRDIAEK)[Methyl]" becomes "K[Methyl #g1]RGLK[#g1]IVSLK[#g1]MVK[#g1]MSRDIAEK[#g1]"